Repository navigation
fix: add pot_balance to p2p/me and keep one userbalance failure shape - #229
helloscoopa wants to merge 1 commit into
Conversation
…2p/me The invalid JSON / Telegram ID answers now use the same shape as other failures (success false, pots []), keeping 400 and the error field callers read. /api/v1/p2p/me also returns pot_balance next to the spendable balance, so the app can explain a limit from one live read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FBZc7gWkW4RodtHSrGXGQq
|
No actionable comments were generated in the recent review. Walkthrough
Change: Feature Merge Risk:
|
What
Follow-up to #226. These commits were pushed to that branch after it merged, so they never landed:
GET /api/v1/p2p/mereturnspot_balancenext to its spendablebalance, from the same read. app-frontend#132 (merged) reads it, so the sell and send sheets can say "· 4,500 in savings pots" from one live response. Without it the app shows no pot note there, but limits are still right./api/v1/userbalancebad requests (invalid JSON / Telegram ID) now use the same failure shape as the other errors (success: false,pots: [], zero balances). They keep HTTP 400 and theerrorfield the DCA backend reads first. This addresses CodeRabbit's outside-diff note on feat: return spendable and pot balances from userbalance #226.Docs:
docs/dca-backend-integration.md§6.2.Tests:
TestUserBalanceBadRequestShape,TestWriteBalanceFailureHasNoErrorField.Generated by Claude Code
Summary by CodeRabbit
pot_balance.pot_balanceshows the amount held in pots.