fix: recovery event coverage, decoder test, transfer_from doc, validation reference stability - #731
Merged
abore9769 merged 1 commit intoSep 1, 2026
Conversation
…tion reference stability - Add a unit test asserting rwa-token's recover() emits rcv_exe with the old/new admin (event emission itself was already wired up). - Add an eventParser rcv_exe decoder test to lock in the oldAdmin/newAdmin mapping (decoder itself was already correct). - Document that transfer_from intentionally allows spender == from. - Give useAmountValidation a small reference-stability cache so identical (value, decimals) inputs return the same result object across renders. Closes VERITOKEN-xx#670 Closes VERITOKEN-xx#671 Closes VERITOKEN-xx#672 Closes VERITOKEN-xx#673
|
@Realericky Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rwa-token'srecover()emitsrcv_exewith the old/new admin. Event emission itself (events::emit_recovery_executed) was already wired up inlib.rs/events.rs; this locks it in with a test per the acceptance criteria.eventParsertest for thercv_exedecoder to confirmoldAdmin/newAdminmapping. The decoder was already correct; the test was missing.transfer_fromthatspender == fromis an intentional, allowed pattern (no behavioral change).useAmountValidationa small reference-stability cache so identical(value, decimals)inputs return the same result object across renders, preventing unnecessary re-renders in components that pass the result down. (Note: the function is a plain helper, not a React hook with internal state, souseCallback/useMemoweren't usable directly — the existing test suite calls it outside a render context by design.)Test plan
cargo test -p rwa-token --features testutilsnpm testinsdknpm testinfrontendCloses #670
Closes #671
Closes #672
Closes #673