Skip to content
Snippets Groups Projects
Commit 105caa0f authored by matograine's avatar matograine
Browse files

[mod] #377 money.py : document show_amount_from_pubkey()

  change name of variables to be clearer
parent 515a49c6
No related branches found
No related tags found
1 merge request!166[mod] #377 money.py : document show_amount_from_pubkey()
Pipeline #11317 passed
...@@ -77,7 +77,11 @@ async def cmd_amount(ctx, pubkeys): ...@@ -77,7 +77,11 @@ async def cmd_amount(ctx, pubkeys):
await client.close() await client.close()
async def show_amount_from_pubkey(pubkey, inputs_balance): async def show_amount_from_pubkey(label, inputs_balance):
"""
Shows the balance of a pubkey.
`label` can be either a pubkey or "Total".
"""
totalAmountInput = inputs_balance[0] totalAmountInput = inputs_balance[0]
balance = inputs_balance[1] balance = inputs_balance[1]
currency_symbol = await CurrencySymbol().symbol currency_symbol = await CurrencySymbol().symbol
...@@ -86,12 +90,12 @@ async def show_amount_from_pubkey(pubkey, inputs_balance): ...@@ -86,12 +90,12 @@ async def show_amount_from_pubkey(pubkey, inputs_balance):
member = False member = False
# if `pubkey` is a pubkey, get pubkey:checksum and uid # if `pubkey` is a pubkey, get pubkey:checksum and uid
if pubkey != "Total": if label != "Total":
member = await wot.is_member(pubkey) member = await wot.is_member(label)
pubkey = display_pubkey_and_checksum(pubkey) pubkey_and_ck = display_pubkey_and_checksum(label)
# display balance table # display balance table
display = list() display = list()
display.append(["Balance of pubkey", pubkey]) display.append(["Balance of pubkey", pubkey_and_ck])
if member: if member:
display.append(["User identifier", member["uid"]]) display.append(["User identifier", member["uid"]])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment