Remove support for payout to a Bitcoin Url (#2766)

This commit is contained in:
Nicolas Dorier 2021-08-09 22:43:38 +09:00 committed by GitHub
parent cf067ca51b
commit e7e8ed55c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -297,7 +297,10 @@ namespace BTCPayServer.Controllers
}
if(bip21.Any())
{
TempData.SetStatusMessageModel(null);
return RedirectToAction(nameof(WalletSend), new {walletId, bip21});
}
TempData.SetStatusMessageModel(new StatusMessageModel()
{
Severity = StatusMessageModel.StatusSeverity.Error,

View File

@ -70,10 +70,11 @@ public class BitcoinLikePayoutHandler : IPayoutHandler
destination = destination.Trim();
try
{
if (destination.StartsWith($"{network.UriScheme}:", StringComparison.OrdinalIgnoreCase))
{
return Task.FromResult<IClaimDestination>(new UriClaimDestination(new BitcoinUrlBuilder(destination, network.NBitcoinNetwork)));
}
// This doesn't work properly, (payouts are not detected), we can reactivate later when we fix the bug https://github.com/btcpayserver/btcpayserver/issues/2765
//if (destination.StartsWith($"{network.UriScheme}:", StringComparison.OrdinalIgnoreCase))
//{
// return Task.FromResult<IClaimDestination>(new UriClaimDestination(new BitcoinUrlBuilder(destination, network.NBitcoinNetwork)));
//}
return Task.FromResult<IClaimDestination>(new AddressClaimDestination(BitcoinAddress.Create(destination, network.NBitcoinNetwork)));
}