diff --git a/bin/linux/geth b/bin/linux/geth index 7664044..a976387 100644 Binary files a/bin/linux/geth and b/bin/linux/geth differ diff --git a/bin/macos/geth b/bin/macos/geth index e0b485b..fbf2eb2 100644 Binary files a/bin/macos/geth and b/bin/macos/geth differ diff --git a/bin/win/geth.exe b/bin/win/geth.exe index ed6bfc5..7bf1f9d 100644 Binary files a/bin/win/geth.exe and b/bin/win/geth.exe differ diff --git a/package.json b/package.json index 5ad6e2d..f14d064 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Ether1Wallet", - "version": "0.2.3", + "version": "0.2.4", "description": "Desktop wallet for Ether1 currency", "main": "main.js", "scripts": { diff --git a/renderer/syncing.js b/renderer/syncing.js index 9b8fe67..2752ac1 100644 --- a/renderer/syncing.js +++ b/renderer/syncing.js @@ -75,10 +75,14 @@ function StartSyncProcess() { $(document).trigger("onSyncComplete"); } } + } else { + EthoMainGUI.showGeneralError(error); } }); }, 10000); } + } else { + EthoMainGUI.showGeneralError(error); } }).on("data", function(sync){ if ((sync) && (sync.HighestBlock > 0)) { @@ -93,6 +97,8 @@ function StartSyncProcess() { if ((!error) && (sync)) { SyncProgress.animate(sync.currentBlock / sync.highestBlock); SyncProgress.setText(vsprintf('%d/%d (%d%%)', [sync.currentBlock, sync.highestBlock, Math.floor(sync.currentBlock / sync.highestBlock * 100)])); + } else if (error) { + EthoMainGUI.showGeneralError(error); } }); }, 2000); @@ -118,6 +124,6 @@ var InitWeb3 = setInterval(function() }); } catch(err) { - console.log(err); + EthoMainGUI.showGeneralError(err); } }, 2000); \ No newline at end of file diff --git a/renderer/transactions.js b/renderer/transactions.js index 93a51f8..feab154 100644 --- a/renderer/transactions.js +++ b/renderer/transactions.js @@ -4,6 +4,7 @@ class Transactions { constructor() { this.filter = ""; this.isSyncing = false; + this.isLoading = false; } setIsSyncing(value) { @@ -14,6 +15,14 @@ class Transactions { return this.isSyncing; } + setIsLoading(value) { + this.isLoading = value; + } + + getIsLoading() { + return this.isLoading; + } + setFilter(text) { this.filter = text; } @@ -74,31 +83,35 @@ class Transactions { } renderTransactions() { - EthoMainGUI.renderTemplate("transactions.html", {}); - $(document).trigger("render_transactions"); + if (!EthoTransactions.getIsLoading()) { + EthoMainGUI.renderTemplate("transactions.html", {}); + $(document).trigger("render_transactions"); + EthoTransactions.setIsLoading(true); + + // show the loading overlay for transactions + $("#loadingTransactionsOverlay").css("display", "block"); - // show the loading overlay for transactions - $("#loadingTransactionsOverlay").css("display", "block"); - - setTimeout(() => { - var dataTransactions = ipcRenderer.sendSync('getTransactions'); - var addressList = EthoWallets.getAddressList(); + setTimeout(() => { + var dataTransactions = ipcRenderer.sendSync('getTransactions'); + var addressList = EthoWallets.getAddressList(); - dataTransactions.forEach(function(element) { - var isFromValid = (addressList.indexOf(element[2].toLowerCase()) > -1); - var isToValid = (addressList.indexOf(element[3].toLowerCase()) > -1); - - if ((isToValid) && (!isFromValid)) { - element.unshift(0); - } else if ((!isToValid) && (isFromValid)) { - element.unshift(1); - } else { - element.unshift(2); - } - }); + dataTransactions.forEach(function(element) { + var isFromValid = (addressList.indexOf(element[2].toLowerCase()) > -1); + var isToValid = (addressList.indexOf(element[3].toLowerCase()) > -1); + + if ((isToValid) && (!isFromValid)) { + element.unshift(0); + } else if ((!isToValid) && (isFromValid)) { + element.unshift(1); + } else { + element.unshift(2); + } + }); - EthoTableTransactions.initialize('#tableTransactionsForAll', dataTransactions); - }, 200); + EthoTableTransactions.initialize('#tableTransactionsForAll', dataTransactions); + EthoTransactions.setIsLoading(false); + }, 200); + } } enableKeepInSync() {