Skip to content

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

Merged
Smartdevs17 merged 2 commits into
Smartdevs17:mainfrom
Prozaks:feat/issue-904-multi-chain-subscription-management
Aug 31, 2026
Merged

feat(#904): implement multi-chain subscription management with unified billing#1065
Smartdevs17 merged 2 commits 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
@Smartdevs17
Smartdevs17 merged commit bbe86eb into Smartdevs17:main Aug 31, 2026
1 check passed
@Smartdevs17

Copy link
Copy Markdown
Owner

Thanks for contributing! The changes have been merged. Feel free to leave a review or feedback.

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

2 participants