feat: implement payment vault, account recovery, and multi-currency s… - #236
Merged
ScriptedBro merged 3 commits intoAug 31, 2026
Conversation
|
@Hydrax117 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! 🚀 |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Please fix conflicts |
Contributor
Author
|
resolved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: Payment Vault, Account Recovery & Multi-Currency Support
Issues
closes #112 — Multi-currency support for payments with automatic conversion and settlement
closes #109 — Account recovery mechanisms for wallet users
closes #110 — Secure payment method vault with tokenization
closes #111
Summary
This PR implements three major features across the gateway service and shared types package:
Changes
packages/types/src/payment.ts(new)PaymentMethod,TokenizationRequest/Response,VerificationResult,ThreeDSecureRequest/Result,NetworkTokenizationRequest/Response,AuditLogEntry,PCIComplianceSnapshotrecovery.ts(new)RecoveryConfig,RecoveryRequest,RecoveryAudit,GuardianVerificationChallenge, all request/response typesmulti-currency.ts(new)SupportedCurrency,FXRate,MultiCurrencyPayment,CurrencyExposure,CurrencySettlement, path/route typesindex.ts(modified)apps/backend/gateway/src/models/PaymentMethod.ts(new)PaymentAuditLog.ts(new)RecoveryConfig.ts(new)RecoveryRequest.ts(new)RecoveryAuditLog.ts(new)RecoveryChallenge.ts(new)SupportedCurrency.ts(new)FXRate.ts(new)MultiCurrencyPayment.ts(new)CurrencyExposure.ts(new)CurrencySettlement.ts(new)apps/backend/gateway/src/payment/validator.ts(new)service.ts(new)tokenizeCard,tokenizeBankAccount,tokenizeWallet,verifyPaymentMethod,listPaymentMethods,updatePaymentMethod,removePaymentMethodroutes.ts(new)middleware.ts(new)apps/backend/gateway/src/recovery/service.ts(new)createRecoveryConfig,addGuardian,initiateRecovery,processGuardianApproval,rejectRecovery,completeRecovery,getRecoveryProgress,isRecoverableroutes.ts(new)apps/backend/gateway/src/multi-currency/fxService.ts(new)getFXRate, Dijkstra path-finding (findConversionPath), batch refreshpaymentService.ts(new)createMultiCurrencyPayment,executePathPayment,completeMultiCurrencyPayment, exposure/settlement updatesroutes.ts(new)apps/backend/gateway/routes/payment.ts(new)/api/v1/payment-methodsrecovery.ts(new)/api/v1/recoverymulti-currency.ts(new)/api/v1/fxand/api/v1/payments/multi-currencyindex.ts(modified)apps/backend/gateway/src/errors.ts(modified)Added
success()andvalidationError()helpers to the shared error envelope, used by the new route handlers.database/migrations/021_payment_method_vault.sql(new)payment_methods,payment_audit_logs— unique indexes on token/fingerprint021_payment_method_vault.down.sql(new)022_account_recovery.sql(new)recovery_configs,recovery_requests,recovery_audit_logs,recovery_challenges022_account_recovery.down.sql(new)023_multi_currency.sql(new)supported_currencies,fx_rates,multi_currency_payments,currency_exposures,currency_settlements023_multi_currency.down.sql(new)README.md(modified)API Endpoints Added
Payment Vault (#110)
Account Recovery (#109)
Multi-Currency (#112)
Acceptance Criteria
#110 Payment Vault
#109 Account Recovery
#112 Multi-Currency
supported_currenciesregistryKYC,AML,SANCTIONS,REPORTING)Database Migrations
Testing
pnpm test --filter @delegolabs/gateway pnpm typecheck --filter @delegolabs/gateway pnpm typecheck --filter @delegolabs/typesNotes for Reviewers
pnpm-lock.yamlwas updated duringpnpm installafter node_modules were missing — no new runtime dependencies were added.fxService.tsare placeholder constants; the real oracle endpoints should be injected via environment variables before production deployment.executePathPayment) wires up the status transition and transaction hash; the actualStellarSdk.PathPaymentStrictSendcall should be integrated with the existing wallet service in a follow-up.