Skip to content

Commit

Permalink
Merge pull request #8 from rixombea/master
Browse files Browse the repository at this point in the history
quickfix, remove old default mixin parameter, bump version
  • Loading branch information
rixombea committed Sep 18, 2018
2 parents 2316ce7 + 76d5f1b commit 289600f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion main.js
Expand Up @@ -271,7 +271,7 @@ app.on('activate', () => {
if (win === null) createWindow();
});

process.on('uncaughtException', function (err) {
process.on('uncaughtException', function (e) {
log.error(`Uncaught exception: ${e.message}`);
process.exit(1);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "walletshell",
"productName": "trtlwalletshell",
"version": "0.3.0",
"version": "0.3.1",
"description": "",
"main": "main.js",
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions src/js/svc_request.js
Expand Up @@ -227,8 +227,7 @@ svcRequest.prototype.sendTransaction = function (params) {
//[{address: "TRTLxxxx...", amount: 100}];
var req_params = {
transfers: [{address: params.address, amount: params.amount}],
fee: params.fee,
anonymity: 7
fee: params.fee
};

if(params.paymentId) req_params.paymentId = params.paymentId;
Expand Down
24 changes: 13 additions & 11 deletions src/js/svc_worker.js
Expand Up @@ -22,18 +22,18 @@ function checkBlockUpdate(){
let svc = new svcRequest(SERVICE_CFG);
svc.getStatus().then((blockStatus) => {
let blockCount = parseInt(blockStatus.blockCount,10);
let newKnownBlockCount = parseInt(blockStatus.knownBlockCount, 10);
let knownBlockCount = parseInt(blockStatus.knownBlockCount, 10);

if(blockCount <= BLOCK_COUNT_LOCAL || newKnownBlockCount <= BLOCK_COUNT_NETWORK){
if(blockCount <= BLOCK_COUNT_LOCAL || knownBlockCount <= BLOCK_COUNT_NETWORK){
BLOCK_COUNT_LOCAL = blockCount;
BLOCK_COUNT_NETWORK = newKnownBlockCount;
BLOCK_COUNT_NETWORK = knownBlockCount;
return;
}

BLOCK_COUNT_LOCAL = blockCount;
BLOCK_COUNT_NETWORK = newKnownBlockCount;
BLOCK_COUNT_NETWORK = knownBlockCount;
// add any extras here, so renderer not doing too much thing
let dispKnownBlockCount = (newKnownBlockCount-1);
let dispKnownBlockCount = (knownBlockCount-1);

let dispBlockCount = (blockCount > dispKnownBlockCount ? dispKnownBlockCount : blockCount);

Expand All @@ -56,14 +56,16 @@ function checkBlockUpdate(){
if(BLOCK_COUNT_LOCAL <= 1) return;

// don't check if block count not updated
if(LAST_BLOCK_COUNT_LOCAL === BLOCK_COUNT_LOCAL && TX_CHECK_STARTED) return;
if(LAST_BLOCK_COUNT_LOCAL === BLOCK_COUNT_LOCAL && TX_CHECK_STARTED) {
return;
}

// only check if block count >= 4;
let newBlocks = (BLOCK_COUNT_LOCAL - LAST_BLOCK_COUNT_LOCAL);
if( newBlocks >= 4 ){
checkTransactionsUpdate();
LAST_BLOCK_COUNT_LOCAL = BLOCK_COUNT_LOCAL;
}
//let newBlocks = (BLOCK_COUNT_LOCAL - LAST_BLOCK_COUNT_LOCAL);
//if( newBlocks >= 4 ){
checkTransactionsUpdate();
LAST_BLOCK_COUNT_LOCAL = BLOCK_COUNT_LOCAL;
//}
}).catch((err) => {
return false;
});
Expand Down

0 comments on commit 289600f

Please sign in to comment.