PR comments

- Fix addressing concern around unbonding
- Amend existing tests to reflect this
This commit is contained in:
Tommy Verrall
2026-06-08 13:20:15 +02:00
parent d609d30f3a
commit f7fbf942f9
4 changed files with 5 additions and 5 deletions
@@ -603,7 +603,7 @@ pub(crate) fn delegation_mixnode_is_unbonding(
) -> Option<bool> {
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);
}
}
@@ -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' },
@@ -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);
@@ -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,
};