From 8ad33991fa1df12ec55c356267ba8f87bfc383e0 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Mon, 9 Feb 2026 18:51:13 -0800 Subject: [PATCH] Add Nym mixnet warning card on send scene Show an animated warning card when Nym mixnet is active and the transaction is loading, informing the user that the privacy routing may cause the transaction to take a minute or longer. --- CHANGELOG.md | 1 + src/components/scenes/SendScene2.tsx | 25 +++++++++++++++++++++++++ src/locales/en_US.ts | 2 ++ src/locales/strings/enUS.json | 2 ++ 4 files changed, 30 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b6bda9efd8..59ed37be620 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - added: Nym (NYM) wallet support - added: opBNB (BNB) support - added: Register SwapKit V3 as a separate exchange plugin +- added: Warning card on send scene when Nym mixnet is active and transaction is loading - changed: Manage tokens scene saves changes on explicit save instead of live toggling - changed: Unify split wallet scene titles and add chain-specific descriptions for EVM and UTXO splits - fixed: Missing 2-factor approve / deny scene on login diff --git a/src/components/scenes/SendScene2.tsx b/src/components/scenes/SendScene2.tsx index c417bd5c84c..8173ff846c6 100644 --- a/src/components/scenes/SendScene2.tsx +++ b/src/components/scenes/SendScene2.tsx @@ -1,4 +1,5 @@ import { abs, add, div, gte, lt, lte, mul, sub } from 'biggystring' +import { asMaybe } from 'cleaners' import { asMaybeInsufficientFundsError, asMaybeNoAmountSpecifiedError, @@ -100,6 +101,7 @@ import type { ExchangedFlipInputAmounts, ExchangeFlipInputFields } from '../themed/ExchangedFlipInput2' +import { asPrivateNetworkingSetting } from '../themed/MaybePrivateNetworkingSetting' import { PinDots } from '../themed/PinDots' import { SafeSlider } from '../themed/SafeSlider' import { SendFromFioRows } from '../themed/SendFromFioRows' @@ -280,6 +282,10 @@ const SendComponent = (props: Props): React.ReactElement => { const coreWallet = currencyWallets[walletId] const { pluginId, memoOptions = [] } = coreWallet.currencyInfo + const userSettings = useWatch(coreWallet.currencyConfig, 'userSettings') + const isNymActive = + asMaybe(asPrivateNetworkingSetting)(userSettings)?.networkPrivacy === 'nym' + // Initialize `spendInfo` from route params, including possible memos const [spendInfo, setSpendInfo] = useState(() => { if (initSpendInfo == null) return { tokenId: null, spendTargets: [{}] } @@ -1166,6 +1172,24 @@ const SendComponent = (props: Props): React.ReactElement => { ) } + const renderNymWarning = (): React.ReactElement | null => { + if (!isNymActive || !processingAmountChanged) return null + + return ( + + + + ) + } + const recordFioObtData = async ( spendTarget: EdgeSpendTarget, currencyCode: string, @@ -1780,6 +1804,7 @@ const SendComponent = (props: Props): React.ReactElement => { {renderScamWarning()} {renderPendingTransactionWarning()} + {renderNymWarning()} {renderError()} {sliderTopNode} diff --git a/src/locales/en_US.ts b/src/locales/en_US.ts index e274ddf1b8f..8bce98c9fad 100644 --- a/src/locales/en_US.ts +++ b/src/locales/en_US.ts @@ -572,6 +572,8 @@ const strings = { settings_network_privacy_nym_mixnet: 'Nym Mixnet', settings_privacy_settings: 'Privacy Settings', settings_nym_mixnet_title: 'Nym Mixnet', + settings_nym_mixnet_warning_title: 'Nym mixnet on', + settings_nym_mixnet_warning_body: `Protecting your privacy\u2014transaction can take a minute or longer before it's ready to broadcast.`, settings_nym_mixnet_description: 'The Nym mixnet encrypts and routes your internet traffic through a decentralized network of nodes to obfuscate your data and IP address. Note that use of the mixnet may slow down network traffic and delay accurate balances and transactions. Select which services to use with the mixnet:', settings_hours: 'Hour(s)', diff --git a/src/locales/strings/enUS.json b/src/locales/strings/enUS.json index d3ce2839f27..b36ed6c1ad3 100644 --- a/src/locales/strings/enUS.json +++ b/src/locales/strings/enUS.json @@ -421,6 +421,8 @@ "settings_network_privacy_nym_mixnet": "Nym Mixnet", "settings_privacy_settings": "Privacy Settings", "settings_nym_mixnet_title": "Nym Mixnet", + "settings_nym_mixnet_warning_title": "Nym mixnet on", + "settings_nym_mixnet_warning_body": "Protecting your privacy—transaction can take a minute or longer before it's ready to broadcast.", "settings_nym_mixnet_description": "The Nym mixnet encrypts and routes your internet traffic through a decentralized network of nodes to obfuscate your data and IP address. Note that use of the mixnet may slow down network traffic and delay accurate balances and transactions. Select which services to use with the mixnet:", "settings_hours": "Hour(s)", "settings_minutes": "Minute(s)",