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 26, 2024
1 parent b6397f7 commit 02c7916
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 @@ -35,7 +35,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::{BlockHeight, BlockResults, Epoch};
use namada_sdk::tendermint_rpc::endpoint::status;
Expand Down Expand Up @@ -1186,9 +1187,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 02c7916

Please sign in to comment.