Repository navigation
fix(stellar): fix onAmountInput to accept optional destination as toAddress instead of to - #558
Merged
Merged
Conversation
stanleyyconsensys
temporarily deployed
to
default-branch
November 5, 2026 02:41 — with
GitHub Actions
Inactive
to to toAddressonAmountInput to accept optional destination as toAddress instead of to
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The changelog lacks a breaking-change notice and migration guidance explaining that the strict parameter schema now rejects to, requiring consumers to rename it to toAddress or omit it.
1 open issue
What changed in this PR
Updates Stellar’s onAmountInput request schema to accept the optional destination as toAddress instead of to, while preserving self-transfer preflight validation.
Changes:
- Renames the optional destination field in the request schema and tests.
- Aligns documentation and handler JSDoc with
toAddress. - Adds a changelog entry for the correction.
| File | Description |
|---|---|
packages/stellar-wallet-snap/src/handlers/clientRequest/onAmountInput.ts |
Updates JSDoc only to name toAddress. |
packages/stellar-wallet-snap/src/handlers/clientRequest/onAmountInput.test.ts |
Updates fixtures and the ignored-destination test. |
packages/stellar-wallet-snap/src/handlers/clientRequest/api.ts |
Renames the optional request field to toAddress. |
packages/stellar-wallet-snap/src/handlers/clientRequest/api.test.ts |
Updates the schema-validation fixture. |
packages/stellar-wallet-snap/docs/use-cases/client-request/onAmountInput.md |
Updates parameter documentation and the sequence diagram. |
packages/stellar-wallet-snap/CHANGELOG.md |
Records the destination-parameter correction. |
Review effort: Balanced
|
stanleyyconsensys
enabled auto-merge
November 5, 2026 02:56
arafetbenmakhlouf
approved these changes
Nov 5, 2026
This was referenced Nov 6, 2026
Merged
LabinatorSolutions
pushed a commit
to LabinatorSolutions/metamask-extension
that referenced
this pull request
Nov 7, 2026
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Bumps the Solana, Stellar, and Tron wallet snaps to the versions released in internal-snaps `22.0.0`: - `@metamask/solana-wallet-snap`: `^7.2.0` → `^7.3.0` - `@metamask/stellar-wallet-snap`: `^2.0.0` → `^2.1.0` - `@metamask/tron-wallet-snap`: `^4.3.1` → `^4.4.0` All three are backwards-compatible minor updates; no application code changes are required. ### @metamask/solana-wallet-snap 7.3.0 - Remove the temporary fallback that injected `https://metamask.io` as the request origin when `keyring_submitRequest` was called without one ([MetaMask#533](MetaMask/internal-snaps#533)). ### @metamask/stellar-wallet-snap 2.1.0 - `confirmSend` now throws when signing or submission fails after the user confirms, instead of returning a JSON error response ([MetaMask#550](MetaMask/internal-snaps#550)). - Bump `@stellar/stellar-sdk` from `^17.2.1` to `^17.4.0` ([MetaMask#545](MetaMask/internal-snaps#545)). - Retry transient Token API, Price API, Security Alerts API, RPC, and Horizon failures with bounded timeouts and circuit breaking ([MetaMask#534](MetaMask/internal-snaps#534), [MetaMask#551](MetaMask/internal-snaps#551)). - Fix `onAmountInput` to accept the optional destination as `toAddress` instead of `to` ([MetaMask#558](MetaMask/internal-snaps#558)). ### @metamask/tron-wallet-snap 4.4.0 - Support `VoteWitnessContract` and `AccountPermissionUpdateContract` transactions by upgrading TronWeb to 6.5.1 ([MetaMask#561](MetaMask/internal-snaps#561)). - Align transaction security warning copy and scan-loading behavior with user preferences ([MetaMask#557](MetaMask/internal-snaps#557)). ## **Changelog** CHANGELOG entry: null ## **Related issues** n/a ## **Manual testing steps** n/a ## **Screenshots/Recordings** ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [X] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [X] I've completed the PR template to the best of my ability - [X] I’ve included tests if applicable - [X] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [X] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
anxolin
pushed a commit
to anxolin/internal-snaps
that referenced
this pull request
Nov 7, 2026
## Explanation This release branch prepares version `22.0.0`. It contains: - `@metamask/solana-wallet-snap` `7.2.0` → `7.3.0` (minor: remove obsolete `https://metamask.io` origin fallback) - `@metamask/stellar-wallet-snap` `2.0.0` → `2.1.0` (minor: fetch policy for RPC, Horizon and HTTP clients, `@stellar/stellar-sdk` upgrade, `onAmountInput` `toAddress` fix, `confirmSend` now throws after confirmation failures) - `@metamask/tron-wallet-snap` `4.3.1` → `4.4.0` (minor: `VoteWitnessContract` and `AccountPermissionUpdateContract` support via TronWeb 6.5.1, security warning copy and scan-loading alignment) - Root monorepo version bumped to `22.0.0` ## References - `@metamask/solana-wallet-snap`: [MetaMask#533](MetaMask#533) - `@metamask/stellar-wallet-snap`: [MetaMask#550](MetaMask#550), [MetaMask#545](MetaMask#545), [MetaMask#534](MetaMask#534), [MetaMask#551](MetaMask#551), [MetaMask#558](MetaMask#558) - `@metamask/tron-wallet-snap`: [MetaMask#561](MetaMask#561), [MetaMask#557](MetaMask#557) ## Checklist - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/internal-snaps/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/internal-snaps/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them
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.




Explanation
this PR
the client doesnt need to change anything
becoz it never pass the param to the handler
References
Checklist