Fix status bar after hiding
MODIFY
HiddenWallet.FullSpvWallet/HiddenWallet.FullSpvWallet.csproj
HiddenWallet.FullSpvWallet/HiddenWallet.FullSpvWallet.csproj
<ItemGroup>
<PackageReference Include="DotNetTor" Version="2.3.1" />
- <PackageReference Include="QBitNinja.Client" Version="1.0.3.44" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="1.0.0-alpha2-final" /> </ItemGroup>
<ItemGroup>

MODIFY
HiddenWallet.FullSpvWallet/WalletJob.cs
HiddenWallet.FullSpvWallet/WalletJob.cs
@@ -12,8 +12,6 @@ using NBitcoin;
using NBitcoin.Protocol;
using NBitcoin.Protocol.Behaviors;
using Newtonsoft.Json.Linq;
-using QBitNinja.Client;
-using QBitNinja.Client.Models;
using DotNetTor.SocksPort;
using DotNetTor;
using HiddenWallet.Models;
@@ -1360,8 +1358,8 @@ namespace HiddenWallet.FullSpv
await ControlPortClient.ChangeCircuitAsync();
await Task.Delay(100);
- await TorSmartBitClient.PushTransactionAsync(tx, CancellationToken.None);
+ await TorSmartBitClient.PushTransactionAsync(tx, CancellationToken.None);
for (int i = 0; i < 21; i++)
{
await Task.Delay(1000);

MODIFY
HiddenWallet.Gui/app/js/status-client.js
HiddenWallet.Gui/app/js/status-client.js
@@ -12,6 +12,7 @@ var mixerStatusResult;
var isTumblerOnline = false;
function signalrStatusUpdate() {
+ initializeStatus();
connection = new signalR.HubConnection('http://localhost:37120/daemonHub');
@@ -83,6 +84,17 @@ function signalrStatusUpdate() {
});
}
+function initializeStatus() {
+ let response = httpGetWallet("status");
+
+ walletState = response.WalletState;
+ headerHeight = parseInt(response.HeaderHeight);
+ trackerHeight = parseInt(response.TrackingHeight);
+ nodeCount = parseInt(response.ConnectedNodeCount);
+ mempool = parseInt(response.MemPoolTransactionCount);
+ torState = response.TorState;
+}
+
function statusSignalRShow() {
let text = "";
let blocksLeftDisplay = "";

MODIFY
HiddenWallet.Tests/HiddenWallet.Tests.csproj
HiddenWallet.Tests/HiddenWallet.Tests.csproj
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
+ <PackageReference Include="QBitNinja.Client" Version="1.0.3.44" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>

MODIFY
HiddenWallet/WebClients/SmartBit/SmartBitClient.cs
HiddenWallet/WebClients/SmartBit/SmartBitClient.cs
@@ -40,7 +40,7 @@ namespace HiddenWallet.WebClients.SmartBit
public async Task PushTransactionAsync(Transaction transaction, CancellationToken cancel)
{
- using (await _asyncLock.LockAsync())
+ using (await _asyncLock.LockAsync(cancel))
{
var content = new StringContent(
new JObject(new JProperty("hex", transaction.ToHex())).ToString(),
@@ -58,7 +58,7 @@ namespace HiddenWallet.WebClients.SmartBit
public async Task<IEnumerable<SmartBitExchangeRate>> GetExchangeRatesAsync(CancellationToken cancel)
{
- using (await _asyncLock.LockAsync())
+ using (await _asyncLock.LockAsync(cancel))
using (HttpResponseMessage response =
await HttpClient.GetAsync("exchange-rates", HttpCompletionOption.ResponseContentRead, cancel))
{

Fix status bar after hiding