diff --git a/src/components/Dialogs/WithdrawVaultUSDTDialog/Confirming.tsx b/src/components/Dialogs/WithdrawVaultUSDTDialog/Confirming.tsx index 28daf94486..ab91d4938c 100644 --- a/src/components/Dialogs/WithdrawVaultUSDTDialog/Confirming.tsx +++ b/src/components/Dialogs/WithdrawVaultUSDTDialog/Confirming.tsx @@ -5,7 +5,14 @@ import { FormattedMessage } from 'react-intl' import { OPEN_WITHDRAW_VAULT_USDT_DIALOG, PATHS } from '~/common/enums' import { formatAmount, truncate } from '~/common/utils' -import { Dialog, Spinner, toast, useRoute, ViewerContext } from '~/components' +import { + Dialog, + Spinner, + toast, + useRoute, + useVaultBalanceUSDT, + ViewerContext, +} from '~/components' import { TransactionState, WithdrawVaultUsdtMutation, @@ -47,9 +54,10 @@ const WITHDRAW_VAULT_USDT_POLLING = gql` ` const Confirming: React.FC = ({ amount, closeDialog }) => { + const { router } = useRoute() const viewer = useContext(ViewerContext) const address = viewer.info.ethAddress! - const { router } = useRoute() + const { refetch: refetchVaultBalanceUSDT } = useVaultBalanceUSDT() const [withdraw] = useMutation(WITHDRAW_VAULT_USDT) const [txId, setTxId] = useState(null) @@ -103,6 +111,8 @@ const Confirming: React.FC = ({ amount, closeDialog }) => { ], }) + refetchVaultBalanceUSDT() + closeDialog() } diff --git a/src/components/Notice/TransactionNotice/WithdrewLockedTokensNotice.tsx b/src/components/Notice/TransactionNotice/WithdrewLockedTokensNotice.tsx index da9722d63b..d19f0fd762 100644 --- a/src/components/Notice/TransactionNotice/WithdrewLockedTokensNotice.tsx +++ b/src/components/Notice/TransactionNotice/WithdrewLockedTokensNotice.tsx @@ -39,7 +39,7 @@ const WithdrewLockedTokensNotice = ({ data-test-id={TEST_ID.NOTICE_WITHDREW_LOCKED_TOKENS} >
- + {isFailed ? (