Skip to content

feat(mobile): align mobile app with Bridgelet SDK API surface - #552

Merged
phertyameen merged 1 commit into
mainfrom
feat/mobile-sdk-alignment
Aug 31, 2026
Merged

feat(mobile): align mobile app with Bridgelet SDK API surface#552
phertyameen merged 1 commit into
mainfrom
feat/mobile-sdk-alignment

Conversation

@phertyameen

Copy link
Copy Markdown
Contributor

Summary

Brings the mobile (Expo) app in line with the actual bridgelet-sdk API surface so it can interoperate with the real backend (previously it targeted endpoints/DTOs that don't exist).

Changes

  • types/api.ts: CreateAccountRequest now mirrors SDK CreateAccountDto (fundingSource, recovery_address, asset_code/asset_issuer); CreateAccountResponse mirrors AccountResponseDto (nullable claimUrl, no bogus claimToken); added the 8-value AccountStatus enum.
  • sender/TransferService.ts: create via POST /accounts (was non-existent /api/accounts); removed the fabricated GET /api/assets call (SDK has no assets endpoint) -> client-side defaults.
  • sender/SenderFlow.tsx: supply fundingSource/recovery_address from the connected wallet (useMobileWallet); send asset_code/asset_issuer; guard null claimUrl.
  • components/MobileSendFlow.tsx: create claim links via the real POST /accounts (was non-existent POST /claims), with 401/429 handling and X-API-Key.
  • hooks/useDeepLinkClaim.ts: validate via SDK POST /claims/verify (was non-existent GET /claims/{token}/validate), status mapping mirrors the web frontend.
  • claims/service.ts: lookupClaimByToken now calls the SDK server-side instead of local JWT decode (SDK tokens sign publicKey/type/jti, not account fields).
  • utils/apiClient.ts: attach X-API-Key header (SDK uses global ApiKeyAuthGuard).
  • .env.example: add EXPO_PUBLIC_FUNDING_ACCOUNT and EXPO_PUBLIC_API_KEY.

Verification

  • tsc --noEmit passes
  • jest passes (8 tests)

Notes

  • /notifications/* and /api/translate/detect still lack SDK counterparts; both degrade gracefully.
  • Flagged separately: SDK's global ApiKeyAuthGuard currently guards /claims/*, contradicting the web frontend's direct-claim model.

@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bridgelet Ready Ready Preview Aug 30, 2026 4:49am

@phertyameen
phertyameen merged commit 98d6c44 into main Aug 31, 2026
6 of 9 checks passed
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.

1 participant