feat: implement multi-token payment method management with priority ordering#453
Merged
Smartdevs17 merged 3 commits intoMay 28, 2026
Merged
Conversation
- Tax rate lookup by jurisdiction (country, state, city) with hierarchical fallback - Tax-exempt customer handling with certificate validation and expiry checks - Mid-cycle tax rate change proration for existing subscriptions - Reverse-charge flagging and nexus threshold determination - Multi-jurisdiction: VAT, GST, sales tax, HST, PST, QST, digital services tax - Digital goods tax classification with country-specific rules - Tax remittance report generation with jurisdiction aggregation Contracts (Rust/Soroban): - types: Add TaxType, TaxJurisdiction, TaxRateEntry, CustomerTaxStatus, DigitalGoodsClass, TaxRemittanceLineItem types and 5 StorageKey variants - invoice: 11 new contract functions for full tax lifecycle + 10 test cases - subscription: Update generate_invoice signature with jurisdiction params - proxy: Fix StorageKey variant names for Soroban 32-char limit Backend (TypeScript): - TaxService with 17 built-in jurisdiction rates, caching, exemption validation - Nexus checks, mid-cycle proration, digital goods tax rules - Remittance report generation with filtering and grouping - 25 test cases covering all tax scenarios Frontend (React Native): - Extended Invoice types with TaxJurisdiction, CustomerTaxStatus, etc. - invoiceStore: Tax state management with 12 new actions
…rdering - Add PaymentMethod, PaymentPriority, TokenType, PaymentAttempt types - Implement PaymentMethodService for CRUD, validation, fallback, expiry - Add PaymentMethod store with persistent async storage per user - Add on-chain payment method contract module (Soroban) - Support automatic fallback on primary payment failure - Track payment method expiry and notify expiring methods - Handle edge cases: insufficient balance, gas price spikes, token contract upgrades
|
@Junman140 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! 🚀 |
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.
Closes #366
Summary
Implements a comprehensive multi-token payment method management system with priority ordering and automatic fallback.
Changes
TypeScript (Frontend)
Rust (Smart Contracts)
Edge Cases Handled
Acceptance Criteria