Skip to content

Commit

Permalink
make wallet sync
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrouid committed Feb 27, 2020
1 parent cab5788 commit 9950eb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/helpers/wallet.ts
Expand Up @@ -18,10 +18,10 @@ export function isWalletActive() {
return null;
}

export async function getWallet(index?: number, chainId?: number): Promise<ethers.Wallet> {
export function getWallet(index?: number, chainId?: number): ethers.Wallet {
let _wallet = wallet;
if (!_wallet || activeIndex === index || activeChainId === chainId) {
_wallet = await initWallet(index, chainId);
_wallet = initWallet(index, chainId);
}
return _wallet;
}
Expand Down Expand Up @@ -86,7 +86,7 @@ export function initWallet(index = DEFAULT_ACTIVE_INDEX, chainId = DEFAULT_CHAIN
return updateWallet(index, chainId);
}

export async function updateWallet(index: number, chainId: number) {
export function updateWallet(index: number, chainId: number) {
activeIndex = index;
activeChainId = chainId;
const rpcUrl = getChainData(chainId).rpc_url;
Expand Down

0 comments on commit 9950eb8

Please sign in to comment.