mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 22:25:28 +01:00
Asks pin and passphrase if device is not ready
This commit is contained in:
parent
2e0db1a430
commit
287fbc523f
2 changed files with 8 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -33,6 +33,7 @@ var vaultui = (function () {
|
|||
errorWebsockets: new VaultFeedback("failed", "Error of the websocket while connecting to the backend.", "vault-feedback1", "error-websocket"),
|
||||
bridgeConnected: new VaultFeedback("ok", "BTCPayServer successfully connected to the vault.", "vault-feedback1", "bridge-connected"),
|
||||
noDevice: new VaultFeedback("failed", "No device connected.", "vault-feedback2", "no-device"),
|
||||
needInitialized: new VaultFeedback("failed", "The device has not been initialized.", "vault-feedback2", "need-initialized"),
|
||||
fetchingDevice: new VaultFeedback("?", "Fetching device...", "vault-feedback2", "fetching-device"),
|
||||
deviceFound: new VaultFeedback("ok", "Device found: {{0}}", "vault-feedback2", "device-selected"),
|
||||
fetchingXpubs: new VaultFeedback("?", "Fetching public keys...", "vault-feedback3", "fetching-xpubs"),
|
||||
|
|
Loading…
Add table
Reference in a new issue