From 9e9bf8c5e06958dd97599c8152e9f7c77a45348d Mon Sep 17 00:00:00 2001 From: Bill He Date: Fri, 16 Feb 2024 14:21:36 -0800 Subject: [PATCH] address comments --- src/views/forms/AccountManagementForms/WithdrawForm.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/forms/AccountManagementForms/WithdrawForm.tsx b/src/views/forms/AccountManagementForms/WithdrawForm.tsx index e2ff2f4..1fa07fc 100644 --- a/src/views/forms/AccountManagementForms/WithdrawForm.tsx +++ b/src/views/forms/AccountManagementForms/WithdrawForm.tsx @@ -7,6 +7,7 @@ import { isAddress } from 'viem'; import { TransferInputField, TransferInputTokenResource, TransferType } from '@/constants/abacus'; import { AlertType } from '@/constants/alerts'; +import { AnalyticsEvent } from '@/constants/analytics'; import { ButtonSize } from '@/constants/buttons'; import { STRING_KEYS } from '@/constants/localization'; import { isMainnet } from '@/constants/networks'; @@ -57,7 +58,6 @@ import { TokenSelectMenu } from './TokenSelectMenu'; import { WithdrawButtonAndReceipt } from './WithdrawForm/WithdrawButtonAndReceipt'; import { validateCosmosAddress } from '@/lib/addressUtils'; import { track } from '@/lib/analytics'; -import { AnalyticsEvent } from '@/constants/analytics'; export const WithdrawForm = () => { const stringGetter = useStringGetter(); @@ -183,9 +183,9 @@ export const WithdrawForm = () => { requestPayload.data, isCctp ); - if (txHash) { - const nobleChainId = getNobleChainId(); - const toChainId = Boolean(exchange) ? nobleChainId : chainIdStr || undefined; + const nobleChainId = getNobleChainId(); + const toChainId = Boolean(exchange) ? nobleChainId : chainIdStr || undefined; + if (txHash && toChainId) { addTransferNotification({ txHash: txHash, type: TransferNotificationTypes.Withdrawal,