Skip to content

Consolidate duplicate Stellar config across lib/config/stellar.ts, lib/soroban-client.ts and lib/soroban/client.ts #881

Description

@Baskarayelu

📋 Description

There are overlapping Stellar/Soroban modules: lib/config/stellar.ts, lib/soroban-client.ts, and lib/soroban/client.ts (the latter holding the withRetry wrapper). The duplication risks divergent network passphrases/RPC URLs and makes it ambiguous which client a new contributor should use.

This issue consolidates the Soroban client into a single canonical module and re-exports for back-compat, deferring network resolution to lib/contracts/network-resolution.ts.

Why this matters: two clients with different config is a classic source of "works on testnet, breaks on mainnet" bugs.

🎯 Requirements & Context

  • Pick one canonical client module; migrate callers.
  • Keep the withRetry timeout/retry wrapper in the canonical module.
  • Provide thin re-exports from the old paths to avoid breaking imports, with @deprecated TSDoc.

Context & constraints

  • No behavioural change to retry/timeout semantics.
  • Use the existing network-resolution helper for passphrase/RPC.

🛠️ Suggested Execution

git checkout -b refactor/consolidate-soroban-client
  • Consolidate + re-export; TSDoc deprecations.
  • Run existing contract tests to confirm no regressions.
npx vitest run && npx tsc --noEmit && npm run lint && npm run build
refactor(soroban): consolidate duplicate Stellar client modules

✅ Acceptance Criteria & Guidelines

Requirement Target
Single canonical client Required
Back-compat re-exports Required
Retry semantics preserved Required
tsc --noEmit, lint, build clean Required
Timeframe 96 hours from assignment

💬 Community & Support

Join the RemitWise contributor community on Discord: https://discord.gg/CtQuPZFMA

Comment to claim and ask questions in the channel. 🚀

Metadata

Metadata

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions