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/__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 => { } } + // 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/components/themed/SafeSlider.tsx b/src/components/themed/SafeSlider.tsx index 323a936858c..fee207677af 100644 --- a/src/components/themed/SafeSlider.tsx +++ b/src/components/themed/SafeSlider.tsx @@ -120,6 +120,7 @@ export const SafeSlider: React.FC = props => {