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
No known key found for this signature in database
GPG key ID: 6618763EF09186FE
2 changed files with 2 additions and 3 deletions

View file

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

View file

@ -1,5 +1,5 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Version>1.0.3.145</Version> <Version>1.0.3.146</Version>
</PropertyGroup> </PropertyGroup>
</Project> </Project>