From 584fb36aa909532271ab0452c95b45bb0c2a2a9b Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Sun, 24 May 2020 14:21:08 +0200
Subject: [PATCH] [mod] #172: balance: Properly name variables

To represent what they contain:
- value -> inputs_balance
- amount -> balance
---
 silkaj/money.py | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/silkaj/money.py b/silkaj/money.py
index 54aa89c8..57088b29 100644
--- a/silkaj/money.py
+++ b/silkaj/money.py
@@ -48,10 +48,10 @@ async def cmd_amount(ctx, pubkeys):
                 return
         total = [0, 0]
         for pubkey in pubkeys:
-            value = await get_amount_from_pubkey(pubkey)
-            await show_amount_from_pubkey(pubkey, value)
-            total[0] += value[0]
-            total[1] += value[1]
+            inputs_balance = await get_amount_from_pubkey(pubkey)
+            await show_amount_from_pubkey(pubkey, inputs_balance)
+            total[0] += inputs_balance[0]
+            total[1] += inputs_balance[1]
         if len(pubkeys) > 1:
             await show_amount_from_pubkey("Total", total)
     else:
@@ -61,21 +61,21 @@ async def cmd_amount(ctx, pubkeys):
     await client.close()
 
 
-async def show_amount_from_pubkey(pubkey, value):
-    totalAmountInput = value[0]
-    amount = value[1]
+async def show_amount_from_pubkey(pubkey, inputs_balance):
+    totalAmountInput = inputs_balance[0]
+    balance = inputs_balance[1]
     currency_symbol = await CurrencySymbol().symbol
     ud_value = await UDValue().ud_value
     average, monetary_mass = await get_average()
     # display balance table
     display = list()
     display.append(["Balance of pubkey", pubkey])
-    if totalAmountInput - amount != 0:
+    if totalAmountInput - balance != 0:
         display_amount(display, "Blockchain", amount, ud_value, currency_symbol)
         display_amount(
             display,
             "Pending transaction",
-            (totalAmountInput - amount),
+            (totalAmountInput - balance),
             ud_value,
             currency_symbol,
         )
-- 
GitLab