fix: marinade multisig dapp requests by preserving original message bytes - #156
Merged
Conversation
taran-a
force-pushed
the
fix/marinade-multisig-messages
branch
from
August 17, 2026 13:29
15b6cf8 to
cb532d8
Compare
taran-a
force-pushed
the
fix/marinade-multisig-messages
branch
2 times, most recently
from
August 18, 2026 09:14
62574dd to
c5b54f0
Compare
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
taran-a
force-pushed
the
fix/marinade-multisig-messages
branch
3 times, most recently
from
August 24, 2026 15:11
ac83f38 to
682b0a7
Compare
Battambang
reviewed
Aug 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates @metamask/solana-wallet-snap transaction signing for external (dapp) origins to preserve the original transaction/message bytes during partial signing, which is necessary for multisig workflows that depend on an unchanged signing payload.
Changes:
- Add an origin-based switch in
WalletServiceto request message-byte preservation for non-MetaMask origins when signing / signing+sending. - Extend
Signer.partiallySignBase64Stringwith apreserveMessageBytesflag and add a codec path to wrap bare compiled message bytes into aTransactionshape without alteringmessageBytes. - Add/extend Jest coverage for codec decoding and byte-preservation behavior; update snap manifest
shasumand changelog.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/solana-wallet-snap/src/core/services/wallet/WalletService.ts | Passes an origin-derived preserveMessageBytes flag into the signer for sign + signAndSend flows. |
| packages/solana-wallet-snap/src/core/services/wallet/WalletService.test.ts | Adds assertions that MetaMask origin does not request preservation, while dapp origins do. |
| packages/solana-wallet-snap/src/core/services/signer/Signer.ts | Implements the preservation path by decoding to a Transaction directly and signing without message mutation. |
| packages/solana-wallet-snap/src/core/services/signer/Signer.test.ts | Adds coverage asserting messageBytes are preserved when requested. |
| packages/solana-wallet-snap/src/core/sdk-extensions/codecs.ts | Adds decoding for compiled message bytes into a Transaction shape and a new “unknown base64 → transaction” helper. |
| packages/solana-wallet-snap/src/core/sdk-extensions/codecs.test.ts | Adds tests for compiled-message wrapping and full-transaction decode without changing bytes. |
| packages/solana-wallet-snap/snap.manifest.json | Updates bundle shasum to match the new build output. |
| packages/solana-wallet-snap/CHANGELOG.md | Adds an Unreleased entry documenting the behavioral change. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
taran-a
force-pushed
the
fix/marinade-multisig-messages
branch
from
August 25, 2026 10:31
1495a1c to
1dda959
Compare
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
Fixes multisig dapp transaction signing by preserving the original transaction payload for external dapp origins.
References
Checklist