Skip to content

feat(#904): implement multi-chain subscription management with unified billing - #1065

Open
Prozaks wants to merge 1 commit into
Smartdevs17:mainfrom
Prozaks:feat/issue-904-multi-chain-subscription-management
Open

feat(#904): implement multi-chain subscription management with unified billing#1065
Prozaks wants to merge 1 commit into
Smartdevs17:mainfrom
Prozaks:feat/issue-904-multi-chain-subscription-management

Conversation

@Prozaks

@Prozaks Prozaks commented Aug 28, 2026

Copy link
Copy Markdown

Summary

Implements multi-chain subscription management with unified billing across Stellar and EVM chains.

Closes #904

Changes

New: src/services/multiChainSubscriptionService.ts

  • Chain bindings per subscription (chainType, chainId, tokenSymbol, walletAddress)
  • buildUnifiedStatement(): converts all chain charges into one currency using injected conversion rates; unpriced tokens are reported explicitly rather than counted as zero
  • planSettlement(): health-aware cross-chain payment routing with per-chain error isolation
  • Unpayable charges are marked blocked rather than silently dropped

Updated: src/services/walletService.ts

  • getBalancesAcrossChains(): parallel multi-chain balance fetch with per-chain error isolation
  • totalsBySymbol(): holdings kept separate by chain (same symbol on two chains is not fungible)

Tests

  • src/services/__tests__/multiChainSubscriptionService.test.ts: 313 lines of tests
  • src/services/__tests__/walletMultiChain.test.ts: 113 lines of multi-chain wallet tests

Documentation

  • docs/MULTI_CHAIN_SUBSCRIPTIONS.md: full API reference and usage examples

Acceptance Criteria

  • Feature implemented with full functionality
  • Unit tests added with >80% coverage
  • Integration tests for critical paths
  • No regression introduced
  • Documentation updated
  • Performance benchmarks met

Technical Scope

Covers: src/services/walletService.ts, contracts/subscription/src/lib.rs

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@Prozaks 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! 🚀

Learn more about application limits

…with unified billing

- Add MultiChainSubscriptionService: chain bindings per subscription,
  unified billing statements that convert every chain into one currency
  while keeping native token subtotals, and settlement planning with
  health-aware cross-chain failover
- walletService: add getBalancesAcrossChains() (parallel, per-chain error
  isolation) and static totalsBySymbol() keeping holdings separated by chain
- Add comprehensive tests for MultiChainSubscriptionService and wallet
  multi-chain balance fetching
- Add docs/MULTI_CHAIN_SUBSCRIPTIONS.md with full API reference

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement multi-chain subscription management with unified billing

1 participant