mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-21 22:11:48 +01:00
Add tooltip and link to pull-payment tags in wallet's transaction list (#6562)
This commit is contained in:
parent
ef8071ba93
commit
b13d0a4300
2 changed files with 14 additions and 0 deletions
|
@ -62,6 +62,15 @@ namespace Microsoft.AspNetCore.Mvc
|
|||
scheme, host, pathbase);
|
||||
}
|
||||
|
||||
public static string PullPaymentLink(this LinkGenerator urlHelper, string pullPaymentId, string scheme, HostString host, string pathbase)
|
||||
{
|
||||
return urlHelper.GetUriByAction(
|
||||
action: nameof(UIPullPaymentController.ViewPullPayment),
|
||||
controller: "UIPullPayment",
|
||||
values: new { pullPaymentId },
|
||||
scheme, host, pathbase);
|
||||
}
|
||||
|
||||
public static string CheckoutLink(this LinkGenerator urlHelper, string invoiceId, string scheme, HostString host, string pathbase)
|
||||
{
|
||||
return urlHelper.GetUriByAction(
|
||||
|
|
|
@ -115,6 +115,11 @@ public class LabelService
|
|||
model.Tooltip = $"This UTXO was exposed through a PayJoin proposal";
|
||||
}
|
||||
}
|
||||
else if (tag.Type == WalletObjectData.Types.PullPayment)
|
||||
{
|
||||
model.Tooltip = $"Received through a pull payment {tag.Id}";
|
||||
model.Link = _linkGenerator.PullPaymentLink(tag.Id, req.Scheme, req.Host, req.PathBase);
|
||||
}
|
||||
else if (tag.Type == WalletObjectData.Types.Payjoin)
|
||||
{
|
||||
model.Tooltip = $"This UTXO was part of a PayJoin transaction.";
|
||||
|
|
Loading…
Add table
Reference in a new issue