Skip to content

Commit

Permalink
CLI: add BIC to accounts lists (#1826)
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez authored Jan 10, 2024
1 parent 679b8fa commit a2cfbe3
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions cli/src/wallet_cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,18 @@ pub async fn accounts_command(wallet: &Wallet) -> Result<(), Error> {
let output_id = account.output_id;
let account_id = account.output.as_account().account_id_non_null(&output_id);
let account_address = account_id.to_bech32(wallet.client().get_bech32_hrp().await?);
let bic = wallet
.client()
.get_account_congestion(&account_id)
.await?
.block_issuance_credits;

println_log_info!(
"{:<16} {output_id}\n{:<16} {account_id}\n{:<16} {account_address}\n",
"{:<16} {output_id}\n{:<16} {account_id}\n{:<16} {account_address}\n{:<16} {bic}\n",
"Output ID:",
"Account ID:",
"Account Address:"
"Account Address:",
"BIC:"
);
}

Expand Down Expand Up @@ -697,12 +703,18 @@ pub async fn implicit_accounts_command(wallet: &Wallet) -> Result<(), Error> {
let output_id = implicit_account.output_id;
let account_id = AccountId::from(&output_id);
let account_address = account_id.to_bech32(wallet.client().get_bech32_hrp().await?);
let bic = wallet
.client()
.get_account_congestion(&account_id)
.await?
.block_issuance_credits;

println_log_info!(
"{:<16} {output_id}\n{:<16} {account_id}\n{:<16} {account_address}\n",
"{:<16} {output_id}\n{:<16} {account_id}\n{:<16} {account_address}\n{:<16} {bic}\n",
"Output ID:",
"Account ID:",
"Account Address:"
"Account Address:",
"BIC:"
);
}

Expand Down

0 comments on commit a2cfbe3

Please sign in to comment.