mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 06:52:41 +01:00
Update storage-context.tsx
This commit is contained in:
parent
07f07d3d38
commit
d9c913c265
1 changed files with 3 additions and 3 deletions
|
@ -63,8 +63,8 @@ export enum WalletTransactionsStatus {
|
|||
// @ts-ignore defaut value does not match the type
|
||||
export const BlueStorageContext = createContext<BlueStorageContextType>(undefined);
|
||||
export const BlueStorageProvider = ({ children }: { children: React.ReactNode }) => {
|
||||
const txMetadata = useRef<TTXMetadata>({});
|
||||
const counterpartyMetadata = useRef<TCounterpartyMetadata>({}); // init
|
||||
const txMetadata = useRef<TTXMetadata>(BlueApp.tx_metadata);
|
||||
const counterpartyMetadata = useRef<TCounterpartyMetadata>(BlueApp.counterparty_metadata || {}); // init
|
||||
const getTransactions = BlueApp.getTransactions;
|
||||
const fetchWalletBalances = BlueApp.fetchWalletBalances;
|
||||
const fetchWalletTransactions = BlueApp.fetchWalletTransactions;
|
||||
|
@ -93,9 +93,9 @@ export const BlueStorageProvider = ({ children }: { children: React.ReactNode })
|
|||
useEffect(() => {
|
||||
BlueElectrum.isDisabled().then(setIsElectrumDisabled);
|
||||
if (walletsInitialized) {
|
||||
setWallets(BlueApp.getWallets());
|
||||
txMetadata.current = BlueApp.tx_metadata;
|
||||
counterpartyMetadata.current = BlueApp.counterparty_metadata;
|
||||
setWallets(BlueApp.getWallets());
|
||||
BlueElectrum.connectMain();
|
||||
}
|
||||
}, [walletsInitialized]);
|
||||
|
|
Loading…
Add table
Reference in a new issue