Skip to content

[Chore] Remove unused _addresses parameter from orchestration.ts functions #335

Description

@collinsezedike

Summary

buildDepositTx, buildWithdrawTx, and resolvePositions in packages/stellar-sdk-helpers/src/orchestration.ts all accept an _addresses: ProtocolAddresses parameter that is never read. Every call site constructs a ProtocolAddresses object via buildTxAddresses() solely to satisfy this signature.

Motivation

The parameter was used by the old per-protocol routing logic (passing USDC/EURC contract addresses to Blend and DeFindex helpers directly). The coordinator architecture removed that need: the coordinator vault resolves all asset addresses on-chain. The dead parameter now adds noise to every call site in both API layers and implies a contract that no longer exists.

Proposed Solution

  1. Remove the _addresses parameter from all three functions in orchestration.ts.
  2. Remove the corresponding ProtocolAddresses argument from every call site in api/ and apps/api/.
  3. Remove the buildTxAddresses() calls that exist solely to produce the argument.
  4. If ProtocolAddresses is no longer referenced anywhere, remove the interface and its export.

Scope

Field Value
Area SDK, API
Protocol affected None
Network N/A
Breaking change? Yes (public SDK API change)

Alternatives Considered

Keeping the parameter for forward compatibility in case future protocols need explicit asset addresses: unlikely given the coordinator pattern, and the parameter can be re-added if ever needed.

Acceptance Criteria

  • _addresses parameter removed from all three orchestration functions
  • All call sites in api/ and apps/api/ updated
  • buildTxAddresses() calls removed where they only exist to produce the dead argument
  • pnpm lint && pnpm typecheck && pnpm test pass with no regressions

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAdds or modifies a REST endpoint in apps/apichoreBuild, CI, dependency updates, or repository maintenancemediumRequires familiarity with the Meridian codebase or relevant tooling; expect 4–8 hourssdkInvolves Blend or DeFindex SDK helpers in packages/stellar-sdk-helpers

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions