From 5ff5b655ab1bbb018c6b3d3c5c66462bdce4a19f Mon Sep 17 00:00:00 2001 From: matograine <tom.ngr@zaclys.net> Date: Thu, 24 Sep 2020 18:36:30 +0200 Subject: [PATCH] [fix] #342 : balance command sums up many times the same pubkey return error in that case. --- silkaj/money.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/silkaj/money.py b/silkaj/money.py index cfbbee87..8c2e3a4d 100644 --- a/silkaj/money.py +++ b/silkaj/money.py @@ -48,6 +48,12 @@ async def cmd_amount(ctx, pubkeys): checked_pubkeys = list() for pubkey in pubkeys: pubkey = check_public_key(pubkey, True) + if pubkey in checked_pubkeys: + message_exit( + "Error : pubkey {0} was specified many times".format( + pubkey_with_checksum(pubkey) + ) + ) checked_pubkeys.append(pubkey) if not pubkey: return -- GitLab