feat(disburse-maturity): allow disbursing to an address book entry#395
Draft
yhabib wants to merge 1 commit into
Draft
feat(disburse-maturity): allow disbursing to an address book entry#395yhabib wants to merge 1 commit into
yhabib wants to merge 1 commit into
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to 1fb0432. Security Overview
Detected Code Changes
|
Lets a neuron's available maturity be disbursed to any saved address in the user's address book, in addition to the existing "my accounts" flow. ICP entries pass through `toAccountIdentifier`; ICRC-1 entries are decoded and passed through `toAccount` (principal + subaccount). UX mirrors the Send ICP toggle: when the address book has entries, the modal defaults to the address-book picker; users can flip back to their own subaccounts at any time.
1fb0432 to
fd10a25
Compare
📊 Build Bundle StatsThe latest build generated the following assets: |
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.
Motivation
Disburse maturity today only targets the user's own accounts or subaccounts. The address book is already wired into the Send ICP flow, so reusing it here lets users disburse to any saved destination without retyping addresses.
Changes
useDisburseMaturityhook to accept either an ICP account identifier or an ICRC-1 account (principal + optional subaccount) as the destination.toAccountIdentifierand ICRC-1 entries through the structuredtoAccountparam on the governance canister call.decodeIcrcAccount.noDestinationerror string for when the toggle is on but no entry is picked.