Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix querying error while checking token balance #2089

Closed
wants to merge 17 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions apps/src/lib/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ use namada::types::masp::{BalanceOwner, ExtendedViewingKey, PaymentAddress};
use namada::types::storage::{BlockHeight, BlockResults, Epoch, Key, KeySeg};
use namada::types::token::{Change, MaspDenom};
use namada::types::{storage, token};
use namada_sdk::error::{is_pinned_error, Error, PinnedBalanceError};
use namada_sdk::error::{
is_pinned_error, Error, PinnedBalanceError, QueryError,
};
use namada_sdk::masp::{Conversions, MaspAmount, MaspChange};
use namada_sdk::rpc::{
self, enriched_bonds_and_unbonds, query_epoch, TxResponse,
Expand Down Expand Up @@ -340,8 +342,12 @@ pub async fn query_transparent_balance<'a>(
balance
);
}
Err(e) => {
display_line!(context.io(), "Querying error: {e}");
Err(namada_sdk::error::Error::Query(
QueryError::NoSuchKey(_),
)) => {
return;
}
Err(_) => {
sug0 marked this conversation as resolved.
Show resolved Hide resolved
display_line!(
context.io(),
"No {} balance found for {}",
Expand Down
Loading