From 9d9035b43fbac4aa9969cbd2a64a234d3736f923 Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Sun, 25 Sep 2022 15:08:24 +0300 Subject: [PATCH] Fix sendpayment without amount argument, BIP21 only Fixes bug introduced with 83c6bc053a8f5a10c00bedb4c2c9d7acb9afdb8e --- scripts/sendpayment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sendpayment.py b/scripts/sendpayment.py index 05ff401..630b94f 100755 --- a/scripts/sendpayment.py +++ b/scripts/sendpayment.py @@ -96,7 +96,7 @@ def main(): sweeping = True destaddr = args[2] mixdepth = options.mixdepth - if btc.is_bip21_uri(args[2]): + if len(args) > 2 and btc.is_bip21_uri(args[2]): parsed = btc.decode_bip21_uri(args[2]) if 'amount' in parsed: parser.error("Specify amount as a separate argument or amount in BIP21 URI, not both.")