Update BBopenChannel.sh (#1751)

This commit is contained in:
Hear7beaT 2020-11-10 23:54:58 +00:00 committed by GitHub
parent 2d8aa90c55
commit 07e03b21c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,7 @@ if [ $(echo "${error}" | grep "channel is too small" -c) -eq 1 ]; then
minSat=$(echo "${error}" | tr -dc '0-9') minSat=$(echo "${error}" | tr -dc '0-9')
fi fi
# let user enter a amount # let user enter an amount
l1="Amount in SATOSHI to fund this channel:" l1="Amount in SATOSHI to fund this channel:"
l2="min required : ${minSat}" l2="min required : ${minSat}"
l3="max available : ${confirmedBalance}" l3="max available : ${confirmedBalance}"
@ -104,8 +104,22 @@ if [ ${#amount} -eq 0 ]; then
exit 1 exit 1
fi fi
# let user enter a confirmation target
l1=""
l2="Urgent = 1 / Economy = 20"
dialog --title "Set confirmation target" \
--inputbox "$l1\n$l2" 10 60 2>$_temp
conf_target=$(cat $_temp | xargs | tr -dc '0-9')
shred -u $_temp
if [ ${#conf_target} -eq 0 ]; then
echo
echo "no valid target entered - returning to menu ..."
sleep 4
exit 1
fi
# build command # build command
command="lncli --chain=${network} --network=${chain}net openchannel --conf_target=1 ${pubKey} ${amount} 0" command="lncli --chain=${network} --network=${chain}net openchannel --conf_target=${conf_target} ${pubKey} ${amount} 0"
# info output # info output
clear clear