mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-20 13:02:21 +02:00
invoice info
This commit is contained in:
@@ -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 ""
|
Reference in New Issue
Block a user