mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 05:54:26 +01:00
* Use Blazor for the Vault code * Put elements in different file * Controller abstraction * Break into VaultElement
23 lines
598 B
C#
23 lines
598 B
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
namespace BTCPayServer;
|
|
|
|
public class VaultHWITransport : Hwi.Transports.ITransport
|
|
{
|
|
private readonly VaultClient _client;
|
|
|
|
public VaultHWITransport(VaultClient client)
|
|
{
|
|
_client = client;
|
|
}
|
|
public async Task<string> SendCommandAsync(string[] arguments, CancellationToken cancellationToken)
|
|
{
|
|
return (await _client.SendVaultRequest(null, new JObject()
|
|
{
|
|
["params"] = new JArray(arguments)
|
|
}, cancellationToken)).Value<string>() ?? "";
|
|
}
|
|
}
|