Repository navigation
Conversation
The fetch_nonces_into_address_map function was returning the current nonce instead of the next nonce (current + 1), causing identity_create_from_addresses to send stale nonces to the platform. Extract merge/validation logic into a separate pure function (merge_nonces_into_inputs) and add unit tests covering: - nonce increment by 1 (the core bug fix) - zero nonce edge case - multiple addresses - exact balance boundary - insufficient balance error - missing address error - empty inputs Closes #3083 https://claude.ai/code/session_01JeHE8B4EuVocsryg6AFZYs
…test The fetch_nonces_into_address_map function was returning the current nonce instead of the next nonce (current + 1), causing identity_create_from_addresses to send stale nonces to the platform. Add an SDK mock-based test that exercises the full fetch_nonces_into_address_map function through the mock layer, verifying that returned nonces are incremented by 1 for each input address. Closes #3083 https://claude.ai/code/session_01JeHE8B4EuVocsryg6AFZYs
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR fixes a bug in the WASM SDK where Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ude/add-pr-review-tests-23bHI
9903eb0
into
fix/wasm-sdk-identity-create-nonce-off-by-one
…hpay#3087) Co-authored-by: Claude <[email protected]>
The fetch_nonces_into_address_map function was returning the current
nonce instead of the next nonce (current + 1), causing
identity_create_from_addresses to send stale nonces to the platform.
Extract merge/validation logic into a separate pure function
(merge_nonces_into_inputs) and add unit tests covering:
https://claude.ai/code/session_01JeHE8B4EuVocsryg6AFZYs
Summary by CodeRabbit
Bug Fixes
Chores