Call 'keepfunds' (close trade) on both sides of trade simulation

This commit is contained in:
ghubstan 2021-09-20 12:09:38 -03:00
parent 4689ad5c4b
commit bfff30bcdd
No known key found for this signature in database
GPG Key ID: E35592D6800A861E

View File

@ -536,17 +536,20 @@ executetrade() {
genbtcblocks 2 2 genbtcblocks 2 2
printbreak printbreak
# Complete the trade on the seller side. # Complete the trade on both sides
if [ "$DIRECTION" = "BUY" ]
then
printdate "BOB $BOB_ROLE: Closing trade by keeping funds in Bisq wallet." printdate "BOB $BOB_ROLE: Closing trade by keeping funds in Bisq wallet."
CMD="$CLI_BASE --port=$BOB_PORT keepfunds --trade-id=$OFFER_ID" CMD="$CLI_BASE --port=$BOB_PORT keepfunds --trade-id=$OFFER_ID"
printdate "BOB CLI: $CMD" printdate "BOB CLI: $CMD"
else 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." printdate "ALICE (taker): Closing trade by keeping funds in Bisq wallet."
CMD="$CLI_BASE --port=$ALICE_PORT keepfunds --trade-id=$OFFER_ID" CMD="$CLI_BASE --port=$ALICE_PORT keepfunds --trade-id=$OFFER_ID"
printdate "ALICE CLI: $CMD" printdate "ALICE CLI: $CMD"
fi
KEEP_FUNDS_MSG=$($CMD) KEEP_FUNDS_MSG=$($CMD)
commandalert $? "Could close trade with keepfunds command." commandalert $? "Could close trade with keepfunds command."
# Print the keepfunds command's console output. # Print the keepfunds command's console output.