Skip to content

Commit

Permalink
fix: Wait for Web3Provider to be ready when fetching prices from the …
Browse files Browse the repository at this point in the history
  • Loading branch information
sucepass committed Nov 30, 2020
1 parent 840aaab commit 7b349ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/basis-cash/BasisCash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ export class BasisCash {
}

async getTokenPriceFromUniswap(tokenContract: ERC20): Promise<string> {
await this.provider.ready;

const { chainId } = this.config;
const { DAI } = this.config.externalTokens;

Expand Down

0 comments on commit 7b349ff

Please sign in to comment.