From 05d7972e6f56184a559ba1f22a8165b62e4a3711 Mon Sep 17 00:00:00 2001 From: Raumi <@raumi75> Date: Wed, 20 Feb 2019 08:32:10 +0100 Subject: [PATCH] Add option to display QR-code for funding --- home.admin/BBfundWallet.sh | 11 +++++++++++ home.admin/XXdisplayQR.sh | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 home.admin/XXdisplayQR.sh diff --git a/home.admin/BBfundWallet.sh b/home.admin/BBfundWallet.sh index 4e995f3..6d1413c 100755 --- a/home.admin/BBfundWallet.sh +++ b/home.admin/BBfundWallet.sh @@ -68,3 +68,14 @@ fi echo "Whats next? --> Wait for confirmations. You can use info on LCD to check if funds have arrived." echo "If you want your lighting node to open channels automatically, activate the 'Autopilot' under 'Activate/Deactivate Services'" echo "" + +echo "" +echo "******************************" +echo "QR-Code? (Y/N)" +echo "******************************" +echo "Would you like to see a QR-code of this address? Press Y" +read -n1 key + +if [ "$key" = "y" ]; then + /home/admin/XXdisplayQR.sh $network:${address} +fi diff --git a/home.admin/XXdisplayQR.sh b/home.admin/XXdisplayQR.sh new file mode 100755 index 0000000..1d03012 --- /dev/null +++ b/home.admin/XXdisplayQR.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Display a QR code provided as parameter $1 + +qrcode=$1 + +# make sure qrcode-encoder in installed +clear +echo "*** Setup ***" +sudo apt-get install qrencode -y + +clear +echo "Make the this terminal as big as possible - fullscreen would be best." +echo "Then PRESS ENTER here in the terminal to generare the QR code and scan it with the app." +read key + +clear +echo -e "$1" | qrencode -t ANSI256 +echo -e "$1" +echo "(To shrink QR code: OSX->CMD- / LINUX-> CTRL-) Press ENTER when finished." +read key + +clear