From 68e5cb86803eccfb3ebd207cd9e71df55a830300 Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 22 Sep 2023 17:12:54 -0700 Subject: [PATCH] Do not get token balance on withdraw (#45) --- .../WithdrawForm/WithdrawButtonAndReceipt.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/views/forms/AccountManagementForms/WithdrawForm/WithdrawButtonAndReceipt.tsx b/src/views/forms/AccountManagementForms/WithdrawForm/WithdrawButtonAndReceipt.tsx index 2047627..274bbef 100644 --- a/src/views/forms/AccountManagementForms/WithdrawForm/WithdrawButtonAndReceipt.tsx +++ b/src/views/forms/AccountManagementForms/WithdrawForm/WithdrawButtonAndReceipt.tsx @@ -49,15 +49,15 @@ export const WithdrawButtonAndReceipt = ({ const [isEditingSlippage, setIsEditingSlipapge] = useState(false); const stringGetter = useStringGetter(); - const { balance, queryStatus } = useAccountBalance({ - addressOrDenom: withdrawToken?.address || undefined, - assetSymbol: withdrawToken?.symbol || undefined, - chainId: withdrawChain ? parseInt(withdrawChain) : undefined, - decimals: withdrawToken?.decimals || undefined, - isCosmosChain: false, - }); - // TODO: uncomment when we have a way to get token amount estimate from abacus + // const { balance, queryStatus } = useAccountBalance({ + // addressOrDenom: withdrawToken?.address || undefined, + // assetSymbol: withdrawToken?.symbol || undefined, + // chainId: withdrawChain ? parseInt(withdrawChain) : undefined, + // decimals: withdrawToken?.decimals || undefined, + // isCosmosChain: false, + // }); + // const balanceBN = MustBigNumber(balance); // const newBalance = // // toAmountMin && withdrawToken && parseUnits(toAmountMin, withdrawToken.decimals).toString(); @@ -158,7 +158,7 @@ export const WithdrawButtonAndReceipt = ({ // }, ]; - const isFormValid = !isDisabled && !isEditingSlippage && queryStatus !== 'error'; + const isFormValid = !isDisabled && !isEditingSlippage; return (