mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-19 06:54:19 +01:00
Asks pin and passphrase if device is not ready
This commit is contained in:
@@ -74,12 +74,17 @@ namespace BTCPayServer.Controllers
|
||||
await websocketHelper.Send("{ \"error\": \"need-device\"}", cancellationToken);
|
||||
return true;
|
||||
}
|
||||
if (deviceEntry.NeedsPinSent is true && pin is null)
|
||||
if (deviceEntry.Code is HwiErrorCode.DeviceNotInitialized)
|
||||
{
|
||||
await websocketHelper.Send("{ \"error\": \"need-initialized\"}", cancellationToken);
|
||||
return true;
|
||||
}
|
||||
if ((deviceEntry.Code is HwiErrorCode.DeviceNotReady || deviceEntry.NeedsPinSent is true) && pin is null)
|
||||
{
|
||||
await websocketHelper.Send("{ \"error\": \"need-pin\"}", cancellationToken);
|
||||
return true;
|
||||
}
|
||||
if (deviceEntry.NeedsPassphraseSent is true && password == null)
|
||||
if ((deviceEntry.Code is HwiErrorCode.DeviceNotReady || deviceEntry.NeedsPassphraseSent is true) && password == null)
|
||||
{
|
||||
await websocketHelper.Send("{ \"error\": \"need-passphrase\"}", cancellationToken);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user