diff --git a/nym-wallet/src/context/main.tsx b/nym-wallet/src/context/main.tsx index 75e6818025..75e32e4657 100644 --- a/nym-wallet/src/context/main.tsx +++ b/nym-wallet/src/context/main.tsx @@ -30,11 +30,14 @@ type TClientContext = { currency?: TCurrency; isLoading: boolean; error?: string; + setIsLoading: (isLoading: boolean) => void; + setError: (value?: string) => void; switchNetwork: (network: Network) => void; getBondDetails: () => Promise; handleShowSettings: () => void; handleShowAdmin: () => void; logIn: (mnemonic: string) => void; + signInWithPassword: (password: string) => void; logOut: () => void; }; @@ -90,7 +93,6 @@ export const ClientContextProvider = ({ children }: { children: React.ReactNode try { setIsLoading(true); await signInWithMnemonic(mnemonic || ''); - await getBondDetails(); setNetwork('MAINNET'); history.push('/balance'); } catch (e) { @@ -99,6 +101,8 @@ export const ClientContextProvider = ({ children }: { children: React.ReactNode } }; + const signInWithPassword = (password: string) => password; + const logOut = async () => { setClientDetails(undefined); setNetwork(undefined); @@ -124,6 +128,9 @@ export const ClientContextProvider = ({ children }: { children: React.ReactNode showSettings, network, currency, + setIsLoading, + setError, + signInWithPassword, switchNetwork, getBondDetails, handleShowSettings,