Browse Source

invoice info

#146
rootzoll 7 years ago
parent
commit
0044921c8e
  1. 13
      home.admin/BBcreateInvoice.sh

13
home.admin/BBcreateInvoice.sh

@ -36,7 +36,7 @@ fi
l1="Enter the AMOUNT IN SATOSHI of the invoice:" l1="Enter the AMOUNT IN SATOSHI of the invoice:"
l2="1 ${network} = 100 000 000 SAT" l2="1 ${network} = 100 000 000 SAT"
dialog --title "Pay thru Lightning Network" \ dialog --title "Pay thru Lightning Network" \
--inputbox "$l1\n$l2" 9 40 2>$_temp --inputbox "$l1\n$l2" 9 50 2>$_temp
amount=$(cat $_temp | xargs | tr -dc '0-9') amount=$(cat $_temp | xargs | tr -dc '0-9')
shred $_temp shred $_temp
if [ ${#amount} -eq 0 ]; then if [ ${#amount} -eq 0 ]; then
@ -71,10 +71,17 @@ if [ ${#error} -gt 0 ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "${error}" echo "${error}"
else else
echo "${result}"
echo "******************************" echo "******************************"
echo "WIN" echo "WIN"
echo "******************************" echo "******************************"
echo "It worked :) - check out the service you were paying." echo "${result}"
rhash=$(echo "$result" | grep r_hash | cut -d '"'-f4)
payReq=$(echo "$result" | grep pay_req | cut -d '"'-f4)
echo "Give this Invoice/PaymentRequest to someone to pay it:"
echo ${payReq}
echo "You can use 'lncli lookupinvoice ${rhash}' to check the payment. "
# TODO: Offer to go into monitor for incommin payment loop.
fi fi
echo "" echo ""
Loading…
Cancel
Save