Skip to content

fix: scope keyring send token to subject address - #9749

Open
n3ps wants to merge 3 commits into
mainfrom
n3ps/fix-non-evm-bridge
Open

fix: scope keyring send token to subject address#9749
n3ps wants to merge 3 commits into
mainfrom
n3ps/fix-non-evm-bridge

Conversation

@n3ps

@n3ps n3ps commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Explanation

Non-EVM keyring sends (especially Solana bridge source legs) often include movements for many parties. mapKeyringTransaction previously took the first movement in from.

When subjectAddress is provided, Send mapping now filters from to that address before selecting the token.

References

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

Note

Low Risk
Narrow change to activity display mapping for Send when subjectAddress is provided; no auth, persistence, or transaction execution impact.

Overview
Fixes incorrect send activity for multi-party keyring transactions (notably Solana bridge source legs) where activity showed another address’s token because mapping used the first from movement.

When subjectAddress is passed into mapKeyringTransaction, Send mapping now filters from to that address before choosing the outbound fungible token, so the listed asset matches what the user actually sent (e.g. SOL instead of a counterparty’s USDC). Behavior without subjectAddress is unchanged; Bitcoin’s to-side fallback is untouched.

Adds a Solana bridge fixture and regression test, plus an Unreleased changelog entry under Fixed.

Reviewed by Cursor Bugbot for commit 9c81416. Bugbot is set up for automated code reviews on this repo. Configure here.

@n3ps
n3ps marked this pull request as ready for review August 1, 2026 04:58
@n3ps
n3ps requested review from a team as code owners August 1, 2026 04:58
@n3ps
n3ps deployed to default-branch August 1, 2026 04:59 — with GitHub Actions Active
case KeyringTransactionType.Send: {
const fromToken = getToken(transaction.from, 'out');
const fromSubject = subjectAddress
? transaction.from.filter(({ address }) => address === subjectAddress)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Point of interest

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.

1 participant