Skip to content

fix(tron-wallet-snap): stop wrapping submitRequest response in v1 KeyringResponse envelope - #105

Merged
hmalik88 merged 5 commits into
mainfrom
hm/fix-tron-submit-request
Aug 4, 2026
Merged

fix(tron-wallet-snap): stop wrapping submitRequest response in v1 KeyringResponse envelope#105
hmalik88 merged 5 commits into
mainfrom
hm/fix-tron-submit-request

Conversation

@hmalik88

@hmalik88 hmalik88 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Explanation

  • submitRequest in handlers/keyring/keyring.ts was returning { pending: false, result: Json }, the v1 KeyringResponse envelope, instead of raw Json
  • Keyring API v2's SnapKeyring.submitRequest() calls the snap directly and expects unwrapped Json back; passing the envelope through meant callers received the wrapper object instead of the actual signing result
  • Changed return type from Promise<KeyringResponse>Promise<Json>, removed the KeyringResponse import, updated 2 test assertions accordingly

Test plan

  • yarn workspace @metamask/tron-wallet-snap run test
  • Verify Tron Sign Message e2e in the extension passes once a preview build from this branch is bumped in the extension PR

References

N/A

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@hmalik88 hmalik88 changed the title Hm/fix tron submit request fix(tron-wallet-snap): stop wrapping submitRequest response in v1 KeyringResponse envelope Aug 4, 2026
@hmalik88
hmalik88 marked this pull request as ready for review August 4, 2026 13:18
@hmalik88
hmalik88 requested a review from a team as a code owner August 4, 2026 13:18
@hmalik88

hmalik88 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/bitcoin-wallet-snap@2.0.0-preview-e3b05f64
@metamask-previews/snap-networks-utils@0.0.0-preview-e3b05f64
@metamask-previews/tron-wallet-snap@2.0.0-preview-e3b05f64

@stanleyyconsensys stanleyyconsensys left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hmalik88
hmalik88 added this pull request to the merge queue Aug 4, 2026
Merged via the queue into main with commit 5055f89 Aug 4, 2026
50 checks passed
@hmalik88
hmalik88 deleted the hm/fix-tron-submit-request branch August 4, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants