Fix muxed transaction history + disallow send to self#2863
Conversation
|
PR Preview build is ready: https://github.com/stellar/freighter/releases/tag/untagged-d16f548dc5d597944133 (SDF collaborators only — install instructions in the release description) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71bedfe58b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…x/muxed-address-history
…r/freighter into fix/muxed-address-history
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1115702e95
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // Exclude any recent address that resolves to the active account (including | ||
| // its muxed M... forms) - you can't send to yourself. | ||
| const visibleRecentAddresses = cachedRecentAddressesRef.current | ||
| .filter((address) => !isSameAccount(address, activePublicKey)) |
There was a problem hiding this comment.
Normalize federation recents before allowing selection
When a recent entry is a federation address, this filter does not resolve it, so a saved/reassigned federation address that resolves to the active G account remains visible even though the new self-send guard is meant to block it. The recent-address click path then resolves the address with getAddressFromInput(address) and calls handleContinue(...) regardless of fetchData returning/dispatching the "You cannot send to yourself" error, so selecting that recent bypasses the new protection. Pre-resolve/filter federation recents or gate handleContinue on a successful validated fetch result.
Useful? React with 👍 / 👎.
| "Authorizations": "Authorizations", | ||
| "Authorize": "Authorize", | ||
| "Authorized address": "Authorized address", | ||
| "Auto-lock timer": "Auto-lock timer", |
There was a problem hiding this comment.
translation was apparently missing from on the previous PR. so the commit rules added it. if I remove manually, it adds them back again before pushing
Closes #2841
Small PR, same as stellar/freighter-mobile#893 to fix the logic for checking the base addresses of send/received history, amounts sent to your muxed address are properly classified
Before:
After:


Regression test:

