Skip to content

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
btcpayserver-tether:masterfrom
electricpipelines:fix/tron-bare-address-qr
Open

fix(tron): exclude-amount mode emits a bare address so all wallet QR scanners can parse it#46
curtisgray wants to merge 1 commit into
btcpayserver-tether:masterfrom
electricpipelines:fix/tron-bare-address-qr

Conversation

@curtisgray

Copy link
Copy Markdown

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=X and tron: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 bare destination — matching the setting's documented behavior and the existing unit test TronPaymentLinkCanExcludeAmount (which already expected the bare address).
  • Updates TronPaymentLinkIncludesAmountByDefault to expect the tron: prefix — fix(tron): add missing tron: URI scheme prefix to TRC20 payment links #41 changed the code but not this test.
  • With-amount default behavior is unchanged (TIP-17 URI).

Notes

  • All 8 *PaymentLink* tests pass. Heads-up: dotnet test in CI currently no-ops because the test csproj only defines Release;Altcoins-Debug configurations 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.
  • Verified on a live BTCPay 2.4.0 instance: with the toggle on, invoice paymentLink is the bare address and TronLink scans it correctly.

…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).
@b0l0k

b0l0k commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Hi,

Thanks for the contribution. However, I think we should distinguish the option of amount included from the one to add tron: prefix

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.

2 participants