Add color signal if Tumbler is offline
MODIFY
HiddenWallet.Daemon/Models/StatusResponse.cs
HiddenWallet.Daemon/Models/StatusResponse.cs
@@ -15,6 +15,7 @@ namespace HiddenWallet.Daemon.Models
public int ConnectedNodeCount { get; set; }
public int MemPoolTransactionCount { get; set; }
public string TorState { get; set; }
+ public bool IsTumblerOnline { get; set; }
public int ChangeBump { get; set; }
}
}

MODIFY
HiddenWallet.Daemon/Wrappers/WalletWrapper.cs
HiddenWallet.Daemon/Wrappers/WalletWrapper.cs
@@ -267,11 +267,13 @@ namespace HiddenWallet.Daemon.Wrappers
var mtxc = _walletJob.MemPoolJob.Transactions.Count;
+ var itbo = _walletJob.CoinJoinService.TumblerConnection != null;
+
var cb = _changeBump;
- return new StatusResponse { HeaderHeight = hh, TrackingHeight = th, ConnectedNodeCount = nc, MemPoolTransactionCount = mtxc, WalletState = ws, TorState = ts, ChangeBump = cb };
+ return new StatusResponse { HeaderHeight = hh, TrackingHeight = th, ConnectedNodeCount = nc, MemPoolTransactionCount = mtxc, WalletState = ws, TorState = ts, IsTumblerOnline = itbo, ChangeBump = cb };
}
- else return new StatusResponse { HeaderHeight = 0, TrackingHeight = 0, ConnectedNodeCount = 0, MemPoolTransactionCount = 0, WalletState = WalletState.NotStarted.ToString(), TorState = ts, ChangeBump = 0 };
+ else return new StatusResponse { HeaderHeight = 0, TrackingHeight = 0, ConnectedNodeCount = 0, MemPoolTransactionCount = 0, WalletState = WalletState.NotStarted.ToString(), TorState = ts, IsTumblerOnline = false, ChangeBump = 0 };
}
public async Task<BaseResponse> BuildTransactionAsync(string password, SafeAccount safeAccount, BitcoinAddress address, Money amount, FeeType feeType)

MODIFY
HiddenWallet.Gui/app/html/wallet-phase-tabs.html
HiddenWallet.Gui/app/html/wallet-phase-tabs.html
<ul class="nav nav-tabs">
<li class="active"><a>Alice Wallet</a></li>
<li><a href="javascript:walletPhaseShow('bob')">Bob Wallet</a></li>
- <li><a href="javascript:walletPhaseShow('mixer')">Mixer</a></li>
+ <li><a class="mixer-tab-link" href="javascript:walletPhaseShow('mixer')">Mixer</a></li>
</ul>
</nav>
</div>
<ul class="nav nav-tabs">
<li><a href="javascript:walletPhaseShow('alice')">Alice Wallet</a></li>
<li class="active"><a>Bob Wallet</a></li>
- <li><a href="javascript:walletPhaseShow('mixer')">Mixer</a></li>
+ <li><a class="mixer-tab-link" href="javascript:walletPhaseShow('mixer')">Mixer</a></li>
</ul>
</nav>
</div>
<ul class="nav nav-tabs">
<li><a href="javascript:walletPhaseShow('alice')">Alice Wallet</a></li>
<li><a href="javascript:walletPhaseShow('bob')">Bob Wallet</a></li>
- <li class="active"><a>Mixer</a></li>
+ <li class="active mixer-tab-link"><a>Mixer</a></li>
</ul>
</nav>
</div>
\ No newline at end of file

MODIFY
HiddenWallet.Gui/app/js/default.ts
HiddenWallet.Gui/app/js/default.ts
@@ -93,7 +93,7 @@ window.onclick = function (mouseEvent: MouseEvent) {
if (eventTarget.className.indexOf('dropbtn') == -1 ) {
- var dropdowns: HTMLCollectionOf<Element> = document.getElementsByClassName("dropdown-content");
+ let dropdowns: HTMLCollectionOf<Element> = document.getElementsByClassName("dropdown-content");
for (let i: number = 0; i < dropdowns.length; i++) {
var openDropdown: Element = dropdowns[i];

MODIFY
HiddenWallet.Gui/app/js/status.ts
HiddenWallet.Gui/app/js/status.ts
@@ -17,6 +17,7 @@ let trackingHeight: number;
let connectedNodeCount: number;
let memPoolTransactionCount: number;
let torState: string;
+let isTumblerOnline: boolean;
function periodicUpdate() {
setInterval(function statusUpdate() {
@@ -24,6 +25,11 @@ function periodicUpdate() {
updateDecryptButton(response.TorState);
+ if (isTumblerOnline !== response.IsTumblerOnline) {
+ updateMixerTab(response.IsTumblerOnline);
+ isTumblerOnline = response.IsTumblerOnline;
+ }
+
if (walletState === response.WalletState) {
if (headerHeight === response.HeaderHeight) {
if (trackingHeight === response.TrackingHeight) {
@@ -113,9 +119,28 @@ function periodicUpdate() {
}, 1000);
}
+function updateMixerTab(ito: boolean) {
+ try {
+
+ let mixerTabs: HTMLCollectionOf<Element> = document.getElementsByClassName("mixer-tab-link");
+ for (let i: number = 0; i < mixerTabs.length; i++) {
+ let tab: HTMLElement = mixerTabs[i] as HTMLElement;
+ if (ito === false) {
+ tab.style.backgroundColor = "blanchedalmond";
+ }
+ else {
+ tab.style.backgroundColor = "";
+ }
+ }
+ }
+ catch (err) {
+
+ }
+}
+
function updateDecryptButton(ts: string) {
try {
- var decButton: HTMLButtonElement = document.getElementById("decrypt-wallet-button") as HTMLButtonElement;
+ let decButton: HTMLButtonElement = document.getElementById("decrypt-wallet-button") as HTMLButtonElement;
if (ts.toUpperCase() === "CircuitEstabilished".toUpperCase()) {
if (decButton.innerText === "Waiting for Tor...") {

MODIFY
HiddenWallet.Gui/app/js/wallet-phase.ts
HiddenWallet.Gui/app/js/wallet-phase.ts
@@ -44,7 +44,7 @@ function walletPhaseShow(tabItem: string = "") {
else if (tabItem === "mixer") {
content.setAttribute("style", "max-height: 430");
tabs.innerHTML = mixer.outerHTML;
- let hintTextArray = ["ZeroLink cannot steal your coins, nor deanonymize you", "Losing internet connection while mixing is dangerous if the Tumbler is malicous"];
+ let hintTextArray = ["ZeroLink cannot steal your coins, nor deanonymize you"];
let randomHint = hintTextArray[Math.floor(Math.random() * hintTextArray.length)];
writeHint(randomHint);
menu.innerHTML = "";
@@ -63,6 +63,7 @@ function walletPhaseShow(tabItem: string = "") {
return;
});
}
+ updateMixerTab(isTumblerOnline);
}
function walletShow(menuItem: string) {

Add color signal if Tumbler is offline