Simplify vault logic by introducing a VaultClient (#5434)

This commit is contained in:
Nicolas Dorier
2023-10-27 11:54:15 +09:00
committed by GitHub
parent 89041a6744
commit b702621a04
7 changed files with 227 additions and 76 deletions

View File

@@ -50,9 +50,10 @@ namespace BTCPayServer.Controllers
if (network == null)
return NotFound();
var websocket = await HttpContext.WebSockets.AcceptWebSocketAsync();
var vaultClient = new VaultClient(websocket);
var hwi = new Hwi.HwiClient(network.NBitcoinNetwork)
{
Transport = new HwiWebSocketTransport(websocket)
Transport = new VaultHWITransport(vaultClient)
};
Hwi.HwiDeviceClient device = null;
HwiEnumerateEntry deviceEntry = null;