Skip to content

Commit 2ddda91

Browse files
committed
tx-submission: fix up for cardano-cli breaking change output
1 parent 29817a4 commit 2ddda91

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scripts/bash-fns.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ submit() (
1515
set -euo pipefail
1616
TX_SIGNED="$1"
1717

18-
TXID=$(cardano-cli latest transaction txid --tx-file "$TX_SIGNED")
18+
TXID=$(cardano-cli latest transaction txid --tx-file "$TX_SIGNED" | jq -re .txhash)
1919

2020
echo "Submitting $TX_SIGNED with txid $TXID..."
2121
cardano-cli latest transaction submit --tx-file "$TX_SIGNED"
2222

2323
EXISTS="true"
2424
while [ "$EXISTS" = "true" ]; do
25-
EXISTS=$(cardano-cli latest query tx-mempool tx-exists "$TXID" | jq -r .exists)
25+
EXISTS=$(cardano-cli latest query tx-mempool tx-exists "$TXID" | jq -re .exists)
2626
if [ "$EXISTS" = "true" ]; then
2727
echo "The transaction still exists in the mempool, sleeping 5s: $TXID"
2828
else

scripts/recipes/custom.just

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ fund-transfer ENV SEND_ADDR LOVELACE UTXO="auto":
197197
eval "$CARDANO_CLI" latest transaction submit --tx-file "$BASENAME.signed"
198198
echo
199199

200-
TXID=$(eval "$CARDANO_CLI" latest transaction txid --tx-file "$BASENAME.signed")
200+
TXID=$(eval "$CARDANO_CLI" latest transaction txid --tx-file "$BASENAME.signed" | jq -re .txhash)
201201
EXISTS="true"
202202

203203
while [ "$EXISTS" = "true" ]; do
204-
EXISTS=$(eval "$CARDANO_CLI" latest query tx-mempool tx-exists $TXID | jq -r .exists)
204+
EXISTS=$(eval "$CARDANO_CLI" latest query tx-mempool tx-exists $TXID | jq -re .exists)
205205
if [ "$EXISTS" = "true" ]; then
206206
echo "The transaction still exists in the mempool, sleeping 5s: $TXID"
207207
else

0 commit comments

Comments
 (0)