Skip to content

Commit

Permalink
specify token addr to query_tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Mar 20, 2024
1 parent 104245b commit 76c3849
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions crates/apps/src/lib/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ pub async fn query_transfers(
let mut shielded = context.shielded_mut().await;
let _ = shielded.load().await;
// Precompute asset types to increase chances of success in decoding
let token_map = query_tokens(context, None, None, true).await;
let token_map =
query_tokens(context, query_token.as_ref(), None, true).await;

Check warning on line 178 in crates/apps/src/lib/client/rpc.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/client/rpc.rs#L177-L178

Added lines #L177 - L178 were not covered by tests
let tokens = token_map.values().collect();
let _ = shielded
.precompute_asset_types(context.client(), tokens)
Expand Down Expand Up @@ -489,7 +490,8 @@ pub async fn query_pinned_balance(
let _ = context.shielded_mut().await.load().await;
// Precompute asset types to increase chances of success in decoding
let token_map =
query_tokens(context, None, None, args.show_ibc_tokens).await;
query_tokens(context, args.token.as_ref(), None, args.show_ibc_tokens)
.await;

Check warning on line 494 in crates/apps/src/lib/client/rpc.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/client/rpc.rs#L492-L494

Added lines #L492 - L494 were not covered by tests
let tokens = token_map.values().collect();
let _ = context
.shielded_mut()
Expand Down Expand Up @@ -962,8 +964,13 @@ pub async fn query_shielded_balance(
let mut shielded = context.shielded_mut().await;
let _ = shielded.load().await;
// Precompute asset types to increase chances of success in decoding
let token_map =
query_tokens(context, None, None, args.show_ibc_tokens).await;
let token_map = query_tokens(
context,
args.token.as_ref(),
None,
args.show_ibc_tokens,
)
.await;

Check warning on line 973 in crates/apps/src/lib/client/rpc.rs

View check run for this annotation

Codecov / codecov/patch

crates/apps/src/lib/client/rpc.rs#L967-L973

Added lines #L967 - L973 were not covered by tests
let tokens = token_map.values().collect();
let _ = shielded
.precompute_asset_types(context.client(), tokens)
Expand Down

0 comments on commit 76c3849

Please sign in to comment.