bin/drk: Don't separate table rows when printing balances.

This commit is contained in:
parazyd
2021-10-20 21:31:28 +02:00
parent b55faa91a3
commit 8d815c9516

View File

@@ -5,7 +5,7 @@ use std::str::FromStr;
extern crate prettytable;
use clap::{clap_app, ArgMatches};
use log::debug;
use prettytable::Table;
use prettytable::{format, Table};
use serde_json::{json, Value};
use drk::cli::{Config, DrkConfig};
@@ -182,7 +182,8 @@ async fn start(config: &DrkConfig, options: ArgMatches<'_>) -> Result<()> {
if matches.is_present("balances") {
let reply = client.get_balances().await?;
let mut table = Table::new();
table.add_row(row!["token", "amount", "network"]);
table.set_format(*format::consts::FORMAT_NO_LINESEP_WITH_TITLE);
table.set_titles(row!["token", "amount", "network"]);
if reply.as_object().is_some() {
for (tkn, data) in reply.as_object().unwrap() {