Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Jul 10, 2023
1 parent 2a908a0 commit 93b6679
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/src/lib/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,15 +520,20 @@ async fn print_balances<C: namada::ledger::queries::Client + Sync>(
),
None => continue,
};

// Get the token and the balance
let (t, s) = match (token, target) {
// the given token and the given target are the same as the
// retrieved ones
(Some(token), Some(target)) if t == *token && o == *target => {
(t, s)
}
// the given token is the same as the retrieved one
(Some(token), None) if t == *token => (t, s),
// the given target is the same as the retrieved one
(None, Some(target)) if o == *target => (t, s),
// no specified token or target
(None, None) => (t, s),
// otherwise, this balance will not be printed
_ => continue,
};
// Print the token if it isn't printed yet
Expand Down

0 comments on commit 93b6679

Please sign in to comment.