diff --git a/silkaj/money.py b/silkaj/money.py index 0cc875eb0e4b595e642f0afae97f7243f015580d..31d95adea9d8d2e5a6ad4361de3d0f501eeec915 100644 --- a/silkaj/money.py +++ b/silkaj/money.py @@ -16,7 +16,6 @@ along with Silkaj. If not, see <https://www.gnu.org/licenses/>. """ from click import command, argument, pass_context, echo -from tabulate import tabulate from silkaj.network_tools import ClientInstance from silkaj.blockchain_tools import HeadBlock @@ -30,7 +29,7 @@ from silkaj.crypto_tools import ( check_pubkey_format, validate_checksum, ) -from silkaj.tui import display_amount, display_pubkey_and_checksum +from silkaj.tui import display_amount, display_pubkey_and_checksum, create_table from duniterpy.api.bma import tx, blockchain from duniterpy.documents.transaction import InputSource @@ -105,7 +104,10 @@ async def show_amount_from_pubkey(pubkey, inputs_balance): "{0} x M/N".format(round(totalAmountInput / average, 2)), ] ) - echo(tabulate(display, tablefmt="fancy_grid")) + table = create_table() + table.set_header_align(["l", "l"]) + table.add_rows(display) + echo(table.draw()) async def get_average(): diff --git a/tests/test_end_to_end.py b/tests/test_end_to_end.py index 9dc2fe2f7fe869ad5133ad323a39f45f57db33cf..76fd8a2ba719d277802f42c12474b31c5c7e0bdf 100644 --- a/tests/test_end_to_end.py +++ b/tests/test_end_to_end.py @@ -52,7 +52,7 @@ def test_balance(): silkaj + ["--gtest", "balance", "3dnbnYY9i2bHMQUGyFp5GVvJ2wBkVpus31cDJA5cfRpj"] ).decode() assert ( - "│ Balance of pubkey │ 3dnbnYY9i2bHMQUGyFp5GVvJ2wBkVpus31cDJA5cfRpj:EyF │" + "│ Balance of pubkey │ 3dnbnYY9i2bHMQUGyFp5GVvJ2wBkVpus31cDJA5cfRpj: │" in output ) assert "│ Total amount (unit|relative) │" in output