Fix device not found with Trezor T

This commit is contained in:
nicolas.dorier
2019-12-10 23:52:48 +09:00
parent 23b9dfed2c
commit 33703b83a3
2 changed files with 2 additions and 3 deletions

View File

@@ -281,12 +281,11 @@ namespace BTCPayServer.Controllers
goto askdevice;
case "ask-device":
askdevice:
var selector = deviceEntry?.DeviceSelector;
password = null;
deviceEntry = null;
device = null;
var entries = (await hwi.EnumerateEntriesAsync(cancellationToken)).ToList();
deviceEntry = entries.Where(e => selector == null || SameSelector(selector, e.DeviceSelector)).FirstOrDefault();
deviceEntry = entries.FirstOrDefault();
if (deviceEntry == null)
{
await websocketHelper.Send("{ \"error\": \"no-device\"}", cancellationToken);