Repository navigation
fix: p2p amount_lkr is a bare number kept from send time - #231
Closed
helloscoopa wants to merge 1 commit into
Closed
helloscoopa wants to merge 1 commit into
helloscoopa wants to merge 1 commit into
Conversation
The Mini App's transfer, collect and decode responses sent
amount_lkr as a display string ("1 sats (රු. 0.21)"), so the app
showed රු. 0.00. Send the bare number like every other endpoint.
Each transfer now keeps its rupee value from when it started, so
View payment shows what it was worth then, not at today's price.
Older transfers fall back to today's price.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FBZc7g7p7xCjG3aia1WorB
This was referenced Nov 26, 2026
Member
Author
|
Closing in favour of bitcoindeepa/app-backend#159. The app now gets a send's value from the backend: our The app no longer reads Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Mini App's Sent screen showed Value ≈ රු. 0.00 for every P2P send (reported for a 1 sat send that was worth රු. 0.21).
toTransferResponse, the collect response and/p2p/decodebuiltamount_lkrwiththirdparty.FormatSatsWithLKR, which returns a display string ("1 sats (රු. 0.21)"). The app expects a bare number like every otheramount_lkrthe bot returns (getLKRValue,"1,234.56"). It parsed the string toNaN, which then displayed as0.00.The value was also recalculated at the current price on every read, so "View payment" days later showed what the sats were worth that day, not when they were sent.
Change
amount_lkr(transfers, collects, decode) andbalance_lkr(/p2p/me) are bare numbers again.P2PTransfergetsAmountLKR, set once when the transfer starts (internal sends, invoice payments, and collect payments), so the transfer keeps its value from that moment.The app side (which reads both shapes, so it works before this deploys) is in bitcoindeepa/app-frontend
scoopa/sat-pluralization-lkr-value.Checks
go build ./...andgo vetoninternal/apiandinternal/telegrampass. The full test suite is left to CI.Generated by Claude Code