From 43fec2fa363b515242e62e0eb77616d60794d650 Mon Sep 17 00:00:00 2001 From: atrax <atrax@prtn.email> Date: Mon, 30 Nov 2020 10:48:23 +0100 Subject: [PATCH] [fix] #296 : Prevent sending 0 with --allSources --- silkaj/tx.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/silkaj/tx.py b/silkaj/tx.py index 03779a60..49312df6 100644 --- a/silkaj/tx.py +++ b/silkaj/tx.py @@ -110,6 +110,11 @@ async def send_transaction( pubkey_amount = await money.get_amount_from_pubkey(issuer_pubkey) if allsources: + if pubkey_amount[0] <= 0: + message_exit( + f"Error: Issuer pubkey {display_pubkey_and_checksum(issuer_pubkey)} is empty. No transaction sent." + ) + tx_amounts = [pubkey_amount[0]] recipients = list(recipients) -- GitLab