Repository navigation
[Security] SendTokensScreen sends an irreversible Stellar payment on a single button tap — no confirmation step #149
Description
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
- The confirmation dialog must display a human-readable truncated destination (not the full 56-char key) alongside the full amount and asset.
Alert.alertis async (callback-based) — the existinguseCallbackpattern must be preserved;handleSendshould become a two-stage function or use a localconfirmedstate.- The existing
SendTokensScreentest coverage is zero (issue [Testing] Zero test coverage forSendTokensScreen— payment signing and Lobstr delegation #82 is open) — add the confirmation tests as part of this issue or coordinate with [Testing] Zero test coverage forSendTokensScreen— payment signing and Lobstr delegation #82. - Lobstr path: the Lobstr pay URI also has no in-app confirmation. The alert must appear before
openLobstrForPaymentis called.
Acceptance Criteria
- A confirmation
Alertappears after input validation with: truncated destination, full amount, asset name. - "Cancel" dismisses the alert and resets
isSendingtofalse. - "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—handleSendsrc/services/stellar.ts—signAndSubmitPaymentsrc/services/lobstr.ts—openLobstrForPayment
Out of scope
- Implementing a dedicated "Review Transaction" screen (the
Alertis sufficient for v0.3). - Fee estimation display.
Activity
devprom6 commentedon Aug 28, 2026
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.
grantfox-oss commentedon Aug 28, 2026
🦊 GrantFox — @devprom6 has been assigned to this issue as part of the Third Campaign campaign!
Next steps:
Closes #149)Good luck! Track your progress on GrantFox.
grantfox-oss commentedon Aug 28, 2026
🎉 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.