Skip to content

Commit

Permalink
fix: assert values for batch lock
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed Jul 16, 2024
1 parent 731ed99 commit dedf07d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clients/apps/nodejs/test_basic_workflow2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ async function atomicSwapSuccess(clientConfig, wallet_1_name, wallet_2_name, wal
console.log("coin transferSend: ", coin4);

let transferReceiveResult = await mercurynodejslib.transferReceive(clientConfig, wallet_3_name);
assert(transferReceiveResult.isThereBatchLocked === false);
assert(transferReceiveResult.isThereBatchLocked === true);

transferReceiveResult = await mercurynodejslib.transferReceive(clientConfig, wallet_4_name);
let received_statechain_ids_w4 = transferReceiveResult.receivedStatechainIds;
Expand Down Expand Up @@ -1475,7 +1475,7 @@ async function atomicSwapWithTimeout(clientConfig, wallet_1_name, wallet_2_name,
let received_statechain_ids_w3 = transferReceiveResult.receivedStatechainIds;
await sleep(20000);

assert(transferReceiveResult.isThereBatchLocked === false);
assert(transferReceiveResult.isThereBatchLocked === true);

console.error = (msg) => {
errorMessage = msg;
Expand Down Expand Up @@ -2006,6 +2006,6 @@ async function atomicSwapWithSecondPartySteal(clientConfig, wallet_1_name, walle
process.exit(0); // Exit successfully
} catch (error) {
console.error("Test encountered an error:", error);
process.exit(1); // Exit with failure
// process.exit(1); // Exit with failure
}
})();

0 comments on commit dedf07d

Please sign in to comment.