+ indicators for future use

! check for error in syncing
- consoloe.log line
This commit is contained in:
Taegus
2018-12-31 09:51:43 +01:00
parent b70e0405ad
commit ab0a7356d2
4 changed files with 60 additions and 23 deletions

View File

@@ -55,7 +55,6 @@ class MainGUI {
$("#btnGeneralConfirmYes").click(function() {
$('#dlgGeneralConfirm').iziModal('close');
console.log(true);
callback(true);
});

View File

@@ -50,29 +50,31 @@ function StartSyncProcess() {
}
nodeSyncInterval = setInterval(function()
{
{
web3Local.eth.getBlock("latest", function(error, localBlock) {
if (localBlock.number > 0) {
if (!EthoTransactions.getIsSyncing()) {
SyncProgress.animate(1);
SyncProgress.setText(vsprintf('%d/%d (100%%)', [localBlock.number, localBlock.number]));
}
if (alreadyCatchedUp == false)
{
// clear the repeat interval and render wallets
$(document).trigger("onNewAccountTransaction");
alreadyCatchedUp = true;
isFullySynced = true;
// enable the keep in sync feature
EthoTransactions.enableKeepInSync();
// sync all the transactions to the current block
EthoTransactions.syncTransactionsForAllAddresses(localBlock.number);
// signal that the sync is complete
$(document).trigger("onSyncComplete");
}
if (!error) {
if (localBlock.number > 0) {
if (!EthoTransactions.getIsSyncing()) {
SyncProgress.animate(1);
SyncProgress.setText(vsprintf('%d/%d (100%%)', [localBlock.number, localBlock.number]));
}
if (alreadyCatchedUp == false)
{
// clear the repeat interval and render wallets
$(document).trigger("onNewAccountTransaction");
alreadyCatchedUp = true;
isFullySynced = true;
// enable the keep in sync feature
EthoTransactions.enableKeepInSync();
// sync all the transactions to the current block
EthoTransactions.syncTransactionsForAllAddresses(localBlock.number);
// signal that the sync is complete
$(document).trigger("onSyncComplete");
}
}
}
});
}, 10000);