From 19896c30e392c062095cd36a9deecd9730044cc3 Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Sat, 3 Oct 2020 12:41:30 +0200 Subject: [PATCH] [enh] tx: Rework confirmation fields titles --- silkaj/tx.py | 14 +++++++------- tests/test_unit_tx.py | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/silkaj/tx.py b/silkaj/tx.py index bcc5f499..080245f7 100644 --- a/silkaj/tx.py +++ b/silkaj/tx.py @@ -238,35 +238,35 @@ async def transaction_confirmation( # display account situation display_amount( tx, - "pubkey's balance before tx", + "Initial balance", pubkey_amount, ud_value, currency_symbol, ) display_amount( tx, - "total transaction amount", + "Total transaction amount", total_tx_amount, ud_value, currency_symbol, ) display_amount( tx, - "pubkey's balance after tx", + "Balance after transaction", (pubkey_amount - total_tx_amount), ud_value, currency_symbol, ) - await display_pubkey(tx, "from", issuer_pubkey) + await display_pubkey(tx, "From", issuer_pubkey) # display outputs and amounts for outputAddress, tx_amount in zip(outputAddresses, tx_amounts): - await display_pubkey(tx, "to", outputAddress) + await display_pubkey(tx, "To", outputAddress) await sleep(ASYNC_SLEEP) - display_amount(tx, "amount", tx_amount, ud_value, currency_symbol) + display_amount(tx, "Amount", tx_amount, ud_value, currency_symbol) # display last informations if outputBackChange: await display_pubkey(tx, "Backchange", outputBackChange) - tx.append(["comment", comment]) + tx.append(["Comment", comment]) return tx diff --git a/tests/test_unit_tx.py b/tests/test_unit_tx.py index d0b755cb..2ff4f9ea 100644 --- a/tests/test_unit_tx.py +++ b/tests/test_unit_tx.py @@ -169,34 +169,34 @@ async def test_transaction_confirmation( # display account situation display_amount( expected, - "pubkey's balance before tx", + "Initial balance", pubkey_balance, ud_value, currency_symbol, ) display_amount( expected, - "total transaction amount", + "Total transaction amount", total_tx_amount, ud_value, currency_symbol, ) display_amount( expected, - "pubkey's balance after tx", + "Balance after transaction", (pubkey_balance - total_tx_amount), ud_value, currency_symbol, ) - await display_pubkey(expected, "from", issuer_pubkey) + await display_pubkey(expected, "From", issuer_pubkey) # display recipients and amounts for outputAddress, tx_amount in zip(outputAddresses, tx_amounts): - await display_pubkey(expected, "to", outputAddress) - display_amount(expected, "amount", tx_amount, ud_value, currency_symbol) + await display_pubkey(expected, "To", outputAddress) + display_amount(expected, "Amount", tx_amount, ud_value, currency_symbol) # display backchange and comment if outputBackChange: await display_pubkey(expected, "Backchange", outputBackChange) - expected.append(["comment", comment]) + expected.append(["Comment", comment]) # asserting tx = await transaction_confirmation( -- GitLab