Use PaymentUrlBuilder for ensuring proper formatting of BIP21 addresses (#2723)

This commit is contained in:
Nicolas Dorier
2021-07-30 18:47:02 +09:00
committed by GitHub
parent 4c57405945
commit a9da79cc58
7 changed files with 56 additions and 17 deletions

View File

@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Abstractions.Models;
using BTCPayServer.Client.Models;
using BTCPayServer.Common;
using BTCPayServer.Data;
using BTCPayServer.HostedServices;
using BTCPayServer.ModelBinders;
@@ -285,7 +286,7 @@ namespace BTCPayServer.Controllers
continue;
}
var blob = payout.GetBlob(_jsonSerializerSettings);
bip21.Add(network.GenerateBIP21(payout.Destination, new Money(blob.CryptoAmount.Value, MoneyUnit.BTC)));
bip21.Add(network.GenerateBIP21(payout.Destination, new Money(blob.CryptoAmount.Value, MoneyUnit.BTC)).ToString());
}
if(bip21.Any())