Skip to content

Commit

Permalink
format denominated amount
Browse files Browse the repository at this point in the history
  • Loading branch information
brentstone committed Aug 27, 2024
1 parent 5e2414b commit 82bc7d0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions crates/apps_lib/src/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ use namada_sdk::proof_of_stake::types::{
use namada_sdk::proof_of_stake::PosParams;
use namada_sdk::queries::{Client, RPC};
use namada_sdk::rpc::{
self, enriched_bonds_and_unbonds, query_epoch, TxResponse,
self, enriched_bonds_and_unbonds, format_denominated_amount, query_epoch,
TxResponse,
};
use namada_sdk::storage::BlockResults;
use namada_sdk::tendermint_rpc::endpoint::status;
Expand Down Expand Up @@ -1188,9 +1189,17 @@ pub async fn query_total_supply<N: Namada>(
.total_supply(context.client(), &token)
.await,
);
let amount_str = format_denominated_amount(
context.client(),
context.io(),
&token,
supply,
)
.await;
display_line!(
context.io(),
"Total supply of token {token}: {supply} raw units"
"Total supply of token {token}: {}",
amount_str
);
}

Expand Down

0 comments on commit 82bc7d0

Please sign in to comment.