mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
error message if not using segwit
This commit is contained in:
parent
e97c15578d
commit
8e73c1a2f0
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue