Skip to content

Commit

Permalink
Increase refresh frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
aivve committed Jul 20, 2022
1 parent ee4493b commit 2c2f8f2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/model/WalletWatchdog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ export class WalletWatchdog {
self.wallet.addNew(Transaction.fromRaw(tx));
self.signalWalletUpdate();
}
/*if (self.workerCurrentProcessing.length > 0) {
let transactionHeight = self.workerCurrentProcessing[self.workerCurrentProcessing.length - 1].height;
if (typeof transactionHeight !== 'undefined')
self.wallet.lastHeight = transactionHeight;
}*/
//if (self.workerCurrentProcessing.length > 0) {
// let transactionHeight = self.workerCurrentProcessing[self.workerCurrentProcessing.length - 1].height;
// if (typeof transactionHeight !== 'undefined')
// self.wallet.lastHeight = transactionHeight;
//}

// we are done processing now
self.workerProcessingWorking = false;
Expand Down Expand Up @@ -124,7 +124,7 @@ export class WalletWatchdog {

this.intervalMempool = setInterval(function () {
self.checkMempool();
}, config.avgBlockTime / 2 * 1000);
}, 30 * 1000);
}
self.checkMempool();
}
Expand Down
2 changes: 1 addition & 1 deletion src/model/blockchain/BlockchainExplorerRPCDaemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class BlockchainExplorerRpcDaemon implements BlockchainExplorer {
}

getHeight(): Promise<number> {
if (Date.now() - this.lastTimeRetrieveInfo < 20 * 1000 && this.cacheHeight !== 0) {
if (Date.now() - this.lastTimeRetrieveInfo < 10 * 1000 && this.cacheHeight !== 0) {
return Promise.resolve(this.cacheHeight);
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class AccountView extends DestructableView{
AppState.enableLeftMenu();
this.intervalRefresh = <any>setInterval(function(){
self.refresh();
}, 1*1000);
}, 1000);
this.refresh();
}

Expand Down

0 comments on commit 2c2f8f2

Please sign in to comment.