<p></p>
<p><b>@sqrrm</b> commented on this pull request.</p>

<p>I think it would be good to cancel stop the script if it fails at any step. My first time running Bob couldn't find any offers to take but still continued to try to take it. Just looks a bit odd that the script continues after it fails one step that it later depends on.</p><hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/5082#discussion_r559512534">apitest/scripts/trading-script-env.sh</a>:</p>
<pre style='color:#555'>> +getdummyacctid() {
+       PORT=$1
+       PAYMENT_ACCTS=$(${CLI_BASE} --port=${PORT} getpaymentaccts)
+       DUMMY_ACCT_1=$(echo -e "${PAYMENT_ACCTS}" | sed -n '2p')
+       DUMMY_ACCT_2=$(echo -e "${PAYMENT_ACCTS}" | sed -n '3p')
+       if [[ "$DUMMY_ACCT_1=" == *"PerfectMoney dummy"* ]]; then
+               DUMMY_ACCT=$DUMMY_ACCT_1
+       else
+               DUMMY_ACCT=$DUMMY_ACCT_2
+       fi
+       ACCT_ID=$(echo -e $DUMMY_ACCT | awk '{print $NF}')
+       echo "${ACCT_ID}"
+}
+
+createoffer() {
+       CREATE_OFFER_CMD=$1
</pre>
<p>Indent</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/5082#discussion_r559512609">apitest/scripts/trading-script-env.sh</a>:</p>
<pre style='color:#555'>> +    if [[ "$DUMMY_ACCT_1=" == *"PerfectMoney dummy"* ]]; then
+               DUMMY_ACCT=$DUMMY_ACCT_1
+       else
+               DUMMY_ACCT=$DUMMY_ACCT_2
+       fi
+       ACCT_ID=$(echo -e $DUMMY_ACCT | awk '{print $NF}')
+       echo "${ACCT_ID}"
+}
+
+createoffer() {
+       CREATE_OFFER_CMD=$1
+    OFFER_DESC=$($CREATE_OFFER_CMD)
+
+    ### This is an effort to handling any createoffer error.  If error, should echo Error, and the calling script
+    ### should sleep awhile then exit 1.
+       if [[ "$OFFER_DESC" != "Buy/Sell"* ]]; then
</pre>
<p>Indent</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/5082#discussion_r559513691">apitest/scripts/trading-script-env.sh</a>:</p>
<pre style='color:#555'>> +    STRING=$1
+       NEW_STRING=$(sed 's/+/\\&/g' <<< ${STRING})
</pre>
<p>Seems there is inconsistent usage of tab vs space for indentation</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/5082#pullrequestreview-570419267">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNUWXDR3DG72C75HNRDS2QQU3ANCNFSM4WDFMYXA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNXBUYNA7ZH35NVBKATS2QQU3A5CNFSM4WDFMYXKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOEH76QQY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/5082#pullrequestreview-570419267",
"url": "https://github.com/bisq-network/bisq/pull/5082#pullrequestreview-570419267",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>