mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-01-24 23:04:28 +01:00
Seperate JQ select not to break return code from get_transactions
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user