Skip to content

[Security] SendTokensScreen sends an irreversible Stellar payment on a single button tap — no confirmation step #149

Closed

Description

@cybermax4200

Why this matters now

Token sending is a shipped feature powering real ECO / XLM payments. There is no confirmation dialog before signAndSubmitPayment or openLobstrForPayment is called. A single accidental tap, a mis-pasted address, or a wrong amount results in an irreversible on-chain transaction with no recourse. This is a UX-level security issue — the severity is higher than it first appears because in-app wallet users have no hardware confirmation step (unlike Ledger), and Lobstr's own confirmation dialog may be dismissed without reading.

Problem / What

src/screens/SendTokensScreen.tsx — handleSend:

const handleSend = useCallback(async () => {
  // validates inputs...
  setIsSending(true);
  try {
    // ... directly calls signAndSubmitPayment or openLobstrForPayment
    // No Alert.confirm or confirmation screen shown first
  }
}, [...]);

The fix is to show a confirmation Alert (React Native's Alert.alert with "Cancel" and "Confirm" buttons) after validation passes, displaying the destination, amount, and asset, before setIsSending(true) is called. For in-app wallets, the confirmation must appear before signPaymentXDR is called (signing is also irreversible in the sense that signed XDRs should not be left floating).

Key Challenges

Acceptance Criteria

  • A confirmation Alert appears after input validation with: truncated destination, full amount, asset name.
  • "Cancel" dismisses the alert and resets isSending to false.
  • "Confirm" proceeds to signing and submission.
  • Both the in-app wallet path and the Lobstr path show the confirmation.
  • Tests (can be added to the existing [Testing] Zero test coverage for SendTokensScreen — payment signing and Lobstr delegation #82 test file once that issue is worked): confirm dialog is shown, cancel aborts the send, confirm proceeds.

Relevant files / functions

  • src/screens/SendTokensScreen.tsx — handleSend
  • src/services/stellar.ts — signAndSubmitPayment
  • src/services/lobstr.ts — openLobstrForPayment

Out of scope

  • Implementing a dedicated "Review Transaction" screen (the Alert is sufficient for v0.3).
  • Fee estimation display.

Activity

  1. devprom6 commented on Aug 28, 2026

    @devprom6
    Contributor

    I’d like to work on this issue because it addresses an important area of the project and presents a great opportunity to make a meaningful contribution. I’m particularly interested in delivering a solution that is reliable, maintainable, and aligned with the project’s existing architecture and development standards.

    I have experience working across software development, including backend and frontend development, APIs, databases, testing, DevOps, and blockchain-based applications. I’m comfortable understanding existing codebases, identifying the root cause of issues, implementing clean and scalable solutions, and writing thorough tests to prevent regressions.

    My approach would be to first understand the existing implementation and project conventions, then develop the solution in a focused and incremental way. I’ll ensure the changes are well-tested, documented where necessary, and do not introduce unnecessary complexity or break existing functionality. I’m also committed to clear communication, responding to review feedback, and delivering a polished contribution that provides real value to the project.

  2. grantfox-oss commented on Aug 28, 2026

    @grantfox-oss

    🦊 GrantFox — @devprom6 has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #149)
    2. Your PR will be reviewed by the ecotask-network maintainers

    Good luck! Track your progress on GrantFox.

  3. grantfox-oss commented on Aug 28, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!

    @devprom6's PR #152 was approved and merged by @cybermax4200.

    🏆 @devprom6: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (557 total points). Track your full progress on GrantFox.

    👏 Great work, @devprom6! Keep contributing to ecotask-network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions