Skip to content

[Testing] sorobanService submit/simulate/decode paths are untested - soroban.service.test.ts only covers isStale #807

Description

@grantfox-oss

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Why this matters

tests/soroban.service.test.ts only asserts isStale. sorobanService.ts has untested logic that handles funds and chain decoding: submitContractCall error branches, getStreamFromChain/getClaimableFromChain decode + null-on-error fallback, topUpStream's KEEPER_SECRET guard, and its own decodeI128/decodeAddress.

Acceptance criteria

  • Add unit tests for submitContractCall covering simulation-error and sendTransaction-ERROR paths (mock rpc.Server)
  • Add tests for getStreamFromChain/getClaimableFromChain happy path and null-on-decode-failure
  • Add tests for decodeI128/decodeAddress including negative i128 and contract addresses
  • Cover topUpStream throwing when KEEPER_SECRET_KEY is unset

Files to touch

  • backend/tests/soroban.service.test.ts
  • backend/src/services/sorobanService.ts

Out of scope

  • Live testnet submission tests

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend related taskstestingTesting related tasks

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