mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-23 07:04:26 +01:00
error message if not using segwit
This commit is contained in:
@@ -232,7 +232,7 @@ namespace BTCPayServer.Controllers
|
||||
DirectDerivationStrategy directStrategy = GetDirectStrategy(strategy);
|
||||
if (directStrategy == null)
|
||||
{
|
||||
await Send(webSocket, new LedgerTestResult() { Success = false, Error = $"The feature does not work for multi-sig wallets" });
|
||||
await Send(webSocket, new LedgerTestResult() { Success = false, Error = $"The feature does not work for multi-sig or non-segwit wallets" });
|
||||
return new EmptyResult();
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ namespace BTCPayServer.Controllers
|
||||
DirectDerivationStrategy directStrategy = GetDirectStrategy(strategy);
|
||||
if (directStrategy == null)
|
||||
{
|
||||
await Send(webSocket, new LedgerTestResult() { Success = false, Error = $"The feature does not work for multi-sig wallets" });
|
||||
await Send(webSocket, new LedgerTestResult() { Success = false, Error = $"The feature does not work for multi-sig or non-segwit wallets" });
|
||||
return new EmptyResult();
|
||||
}
|
||||
|
||||
@@ -424,6 +424,8 @@ namespace BTCPayServer.Controllers
|
||||
var directStrategy = strategy.DerivationStrategyBase as DirectDerivationStrategy;
|
||||
if (directStrategy == null)
|
||||
directStrategy = (strategy.DerivationStrategyBase as P2SHDerivationStrategy).Inner as DirectDerivationStrategy;
|
||||
if (!directStrategy.Segwit)
|
||||
return null;
|
||||
return directStrategy;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user