Skip to content

Fix muxed transaction history + disallow send to self#2863

Open
leofelix077 wants to merge 8 commits into
masterfrom
fix/muxed-address-history
Open

Fix muxed transaction history + disallow send to self#2863
leofelix077 wants to merge 8 commits into
masterfrom
fix/muxed-address-history

Conversation

@leofelix077

@leofelix077 leofelix077 commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

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

⚠️ Edit: The ticket became a bit bigger, with a point brought up by codex, that we allow sending to yourself, which is not allowed on mobile, so I added to this PR as well

Screenshot 2026-06-19 at 11 31 05 Simulator Screenshot - iPhone 17 Pro - 2026-06-19 at 11 33 19

Before:

Screenshot 2026-06-19 at 09 58 02 Screenshot 2026-06-19 at 09 58 21

After:
Screenshot 2026-06-19 at 09 46 35
Screenshot 2026-06-19 at 09 49 36

Regression test:
Screenshot 2026-06-19 at 09 47 19
Screenshot 2026-06-19 at 09 49 52

@leofelix077 leofelix077 self-assigned this Jun 19, 2026
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

PR Preview build is ready: https://github.com/stellar/freighter/releases/tag/untagged-d16f548dc5d597944133 (SDF collaborators only — install instructions in the release description)

@leofelix077 leofelix077 changed the title fix base address checks for muxed Fix muxed transaction history send / received logic Jun 19, 2026
@leofelix077 leofelix077 requested a review from piyalbasu June 19, 2026 13:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

@leofelix077 leofelix077 added the wip not for merging yet label Jun 19, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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",

@leofelix077 leofelix077 Jun 19, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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

@leofelix077 leofelix077 changed the title Fix muxed transaction history send / received logic Fix muxed transaction history + disallow send to self Jun 19, 2026
@leofelix077 leofelix077 requested a review from CassioMG June 19, 2026 14:54
@leofelix077 leofelix077 added bug Something isn't working and removed wip not for merging yet labels Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transaction history misclassifies payments/transfers received to a muxed (M...) address as sent

1 participant