Skip to content

Commit

Permalink
debug: coin validation on sign second interrupt
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed Jun 28, 2024
1 parent 6bfeeef commit bf3b3f5
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion clients/apps/nodejs/test_basic_workflow2.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,27 @@ async function interruptBeforeSignSecond(clientConfig, wallet_1_name, wallet_2_n

// const new_x1 = await get_new_x1(clientConfig, statechain_id, signed_statechain_id, new_auth_pubkey, batchId);

coin = await new_transaction(clientConfig, electrumClient, coin, transfer_address.transfer_receive, isWithdrawal, qtBackupTx, block_height, wallet.network);
const signed_tx = await new_transaction(clientConfig, electrumClient, coin, transfer_address.transfer_receive, isWithdrawal, qtBackupTx, block_height, wallet.network);

// Coin withdrawal is working fine
// let withdraw_address = "bcrt1qgh48u8aj4jvjkalc28lqujyx2wveck4jsm59x9";

// let txid = await mercurynodejslib.withdrawCoin(clientConfig, wallet_1_name, coin.statechain_id, withdraw_address, null);

// console.log("txid: ", txid);

transfer_address = await mercurynodejslib.newTransferAddress(clientConfig, wallet_2_name, null);

coin = await mercurynodejslib.transferSend(clientConfig, wallet_1_name, coin.statechain_id, transfer_address.transfer_receive);

console.log("coin ", coin);

let received_statechain_ids = await mercurynodejslib.transferReceive(clientConfig, wallet_2_name);

console.log("received_statechain_ids: ", received_statechain_ids);

assert(received_statechain_ids.length > 0);
assert(received_statechain_ids[0] == coin.statechain_id);
}

async function interruptSignWithElectrumUnavailability(clientConfig, wallet_1_name, wallet_2_name) {
Expand Down

0 comments on commit bf3b3f5

Please sign in to comment.