Skip to content

feat(wallet): implement GET /wallet/balance with tests#64

Open
middalukawunti-lang wants to merge 1 commit into
HorizonBridgeLabs:mainfrom
middalukawunti-lang:feat/wallet-balance-issue-12
Open

feat(wallet): implement GET /wallet/balance with tests#64
middalukawunti-lang wants to merge 1 commit into
HorizonBridgeLabs:mainfrom
middalukawunti-lang:feat/wallet-balance-issue-12

Conversation

@middalukawunti-lang
Copy link
Copy Markdown

Summary

Adds unit tests for the GET /wallet/balance endpoint, completing the implementation required by issue #12.

The endpoint was already wired up in WalletController and WalletService; this PR adds the missing test coverage.

Changes

  • wallet.service.spec.ts: tests for getBalance — returns { balances: [] } when no wallet exists, returns Stellar balances when wallet is found
  • wallet.controller.spec.ts: tests that balance() delegates to WalletService.getBalance with the current user's id

Tests

All 18 tests pass across 7 suites (npm test).

Closes #12

- wallet.service.spec.ts: tests for getBalance (no wallet → empty, wallet found → Stellar balances)
- wallet.controller.spec.ts: tests for balance endpoint delegation

Closes HorizonBridgeLabs#12
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.

feat(wallet): implement GET /wallet/balance

1 participant