From 35bd91a396da41cc23f30b561bf1e7dc2a0cdb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Wed, 5 Jun 2024 17:12:06 +0200 Subject: [PATCH] client/rpc: print MASP total rewards in conversions query --- crates/apps_lib/src/client/rpc.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/apps_lib/src/client/rpc.rs b/crates/apps_lib/src/client/rpc.rs index 941fa834444..e2359a70152 100644 --- a/crates/apps_lib/src/client/rpc.rs +++ b/crates/apps_lib/src/client/rpc.rs @@ -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()