Seperate JQ select not to break return code from get_transactions

This commit is contained in:
g-homebase
2019-12-17 11:23:48 -05:00
committed by kexkey
parent fb43565550
commit 8b0954bf85
2 changed files with 6 additions and 5 deletions

View File

@@ -29,10 +29,9 @@ confirmation() {
local returncode
local txid=${1}
local txn_payload
local tx_details
# We need make sure to discard error results generated by get_transction tryin to find a watching wallet's `txn in
# spender wallet first,return code will tell if there's an actaul error. See #153
tx_details=$(get_transaction ${txid} | jq '. | select(.result != null)')
txn_payload="$(get_transaction ${txid})"
returncode=$?
trace_rc ${returncode}
trace "[confirmation] tx_details=${tx_details}"
@@ -40,7 +39,9 @@ confirmation() {
trace "[confirmation] Transaction not in watcher, exiting."
return 0
fi
# We need make sure to discard error results generated by get_transction tryin to find a watching wallet's `txn in
# spender wallet first,return code will tell if there's an actaul error. See #153
tx_details="$(echo $txn_payload | jq '. | select(.result != null)')"
########################################################################################################
# First of all, let's make sure we're working on watched addresses...
local address

View File

@@ -42,8 +42,8 @@ get_unused_addresses_by_watchlabel(){
AND NOT EXISTS (
SELECT 1 FROM watching_tx WHERE watching_id = w.id
)
LIMIT 0,${2-10}
ORDER BY w.pub32_index ASC
LIMIT 0,${2-10}
HERE
)
label_unused_addrs=$(sql "$query")