diff --git a/crates/apps_lib/src/client/rpc.rs b/crates/apps_lib/src/client/rpc.rs index 5173e0d35e..ab280fb4ff 100644 --- a/crates/apps_lib/src/client/rpc.rs +++ b/crates/apps_lib/src/client/rpc.rs @@ -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; @@ -1188,9 +1189,17 @@ pub async fn query_total_supply( .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 ); } diff --git a/crates/tests/src/integration/ledger_tests.rs b/crates/tests/src/integration/ledger_tests.rs index b4172a77e0..65c0862061 100644 --- a/crates/tests/src/integration/ledger_tests.rs +++ b/crates/tests/src/integration/ledger_tests.rs @@ -1182,8 +1182,7 @@ fn pgf_governance_proposal() -> Result<()> { CapturedOutput::of(|| run(&node, Bin::Client, query_total_supply_args)); assert_matches!(captured.result, Ok(_)); assert!(captured.contains( - "token tnam1q9kn74xfzytqkqyycfrhycr8ajam8ny935cge0z5: 114400023904507 \ - raw units" + "token tnam1q9kn74xfzytqkqyycfrhycr8ajam8ny935cge0z5: 114400023.904507" )); let query_native_supply_args =