fix(tron): exclude-amount mode emits a bare address so all wallet QR scanners can parse it - #46
Open
curtisgray wants to merge 1 commit into
Conversation
…anners can parse it The 'Exclude amount from QR code' store setting documents that the QR will only contain the destination address, but the code still prefixed tron:. Wallet QR scanners that do not support TIP-17 URIs (e.g. TronLink's in-Send scanner) reject any payload that is not a plain base58 address with 'Incorrect account address format'. Bare address is what exchange deposit pages render and every TRON wallet accepts. Also updates the with-amount test expectation to match the tron: URI format introduced by btcpayserver-tether#41 (tests were not updated in that PR).
Collaborator
|
Hi, Thanks for the contribution. However, I think we should distinguish the option of amount included from the one to add |
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 "Exclude amount from QR code" store setting's help text says "The QR code will only contain the destination address", but since #41 the exclude branch still emits
tron:{address}.Wallet QR scanners that don't support TIP-17 URIs reject any payload that isn't a plain base58 address. Concretely: TronLink's in-Send scanner fails with "Incorrect account address format" on both
tron:ADDR?amount=Xandtron:ADDR(real-user report, TronLink iOS, July 2026). A bare address is what exchange deposit pages render and what every TRON wallet accepts.Change
BuildPaymentLink(..., excludeAmount: true)returns the baredestination— matching the setting's documented behavior and the existing unit testTronPaymentLinkCanExcludeAmount(which already expected the bare address).TronPaymentLinkIncludesAmountByDefaultto expect thetron:prefix — fix(tron): add missing tron: URI scheme prefix to TRC20 payment links #41 changed the code but not this test.Notes
*PaymentLink*tests pass. Heads-up:dotnet testin CI currently no-ops because the test csproj only definesRelease;Altcoins-Debugconfigurations and the workflow builds the default configuration — which is how the stale test expectation survived fix(tron): add missing tron: URI scheme prefix to TRC20 payment links #41. Happy to file that separately.paymentLinkis the bare address and TronLink scans it correctly.