treewide: use consistent echo message formatting

Quote the echo message.
This commit is contained in:
Erik Arvstedt
2021-08-15 11:29:34 +02:00
parent b8043d3db5
commit f14af1fc48
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ let
pay_tallycoin() {
NAME=$1
AMOUNT=$2
echo Attempting to pay $AMOUNT sat to $NAME
echo "Attempting to pay $AMOUNT sat to $NAME"
INVOICE=$(curl --socks5-hostname ${config.nix-bitcoin.torClientAddressWithPort} -d "satoshi_amount=$AMOUNT&payment_method=ln&id=$NAME&type=profile" -X POST https://api.tallyco.in/v1/payment/request/ | jq -r '.lightning_pay_request') 2> /dev/null
if [ -z "$INVOICE" ] || [ "$INVOICE" = "null" ]; then
echo "ERROR: did not get invoice from tallycoin"
@@ -23,10 +23,10 @@ let
return
fi
if [ $DECODED_AMOUNT -eq $AMOUNT ]; then
echo Paying with invoice "$INVOICE"
echo "Paying with invoice $INVOICE"
$LNCLI pay "$INVOICE"
else
echo ERROR: requested amount and invoice amount do not match. $AMOUNT vs $DECODED_AMOUNT
echo "ERROR: requested amount and invoice amount do not match. $AMOUNT vs $DECODED_AMOUNT"
return
fi
}