Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BTCPayServer.Plugins.USDt.Tests/FastTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void TronPaymentLinkIncludesAmountByDefault()
12.34m,
false);

Assert.Equal("TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs?amount=12.34", result);
Assert.Equal("tron:TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs?amount=12.34", result);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ public class TronUSDtPaymentLinkExtension(PaymentMethodId paymentMethodId) : IPa
if (string.IsNullOrEmpty(destination))
return null;

// Bare address, no URI scheme: the store setting documents this mode as "the QR
// code will only contain the destination address", and QR scanners that reject
// tron: URIs (e.g. TronLink's in-Send scanner) only accept a plain base58 address.
if (excludeAmount)
return $"tron:{destination}";
return destination;

return $"tron:{destination}?amount={due.ToString(CultureInfo.InvariantCulture)}";
}
Expand Down