From f7fbf942f9a91ecdac2188a19e242e8c4c13a4af Mon Sep 17 00:00:00 2001 From: Tommy Verrall Date: Mon, 8 Jun 2026 13:20:15 +0200 Subject: [PATCH] PR comments - Fix addressing concern around unbonding - Amend existing tests to reflect this --- nym-wallet/src-tauri/src/operations/mixnet/delegate.rs | 4 ++-- nym-wallet/src/context/delegationQuery.test.ts | 2 +- nym-wallet/src/utils/unbondedDelegation.acceptance.test.ts | 2 +- nym-wallet/src/utils/unbondedDelegation.fixture.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nym-wallet/src-tauri/src/operations/mixnet/delegate.rs b/nym-wallet/src-tauri/src/operations/mixnet/delegate.rs index bc36a6a350..2f129d5569 100644 --- a/nym-wallet/src-tauri/src/operations/mixnet/delegate.rs +++ b/nym-wallet/src-tauri/src/operations/mixnet/delegate.rs @@ -603,7 +603,7 @@ pub(crate) fn delegation_mixnode_is_unbonding( ) -> Option { match node_details { Some(node) => Some(node.is_unbonding), - None => Some(true), + None => None, } } @@ -619,6 +619,6 @@ mod tests { delegation_node_identity(&None, EXAMPLE_MIX_ID), "unbonded:1234" ); - assert_eq!(delegation_mixnode_is_unbonding(&None), Some(true)); + assert_eq!(delegation_mixnode_is_unbonding(&None), None); } } diff --git a/nym-wallet/src/context/delegationQuery.test.ts b/nym-wallet/src/context/delegationQuery.test.ts index c06f6a3e3e..8893fcbea6 100644 --- a/nym-wallet/src/context/delegationQuery.test.ts +++ b/nym-wallet/src/context/delegationQuery.test.ts @@ -26,7 +26,7 @@ describe('fetchDelegationSummaryQuery', () => { node_identity: 'unbonded:42', amount: { amount: '1000000', denom: 'unym' }, unclaimed_rewards: { amount: '50000', denom: 'unym' }, - mixnode_is_unbonding: true, + mixnode_is_unbonding: null, }, ], total_delegations: { amount: '1000000', denom: 'unym' }, diff --git a/nym-wallet/src/utils/unbondedDelegation.acceptance.test.ts b/nym-wallet/src/utils/unbondedDelegation.acceptance.test.ts index d85f461974..c8ea17615e 100644 --- a/nym-wallet/src/utils/unbondedDelegation.acceptance.test.ts +++ b/nym-wallet/src/utils/unbondedDelegation.acceptance.test.ts @@ -28,7 +28,7 @@ describe('unbonded delegation wallet visibility acceptance', () => { const fixedRow = buildFixedUnbondedWalletDelegation(); expect(fixedRow.node_identity).toBe(`unbonded:${EXAMPLE_UNBONDED_MIX_ID}`); - expect(fixedRow.mixnode_is_unbonding).toBe(true); + expect(fixedRow.mixnode_is_unbonding).toBeNull(); expect(shouldHideDelegationFromList(fixedRow)).toBe(false); expect(filterVisibleDelegations([fixedRow])).toHaveLength(1); expect(isUndelegateOnlyDelegation(fixedRow)).toBe(true); diff --git a/nym-wallet/src/utils/unbondedDelegation.fixture.ts b/nym-wallet/src/utils/unbondedDelegation.fixture.ts index 5cdb9a949b..b158943950 100644 --- a/nym-wallet/src/utils/unbondedDelegation.fixture.ts +++ b/nym-wallet/src/utils/unbondedDelegation.fixture.ts @@ -37,7 +37,7 @@ export function buildFixedUnbondedWalletDelegation( cost_params: null, uses_vesting_contract_tokens: false, pending_events: [], - mixnode_is_unbonding: true, + mixnode_is_unbonding: null, historical_node_identity: options.historicalNodeIdentity ?? null, errors: null, };