From bfff30bcdd8c3fc4c1ba368593c14d6657f9dca5 Mon Sep 17 00:00:00 2001 From: ghubstan <36207203+ghubstan@users.noreply.github.com> Date: Mon, 20 Sep 2021 12:09:38 -0300 Subject: [PATCH] Call 'keepfunds' (close trade) on both sides of trade simulation --- apitest/scripts/trade-simulation-utils.sh | 25 +++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/apitest/scripts/trade-simulation-utils.sh b/apitest/scripts/trade-simulation-utils.sh index 3ed7d3488b..c43beaf2ec 100755 --- a/apitest/scripts/trade-simulation-utils.sh +++ b/apitest/scripts/trade-simulation-utils.sh @@ -536,17 +536,20 @@ executetrade() { genbtcblocks 2 2 printbreak - # Complete the trade on the seller side. - if [ "$DIRECTION" = "BUY" ] - then - printdate "BOB $BOB_ROLE: Closing trade by keeping funds in Bisq wallet." - CMD="$CLI_BASE --port=$BOB_PORT keepfunds --trade-id=$OFFER_ID" - printdate "BOB CLI: $CMD" - else - printdate "ALICE (taker): Closing trade by keeping funds in Bisq wallet." - CMD="$CLI_BASE --port=$ALICE_PORT keepfunds --trade-id=$OFFER_ID" - printdate "ALICE CLI: $CMD" - fi + # Complete the trade on both sides + printdate "BOB $BOB_ROLE: Closing trade by keeping funds in Bisq wallet." + CMD="$CLI_BASE --port=$BOB_PORT keepfunds --trade-id=$OFFER_ID" + printdate "BOB CLI: $CMD" + KEEP_FUNDS_MSG=$($CMD) + commandalert $? "Could close trade with keepfunds command." + # Print the keepfunds command's console output. + printdate "$KEEP_FUNDS_MSG" + sleeptraced 3 + printbreak + + printdate "ALICE (taker): Closing trade by keeping funds in Bisq wallet." + CMD="$CLI_BASE --port=$ALICE_PORT keepfunds --trade-id=$OFFER_ID" + printdate "ALICE CLI: $CMD" KEEP_FUNDS_MSG=$($CMD) commandalert $? "Could close trade with keepfunds command." # Print the keepfunds command's console output.