mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 01:43:50 +01:00
Update HWI library, warn users to run newer version (#2544)
* Update HWI library, warn users to run newer version * Update BTCPayServer/wwwroot/js/vaultbridge.ui.js Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com> * Update BTCPayServer/wwwroot/js/vaultbridge.ui.js Co-authored-by: Pavlenex <pavle@pavle.org> Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com> Co-authored-by: Pavlenex <pavle@pavle.org>
This commit is contained in:
parent
64a7abe53a
commit
e93b030bfe
@ -27,7 +27,7 @@
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NBitcoin" Version="5.0.77" />
|
||||
<PackageReference Include="NBitcoin" Version="5.0.81" />
|
||||
<PackageReference Include="BTCPayServer.Lightning.Common" Version="1.2.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
</ItemGroup>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.6.0" />
|
||||
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.7" />
|
||||
<PackageReference Include="NBitcoin" Version="5.0.77" />
|
||||
<PackageReference Include="NBitcoin" Version="5.0.81" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="DigitalRuby.ExchangeSharp" Version="0.6.3" />
|
||||
</ItemGroup>
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BIP78.Sender" Version="0.2.0" />
|
||||
<PackageReference Include="BTCPayServer.Hwi" Version="1.1.3" />
|
||||
<PackageReference Include="BTCPayServer.Hwi" Version="2.0.1" />
|
||||
<PackageReference Include="BTCPayServer.Lightning.All" Version="1.2.7" />
|
||||
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" />
|
||||
<PackageReference Include="BundlerMinifier.Core" Version="3.2.435" />
|
||||
|
@ -32,7 +32,7 @@ namespace BTCPayServer.Controllers.GreenField
|
||||
|
||||
[Authorize(AuthenticationSchemes = AuthenticationSchemes.Greenfield)]
|
||||
[HttpGet("~/api/v1/server/info")]
|
||||
public async Task<ActionResult> ServerInfo()
|
||||
public ActionResult ServerInfo()
|
||||
{
|
||||
var supportedPaymentMethods = _paymentMethodHandlerDictionary
|
||||
.SelectMany(handler => handler.GetSupportedPaymentMethods().Select(id => id.ToString()))
|
||||
|
@ -40,6 +40,7 @@ namespace BTCPayServer.Controllers
|
||||
if (!HttpContext.WebSockets.IsWebSocketRequest)
|
||||
return NotFound();
|
||||
cryptoCode = cryptoCode ?? walletId.CryptoCode;
|
||||
bool versionChecked = false;
|
||||
using (var cts = new CancellationTokenSource(TimeSpan.FromMinutes(10)))
|
||||
{
|
||||
var cancellationToken = cts.Token;
|
||||
@ -272,6 +273,16 @@ namespace BTCPayServer.Controllers
|
||||
goto askdevice;
|
||||
case "ask-device":
|
||||
askdevice:
|
||||
if (!versionChecked)
|
||||
{
|
||||
var version = await hwi.GetVersionAsync(cancellationToken);
|
||||
if (version.Major < 2)
|
||||
{
|
||||
await websocketHelper.Send("{ \"error\": \"vault-outdated\"}", cancellationToken);
|
||||
continue;
|
||||
}
|
||||
versionChecked = true;
|
||||
}
|
||||
password = null;
|
||||
deviceEntry = null;
|
||||
device = null;
|
||||
|
@ -167,7 +167,7 @@ namespace BTCPayServer.Payments.Lightning
|
||||
}
|
||||
|
||||
}));
|
||||
leases.Add(_Aggregator.Subscribe<Events.InvoicePaymentMethodActivated>(async inv =>
|
||||
leases.Add(_Aggregator.Subscribe<Events.InvoicePaymentMethodActivated>(inv =>
|
||||
{
|
||||
if (inv.PaymentMethodId.PaymentType == LightningPaymentType.Instance)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
var vault = (function () {
|
||||
var vault = (function () {
|
||||
/** @param {WebSocket} websocket
|
||||
*/
|
||||
function VaultBridge(websocket) {
|
||||
@ -97,7 +97,7 @@
|
||||
notRunning: "NotRunning",
|
||||
denied: "Denied",
|
||||
socketNotSupported: "SocketNotSupported",
|
||||
socketError: "SocketError",
|
||||
socketError: "SocketError"
|
||||
},
|
||||
askVaultPermission: askVaultPermission,
|
||||
connectToBackendSocket: connectToBackendSocket,
|
||||
|
@ -32,6 +32,7 @@ var vaultui = (function () {
|
||||
noWebsockets: new VaultFeedback("failed", "Web sockets are not supported by the browser.", "vault-feedback1", "no-websocket"),
|
||||
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"),
|
||||
vaultNeedUpdate: new VaultFeedback("failed", "Your BTCPay Server Vault version is outdated. Please <a target=\"_blank\" href=\"https://github.com/btcpayserver/BTCPayServer.Vault/releases/latest\">download</a> the latest version.", "vault-feedback2", "vault-outdated"),
|
||||
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"),
|
||||
|
Loading…
Reference in New Issue
Block a user