Skip to content

Commit

Permalink
Exclude empty tokens from account list summary section
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Dec 9, 2023
1 parent 6888a4b commit d9eb557
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2338,6 +2338,10 @@ async fn process_account_list(

println!("Current Holdings");
for (held_token, (current_token_price, total_held_amount, unrealized_gain)) in held_tokens {
if total_held_amount == 0 {
continue;
}

let estimated_tax = tax_rate
.and_then(|tax_rate| {
let tax = unrealized_gain.short_term_cap_gain * tax_rate.short_term_gain
Expand Down

0 comments on commit d9eb557

Please sign in to comment.