From 657b4cbbd44ff4d6491f0b619563267907f892e7 Mon Sep 17 00:00:00 2001 From: blacktoast Date: Fri, 14 Feb 2025 10:21:39 +0900 Subject: [PATCH] [feat] run useChangeSenderAddressWhenEtherMintChainSendToHexAddress only sendType is send --- apps/extension/src/pages/send/amount/index.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/extension/src/pages/send/amount/index.tsx b/apps/extension/src/pages/send/amount/index.tsx index e7a8015405..374024c0a8 100644 --- a/apps/extension/src/pages/send/amount/index.tsx +++ b/apps/extension/src/pages/send/amount/index.tsx @@ -259,10 +259,11 @@ function useChangeSenderAddressWhenEtherMintChainSendToHexAddress( isEVMOnlyChain: boolean, account: AccountSetBase & CosmosAccount & CosmwasmAccount & SecretAccount, setIsEvmTx: React.Dispatch>, - ethereumAccount: EthereumAccountBase + ethereumAccount: EthereumAccountBase, + sendType: SendType ) { useEffect(() => { - if (isEvmChain) { + if (isEvmChain && sendType === "send") { const sendingDenomHelper = new DenomHelper( sendConfigs.amountConfig.currency.coinMinimalDenom ); @@ -608,7 +609,8 @@ export const SendAmountPage: FunctionComponent = observer(() => { isEVMOnlyChain, account, setIsEvmTx, - ethereumAccount + ethereumAccount, + sendType ); useEffect(() => {