From 0044921c8e603c84931020bc390f9463decd9b8e Mon Sep 17 00:00:00 2001 From: rootzoll Date: Thu, 9 Aug 2018 15:06:06 +0200 Subject: [PATCH] invoice info --- home.admin/BBcreateInvoice.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/home.admin/BBcreateInvoice.sh b/home.admin/BBcreateInvoice.sh index e6fae43..460e14f 100755 --- a/home.admin/BBcreateInvoice.sh +++ b/home.admin/BBcreateInvoice.sh @@ -36,7 +36,7 @@ fi l1="Enter the AMOUNT IN SATOSHI of the invoice:" l2="1 ${network} = 100 000 000 SAT" 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') shred $_temp if [ ${#amount} -eq 0 ]; then @@ -71,10 +71,17 @@ if [ ${#error} -gt 0 ]; then echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" echo "${error}" else - echo "${result}" echo "******************************" echo "WIN" 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 echo "" \ No newline at end of file