Skip to content

Commit

Permalink
debug: checkDeposit
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed Jun 13, 2024
1 parent 1d3ed9a commit ce47ac2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clients/libs/nodejs/coin_status.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ const checkDeposit = async (clientConfig, electrumClient, coin, wallet_network)
const confirmations = blockheight - utxo.height + 1;

const confirmationTarget = clientConfig.confirmationTarget;
console.log("CONFIRMATIONS ", confirmations);
console.log("CONFIRMATION TARGET ", confirmationTarget);
console.log("COIN STATUS ", coin.status);
console.log("BLOCK HEIGHT ", block_height);
console.log("UTXO HEIGHT ", utxo.height);

coin.status = CoinStatus.UNCONFIRMED;

Expand Down Expand Up @@ -180,6 +185,8 @@ const updateCoins = async (clientConfig, electrumClient, db, wallet_name) => {
console.log("COIN STATUS ", coin.status);
let depositResult = await checkDeposit(clientConfig, electrumClient, coin, network);

console.log("DEPOSIT RESULT ", depositResult);

if (depositResult) {
wallet.activities.push(depositResult.activity);
await sqlite_manager.insertTransaction(db, coin.statechain_id, [depositResult.backup_tx]);
Expand Down

0 comments on commit ce47ac2

Please sign in to comment.