listener for blocks and 6 confirmations

This commit is contained in:
Cofresi 2016-11-22 09:25:39 -04:00
parent c4c5a1945d
commit 5e3d2530aa

View file

@ -189,6 +189,7 @@
if (found) { if (found) {
console.log('all good. Count up confirmations.'); console.log('all good. Count up confirmations.');
confirmations = confirmations + 1; confirmations = confirmations + 1;
console.log('we have ' + confirmations + ' confirmations...');
} }
else { else {
console.log('txid not in new block'); console.log('txid not in new block');
@ -205,6 +206,7 @@
else { else {
// for the time being just count up the confirmations without confirming everytime if the transaction is still inside the previous blocks // for the time being just count up the confirmations without confirming everytime if the transaction is still inside the previous blocks
confirmations = confirmations + 1; confirmations = confirmations + 1;
console.log('we have ' + confirmations + ' confirmations...');
} }
if (confirmations >= 6) { if (confirmations >= 6) {
@ -227,6 +229,7 @@
var blockhash = data; var blockhash = data;
// for the time being just count up the confirmations without confirming everytime if the transaction is still inside the previous blocks // for the time being just count up the confirmations without confirming everytime if the transaction is still inside the previous blocks
confirmations = confirmations + 1; confirmations = confirmations + 1;
console.log('we have ' + confirmations + ' confirmations...');
if (confirmations >= 6) { if (confirmations >= 6) {
$('.walletCommands#walletCommandsSubmit').removeClass('hidden'); $('.walletCommands#walletCommandsSubmit').removeClass('hidden');
} }
@ -462,7 +465,7 @@
} }
return true; return true;
}; };
</script> </script>