Add tooltip and link to pull-payment tags in wallet's transaction list (#6562)

This commit is contained in:
Nicolas Dorier 2025-01-16 23:51:00 +09:00 committed by GitHub
parent ef8071ba93
commit b13d0a4300
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View file

@ -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(

View file

@ -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.";