Problem
The VaultModule is currently untested. To prevent tests from attempting real testnet network requests, the Stellar RPC must be mocked to test deposit and withdraw logic safely.
Expected behavior
A new test file verifies that VaultModule.deposit properly formats stroop conversion, builds the transaction, and returns a mock transaction hash using Jest mocks on rpc.Server.
Files to update
tests/vault.test.ts (update/expand)
Project relevance
Allows developers to confidently refactor the core financial logic of the SDK without worrying about network latency or live testnet token balances during testing.
Acceptance criteria
Problem
The
VaultModuleis currently untested. To prevent tests from attempting real testnet network requests, the Stellar RPC must be mocked to testdepositandwithdrawlogic safely.Expected behavior
A new test file verifies that
VaultModule.depositproperly formats stroop conversion, builds the transaction, and returns a mock transaction hash using Jest mocks onrpc.Server.Files to update
tests/vault.test.ts(update/expand)Project relevance
Allows developers to confidently refactor the core financial logic of the SDK without worrying about network latency or live testnet token balances during testing.
Acceptance criteria
client.rpcServer.sendTransactionis successfully mocked to return a static{ hash: "mock_hash" }payload