From 970bdd2ede69ef526d6a282e0efcefd392e2ecc6 Mon Sep 17 00:00:00 2001 From: Alessandro Candeago <54709706+alecande11@users.noreply.github.com> Date: Tue, 2 May 2023 16:46:44 +0200 Subject: [PATCH] add bank balance to swap tx invalidated queries (#362) --- src/txs/swap/TFMSwapForm.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/txs/swap/TFMSwapForm.tsx b/src/txs/swap/TFMSwapForm.tsx index 0c3d72f88..b03c5ce2e 100644 --- a/src/txs/swap/TFMSwapForm.tsx +++ b/src/txs/swap/TFMSwapForm.tsx @@ -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, }