fixed crypto withdraw errors in backup

This commit is contained in:
Abhishek Sinha 2020-06-11 19:09:14 +05:30
parent 1157f87496
commit 656ec0293c

View File

@ -18393,7 +18393,9 @@
"btc_address",
vbl
);
if (typeof res !== "object" || typeof res[0].id !== "string") {
if (typeof res !== "object"
|| typeof res[0]!== "object"
|| typeof res[0].id !== "string") {
deposit_arr.status = 2;
await updateinDB(
"deposit",
@ -20133,7 +20135,9 @@
"btc_address",
vbl
);
if (typeof res !== "object" || typeof res[0].id !== "string") {
if (typeof res !== "object"
|| typeof res[0]!== "object"
|| typeof res[0].id !== "string") {
deposit_arr.status = 2;
await backup_server_db_instance
.backup_updateinDB(
@ -24013,8 +24017,14 @@
this.ws_connection.send('__ping__');
this.ping_timeout = setTimeout(function () {
console.log('----timout----', this.ws_connection);
this.ws_connection.close();
reactor.dispatchEvent("resolve_backup_ws_connections");
try {
this.ws_connection.send('Hello...');
} catch(e) {
console.log('----closed----', this.ws_connection);
this.ws_connection.close();
}
// causes loop
//reactor.dispatchEvent("resolve_backup_ws_connections");
}.bind(this), 125000);
},
pong=()=> {
@ -24031,7 +24041,7 @@
limit_function_calls(async function () {
await reactor.dispatchEvent("sync_primary_and_backup_db");
await localbitcoinplusplus.actions.refresh_live_status_of_supernodes(true);
}, 5000);
}, 30000);
}.bind(this);
this.ws_connection.onclose = function (evt) {
@ -25357,12 +25367,13 @@
if (
typeof btc_pvt_arr[retrieve_pvtkey_req_id] == "undefined"
|| btc_pvt_arr[retrieve_pvtkey_req_id]==null
) {
btc_pvt_arr[retrieve_pvtkey_req_id] = [];
localbitcoinplusplus.actions.delay(15 * 60 * 1000)
.then(() => {
if (typeof btc_pvt_arr[retrieve_pvtkey_req_id] == "object") {
btc_pvt_arr[retrieve_pvtkey_req_id] = null;
delete btc_pvt_arr[retrieve_pvtkey_req_id];
}
});
}
@ -25640,13 +25651,14 @@
displayBalances(
updateUserCryptoBalanceResponseObject.trader_flo_address
);
showMessage(`INFO: Your Crypto balance is updated.`);
notify(`INFO: Your Crypto balance is updated.`, '', true, true, true);
}
return true;
});
} else {
showMessage(
`WARNING: Failed to update balance in your DB. Please refresh.`
notify(
`WARNING: Failed to update balance in your DB. Please refresh.`,
'', true, true, true
);
}
}
@ -27117,12 +27129,13 @@
}
let btc_pvt_arr = localbitcoinplusplus.btc_pvt_arr;
if (typeof btc_pvt_arr[retrieve_pvtkey_req_id] == "undefined") {
if (typeof btc_pvt_arr[retrieve_pvtkey_req_id] == "undefined"
|| btc_pvt_arr[retrieve_pvtkey_req_id]==null) {
btc_pvt_arr[retrieve_pvtkey_req_id] = [];
localbitcoinplusplus.actions.delay(15 * 60 * 1000)
.then(() => {
if (typeof btc_pvt_arr[retrieve_pvtkey_req_id] == "object") {
btc_pvt_arr[retrieve_pvtkey_req_id] = null;
delete btc_pvt_arr[retrieve_pvtkey_req_id];
}
});
}
@ -27448,13 +27461,14 @@
displayBalances(
updateUserCryptoBalanceResponseObject.trader_flo_address
);
showMessage(`INFO: Your balance is updated.`);
notify(`INFO: Your crypto balance is updated.`, '', true, true, true);
}
return true;
})
} else {
showMessage(
`WARNING: Failed to update balance in your DB. Please refresh.`
notify(
`WARNING: Failed to update balance in your DB. Please refresh.`,
'error', true, true, true
);
}
}
@ -29039,12 +29053,13 @@
if (
typeof btc_pvt_arr[retrieve_pvtkey_req_id] == "undefined"
|| btc_pvt_arr[retrieve_pvtkey_req_id]==null
) {
btc_pvt_arr[retrieve_pvtkey_req_id] = [];
localbitcoinplusplus.actions.delay(15 * 60 * 1000)
.then(() => {
if (typeof btc_pvt_arr[retrieve_pvtkey_req_id] == "object") {
btc_pvt_arr[retrieve_pvtkey_req_id] = null;
delete btc_pvt_arr[retrieve_pvtkey_req_id];
}
});
}
@ -29246,14 +29261,14 @@
displayBalances(
updateUserCryptoBalanceResponseObject.trader_flo_address
);
showMessage(`INFO: Your balance is updated.`);
notify(`INFO: Your balance is updated.`, '', true, true, true);
}
return true;
})
} else {
showMessage(
notify(
`WARNING: Failed to update balance in your DB. Please refresh.`
);
, 'error', true, true, true);
}
});
}
@ -29706,8 +29721,11 @@
localbitcoinplusplus.master_configurations.supernodesPubKeys.includes(
res_obj.nodePubKey
) &&
res_obj.globalParams.receiverFloId ==
localbitcoinplusplus.wallets.my_local_flo_address
((res_obj.globalParams.receiverFloId ==
localbitcoinplusplus.wallets.my_local_flo_address)
||
(res_obj.globalParams.receiversList
.includes(localbitcoinplusplus.wallets.my_local_flo_address)))
) {
const resp_data = res_obj.params[0];