Skip to content

Score the fee-bump outer account, not just the inner transaction's destination #22

Description

@knytcomics-ui

Summary

extractDestination correctly unwraps FeeBumpTransaction.innerTransaction to find the payment destination (decodeTransaction.ts:39), but never considers the fee-bump's own fee-source account, which is a distinct trust signal.

Current Behavior / Relevant Code

  • src/decode/decodeTransaction.ts:39 -- tx.innerTransaction extraction discards parsed.feeSource entirely.

Why This Matters

Fee-bump sponsorship is an underused but real signal -- a dApp or third party silently sponsoring your transaction fee is exactly the kind of 'unusual signal' the 'Elevated' tier (README.md:43) is meant to catch, and today it's invisible.

Proposed Solution

  • When the parsed transaction is a FeeBumpTransaction, additionally capture parsed.feeSource and pass it through as supplementary context (surfaced in the popup at minimum, not necessarily scored the same way as a payment destination).
  • Add fixtures/tests for fee-bumped transactions with a fee source distinct from the transaction's own source account.

Acceptance Criteria

  • Fee-bump fee-source is captured and available to the popup/scoring layer.
  • Existing fee-bump destination-extraction behavior (inner tx) is unchanged and still tested.

Definition of Done

  • npm run lint, npm run typecheck, npm test, and npm run build all pass locally and in CI
  • New or changed behavior is covered by unit tests (and integration/E2E tests where the change touches interception, background messaging, or the popup)
  • Any user-facing or architectural change is reflected in README.md
  • No regressions to the existing test suite or existing tier/interception behavior

How to Claim This Issue (Application Process)

  1. Comment first. Post a short implementation plan on this issue — your proposed approach, the files you expect to touch, and any open questions — before writing code. This prevents duplicate effort and lets a maintainer flag concerns early, which matters especially for an issue at this complexity level.
  2. Wait for assignment. A maintainer will review your plan and assign the issue to you, typically within 48 hours. Please do not open a draft PR before you're assigned.
  3. Stay active. If there's no visible activity (commits or comments) for 10 days after assignment, the issue may be unassigned and reopened to other contributors.
  4. Submit a scoped PR. Reference this issue (Closes #<issue-number>), keep the diff scoped to the acceptance criteria above, and ensure all CI gates pass before requesting review.
  5. Engage with review. Respond to review feedback within a reasonable timeframe; PRs with no response after 7 days may be closed pending resubmission when you're ready to pick it back up.

Category: Transaction Decoding Coverage
Estimated effort: S (small, ~1-2 days)
Difficulty: Advanced — this issue assumes familiarity with the codebase's MV3 service-worker architecture, the Freighter interception protocol, and/or the Stellar SDK.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26advancedbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions