From 8ce8adbec0f7929d36907792cb34c51e166f5d8b Mon Sep 17 00:00:00 2001 From: Jonathan Tzeng Date: Wed, 24 Jun 2026 16:55:52 -0700 Subject: [PATCH 1/2] Add zero-amount send warning for EVM chains Sending a zero amount on Ethereum and other EVM chains is allowed but still spends gas, and users have accidentally done so. Confirm the user's intent with a warning modal before broadcasting a zero-amount send on any EVM coin or token. Other chains are unaffected since they already disable the slider for zero amounts. --- CHANGELOG.md | 1 + src/components/scenes/SendScene2.tsx | 26 ++++++++++++++++++++++++++ src/locales/en_US.ts | 3 +++ src/locales/strings/enUS.json | 2 ++ 4 files changed, 32 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12fe47fb7f1..653418be7c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased (develop) +- added: Warning confirmation when sending a zero amount on EVM chains, since the transaction still spends gas. - added: Remote enable/disable of gift card providers via the info server's giftCardInfo config, supporting whole-provider disabling for Phaze and Bitrefill and per-brand disabling for Phaze. ## 4.49.0 (staging) diff --git a/src/components/scenes/SendScene2.tsx b/src/components/scenes/SendScene2.tsx index 58aa9578ff5..64cab87771a 100644 --- a/src/components/scenes/SendScene2.tsx +++ b/src/components/scenes/SendScene2.tsx @@ -1287,6 +1287,32 @@ const SendComponent: React.FC = props => { } } + // EVM chains broadcast zero-amount transactions, which still spend gas. + // Other chains disable the slider for zero amounts (unless allowZeroTx), + // so this confirmation only surfaces for EVM coin and token sends. + if ( + isEvmWallet(coreWallet) && + spendInfo.spendTargets.every(target => zeroString(target.nativeAmount)) + ) { + const answer = await Airship.show<'continue' | 'cancel' | undefined>( + bridge => ( + + ) + ) + if (answer !== 'continue') { + resetSlider() + return + } + } + try { if (beforeTransaction != null) await beforeTransaction() } catch (e: unknown) { diff --git a/src/locales/en_US.ts b/src/locales/en_US.ts index 18137a8f612..f7404e7f976 100644 --- a/src/locales/en_US.ts +++ b/src/locales/en_US.ts @@ -479,6 +479,9 @@ const strings = { send_confirmation_calculating_fee: 'Calculating Fee', send_confirmation_slide_to_confirm: 'Slide to Confirm', send_confirmation_balance: 'Balance', + send_confirmation_zero_amount_title: 'Send Zero Amount?', + send_confirmation_zero_amount_message: + "You're about to send a transaction with a zero amount. Network fees (gas) will still be charged. Are you sure you want to continue?", send_confirmation_algo_recipient_not_activated_s: 'Recipient must first activate %1$s before they can receive funds.', send_confirmation_eos_error_cpu: diff --git a/src/locales/strings/enUS.json b/src/locales/strings/enUS.json index 3c0b1513f56..fd32a4e3f7b 100644 --- a/src/locales/strings/enUS.json +++ b/src/locales/strings/enUS.json @@ -339,6 +339,8 @@ "send_confirmation_calculating_fee": "Calculating Fee", "send_confirmation_slide_to_confirm": "Slide to Confirm", "send_confirmation_balance": "Balance", + "send_confirmation_zero_amount_title": "Send Zero Amount?", + "send_confirmation_zero_amount_message": "You're about to send a transaction with a zero amount. Network fees (gas) will still be charged. Are you sure you want to continue?", "send_confirmation_algo_recipient_not_activated_s": "Recipient must first activate %1$s before they can receive funds.", "send_confirmation_eos_error_cpu": "Insufficient CPU available to send EOS transaction. Please wait 1-3 days for CPU to recharge.", "send_confirmation_eos_error_net": "Insufficient NET available to send EOS transaction. Please wait 1-3 days for NET to recharge.", From 74c96e0e43992f6248682f778e59c0bc6459686a Mon Sep 17 00:00:00 2001 From: Jonathan Tzeng Date: Wed, 24 Jun 2026 17:00:43 -0700 Subject: [PATCH 2/2] test: add confirmSliderThumb testID for maestro selectors --- .../modals/__snapshots__/AccelerateTxModal.test.tsx.snap | 1 + .../scenes/__snapshots__/SendScene2.ui.test.tsx.snap | 9 +++++++++ .../__snapshots__/SwapConfirmationScene.test.tsx.snap | 1 + src/components/themed/SafeSlider.tsx | 1 + 4 files changed, 12 insertions(+) diff --git a/src/__tests__/modals/__snapshots__/AccelerateTxModal.test.tsx.snap b/src/__tests__/modals/__snapshots__/AccelerateTxModal.test.tsx.snap index 2c36f977410..e1503ee0bf6 100644 --- a/src/__tests__/modals/__snapshots__/AccelerateTxModal.test.tsx.snap +++ b/src/__tests__/modals/__snapshots__/AccelerateTxModal.test.tsx.snap @@ -619,6 +619,7 @@ exports[`AccelerateTxModalComponent should render with loading props 1`] = ` }, ] } + testID="confirmSliderThumb" > = props => {