Skip to content

Commit

Permalink
add bank balance to swap tx invalidated queries (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecande11 authored May 2, 2023
1 parent f5755bd commit 970bdd2
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/txs/swap/TFMSwapForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,16 @@ const TFMSwapForm = ({ chainID }: { chainID: string }) => {
balance,
estimationTxValues,
createTx,
queryKeys: [offerAsset, askAsset]
.filter((asset) => asset && AccAddress.validate(asset))
.map((token) => [
queryKey.wasm.contractQuery,
token,
{ balance: address },
]),
queryKeys: [
queryKey.bank.balances,
...[offerAsset, askAsset]
.filter((asset) => asset && AccAddress.validate(asset))
.map((token) => [
queryKey.wasm.contractQuery,
token,
{ balance: address },
]),
],
chain: chainID,
}

Expand Down

0 comments on commit 970bdd2

Please sign in to comment.