Skip to content

Commit

Permalink
client/rpc: print MASP total rewards in conversions query
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Jun 5, 2024
1 parent e332161 commit 35bd91a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions crates/apps_lib/src/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1707,6 +1707,19 @@ pub async fn query_conversions(
) {
// The chosen token type of the conversions
let target_token = args.token;

if target_token.as_ref().is_none() {
// Query and print the total rewards first
let total_rewards = rpc::query_masp_total_rewards(context.client())
.await
.expect("MASP total rewards should be present");
display!(
context.io(),
"Total rewards of native token minted for shielded pool: {}",
total_rewards.to_string_native()
);
}

// To facilitate human readable token addresses
let tokens = context
.wallet()
Expand Down

0 comments on commit 35bd91a

Please sign in to comment.