diff --git a/silkaj/tx.py b/silkaj/tx.py index c7c10ff483d09aa76156e84d9dfca1626081a3e1..b731776b75d2e60c9ac003e24f8cf73dd926c9bc 100644 --- a/silkaj/tx.py +++ b/silkaj/tx.py @@ -30,7 +30,6 @@ from duniterpy.documents import ( Unlock, ) from duniterpy.key import SigningKey -from tabulate import tabulate from silkaj import auth from silkaj import blockchain_tools as bt @@ -168,7 +167,8 @@ No transaction sent." ) if not yes: - confirmation_table = tabulate( + table = tui.Table() + table.fill_rows( gen_confirmation_table( issuer_pubkey, pubkey_amount[0], @@ -177,8 +177,8 @@ No transaction sent." outputbackchange, comment, ), - tablefmt="fancy_grid", ) + confirmation_table = table.draw() if yes or click.confirm( f"{confirmation_table}\nDo you confirm sending this transaction?" diff --git a/tests/test_unit_tx.py b/tests/test_unit_tx.py index d7d5cfb167c3b00649411aba118d3a50ae107558..47814aca0a9c8bfdf671b25feed6bacb7cb5b58c 100644 --- a/tests/test_unit_tx.py +++ b/tests/test_unit_tx.py @@ -974,7 +974,7 @@ def test_send_transaction( """ # mocking functions - patched_gen_confirmation_table = Mock(return_value=None) + patched_gen_confirmation_table = Mock(return_value=["mock list"]) patched_handle_intermediaries_transactions = Mock(return_value=None) # patching functions @@ -1077,8 +1077,6 @@ def construct_args( # generate_and_send_transaction() - - @pytest.mark.parametrize( "key, issuers, tx_amounts, listinput_and_amount, outputAddresses, Comment, OutputbackChange", [