Repository navigation
feat(stellar): add QR code payment requests for in-person checkout - #1874
github-actions[bot] merged 1 commit into
Conversation
|
@JohnMabas Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 38796681 | Triggered | Generic Password | 1c347f7 | backend/services/stellar/tests/qrPaymentService.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Summary
Implements SEP-0007 QR code payment requests for in-person checkout, closing #1714.
In-person payments currently require manual Stellar address entry. This PR generates standard
web+stellar:payURIs (SEP-0007) and encodes them as base64 data-URIs that any Stellar wallet can scan.What was built
backend/services/stellar/qrPaymentService.tsQRPaymentService— creates, stores, and validates QR payment requests; injectable store and clock for testabilitybuildSep007Uri()builds a fully spec-compliant SEP-0007 URI withdestination,amount,asset_code,asset_issuer,memo, andnetwork_passphrase; XLM (native) requests omit asset fields per the specencodeURIComponent), not form-encoded, so wallets like Freighter, Lobstr, and LOBSTR parse them correctlytestnetandmainnetis always embedded in the URIbuildQrDataUri()base64-encodes the URI into adata:text/plain;base64,…string; the client decodes and renders it with any QR library or canvas API — no server-side QR dependency neededvalidatePaymentRequestQRPaymentStoreinterface +InMemoryQRPaymentStorebackend/services/stellar/__tests__/qrPaymentService.test.tsAcceptance criteria
Testing
All 27 tests pass.
Closes #1714