Skip to content
Snippets Groups Projects
Commit 19896c30 authored by Moul's avatar Moul
Browse files

[enh] tx: Rework confirmation fields titles

parent d576ab0c
No related branches found
No related tags found
2 merge requests!146Merge dev into master branch to complete v0.8.0 development cycle,!144Rework tables fields
Pipeline #9864 passed
......@@ -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
......
......@@ -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(
......
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