diff --git a/src/@context/Web3.tsx b/src/@context/Web3.tsx index 71e48f19a..916badeda 100644 --- a/src/@context/Web3.tsx +++ b/src/@context/Web3.tsx @@ -43,7 +43,7 @@ interface Web3ProviderValue { web3Loading: boolean isSupportedOceanNetwork: boolean approvedBaseTokens: TokenInfo[] - connect: () => Promise + connect: () => Promise logout: () => Promise } @@ -136,8 +136,10 @@ function Web3Provider({ children }: { children: ReactNode }): ReactElement { const accountId = (await web3.eth.getAccounts())[0] setAccountId(accountId) LoggerInstance.log('[web3] account id', accountId) + return accountId } catch (error) { LoggerInstance.error('[web3] Error: ', error.message) + return null } finally { setWeb3Loading(false) }