From 24bca935545a26978fd92cd8effd8e9b33e3cdba Mon Sep 17 00:00:00 2001 From: j0ntz Date: Wed, 15 Apr 2026 11:02:54 -0700 Subject: [PATCH 1/2] Fix lint warnings in StakeModifyScene --- src/components/scenes/Staking/StakeModifyScene.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/scenes/Staking/StakeModifyScene.tsx b/src/components/scenes/Staking/StakeModifyScene.tsx index 6c8fe07b241..053a5fe5e97 100644 --- a/src/components/scenes/Staking/StakeModifyScene.tsx +++ b/src/components/scenes/Staking/StakeModifyScene.tsx @@ -69,7 +69,7 @@ interface Props extends EdgeAppSceneProps<'stakeModify'> { wallet: EdgeCurrencyWallet } -const StakeModifySceneComponent = (props: Props): React.ReactElement => { +const StakeModifySceneComponent: React.FC = props => { const { navigation, route, wallet } = props const { modification, title, stakePlugin, stakePolicy } = route.params const dispatch = useDispatch() From b21d0a9b1e95b726615759c16814edf8515793b0 Mon Sep 17 00:00:00 2001 From: j0ntz Date: Wed, 15 Apr 2026 11:04:53 -0700 Subject: [PATCH 2/2] Show Nym mixnet warning in stake/unstake/claim scenes --- CHANGELOG.md | 1 + .../scenes/Staking/StakeModifyScene.tsx | 31 ++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cebd5c2676e..e680084d384 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased (develop) - added: Show swap KYC/terms modal for NExchange +- added: Nym mixnet warning in Stake, Unstake, and Claim Rewards scenes - changed: Migrate Thorchain Savers and Thorchain Yield endpoints off NineRealms to gateway.liquify.com. ## 4.48.0 (staging) diff --git a/src/components/scenes/Staking/StakeModifyScene.tsx b/src/components/scenes/Staking/StakeModifyScene.tsx index 053a5fe5e97..092c7760b95 100644 --- a/src/components/scenes/Staking/StakeModifyScene.tsx +++ b/src/components/scenes/Staking/StakeModifyScene.tsx @@ -1,4 +1,5 @@ import { div, eq, gt, toFixed } from 'biggystring' +import { asMaybe } from 'cleaners' import { DustSpendError, type EdgeCurrencyWallet, @@ -12,6 +13,7 @@ import { sprintf } from 'sprintf-js' import { updateStakingPosition } from '../../../actions/scene/StakingActions' import { useAsyncEffect } from '../../../hooks/useAsyncEffect' import { useDisplayDenom } from '../../../hooks/useDisplayDenom' +import { useWatch } from '../../../hooks/useWatch' import { lstrings } from '../../../locales/strings' import { type ChangeQuote, @@ -35,8 +37,10 @@ import { getPositionAllocations } from '../../../util/stakeUtils' import { zeroString } from '../../../util/utils' +import { AlertCardUi4 } from '../../cards/AlertCard' import { EdgeCard } from '../../cards/EdgeCard' import { WarningCard } from '../../cards/WarningCard' +import { EdgeAnim } from '../../common/EdgeAnim' import { SceneWrapper } from '../../common/SceneWrapper' import { withWallet } from '../../hoc/withWallet' import { SceneContainer } from '../../layout/SceneContainer' @@ -52,6 +56,7 @@ import { Airship, showError } from '../../services/AirshipInstance' import { cacheStyles, type Theme, useTheme } from '../../services/ThemeContext' import { Alert } from '../../themed/Alert' import { EdgeText } from '../../themed/EdgeText' +import { asPrivateNetworkingSetting } from '../../themed/MaybePrivateNetworkingSetting' import { SafeSlider } from '../../themed/SafeSlider' import { CryptoFiatAmountTile } from '../../tiles/CryptoFiatAmountTile' import { EditableAmountTile } from '../../tiles/EditableAmountTile' @@ -94,6 +99,10 @@ const StakeModifySceneComponent: React.FC = props => { const guiExchangeRates = useSelector(state => state.exchangeRates) const nativeAssetDenomination = useDisplayDenom(wallet.currencyConfig, null) + const userSettings = useWatch(wallet.currencyConfig, 'userSettings') + const isNymActive = + asMaybe(asPrivateNetworkingSetting)(userSettings)?.networkPrivacy === 'nym' + // ChangeQuote that gets rendered in the rows const [changeQuote, setChangeQuote] = React.useState(null) const changeQuoteAllocations = @@ -627,7 +636,7 @@ const StakeModifySceneComponent: React.FC = props => { return warningMessage == null ? null : ( = props => { ) } + const renderNymWarning = (): React.ReactElement | null => { + if (!isNymActive) return null + + return ( + + + + ) + } + const renderChangeQuoteAmountTiles = ( modification: ChangeQuoteRequest['action'] ): React.ReactElement => { @@ -741,6 +768,7 @@ const StakeModifySceneComponent: React.FC = props => { {renderChangeQuoteAmountTiles(modification)} {renderWarning()} + {renderNymWarning()} ({ marginTop: theme.rem(0.5) }, footer: { + marginTop: theme.rem(1), marginBottom: theme.rem(2) } }))