From bb9aa8fb2930b3275806a670f914e040249b5de4 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Mon, 22 Apr 2019 00:37:45 +0000 Subject: [PATCH] Fix invoice amount check in recurring-donations --- modules/recurring-donations.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/recurring-donations.nix b/modules/recurring-donations.nix index 7edd91b..00384bc 100644 --- a/modules/recurring-donations.nix +++ b/modules/recurring-donations.nix @@ -16,7 +16,7 @@ let return fi # Decode invoice and compare amount with requested amount - DECODED_AMOUNT=$($LNCLI decodepay "$INVOICE" | jq -r '.amount_msat' | head -c 4) + DECODED_AMOUNT=$($LNCLI decodepay "$INVOICE" | jq -r '.amount_msat' | head -c -8) if [ -z "$DECODED_AMOUNT" ] || [ "$DECODED_AMOUNT" = "null" ]; then echo "ERROR: did not get response from clightning" return