Skip to content

Commit

Permalink
fix: pass token address to balanceFor function
Browse files Browse the repository at this point in the history
  • Loading branch information
evgenyboxer committed Aug 4, 2021
1 parent f866f68 commit 9c74794
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/composables/trade/useGnosis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export default function useGnosis({

state.errors.priceExceedsBalance = bnum(
formatUnits(maximumInAmount, tokenIn.value.decimals)
).gt(balanceFor(tokenIn.value));
).gt(balanceFor(tokenIn.value.address));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/providers/tokens.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface TokensProviderResponse {
hasBalance: Function;
approvalsRequired: Function;
priceFor: Function;
balanceFor: Function;
balanceFor: (address: string) => number;
getTokens: Function;
}

Expand Down

0 comments on commit 9c74794

Please sign in to comment.