Skip to content

Commit

Permalink
Confirmed balances have to be positive
Browse files Browse the repository at this point in the history
  • Loading branch information
shesek committed Feb 15, 2021
1 parent bae4881 commit d1fd717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/electrum/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ impl Connection {
let (chain_stats, mempool_stats) = self.query.stats(&script_hash[..]);

Ok(json!({
"confirmed": chain_stats.funded_txo_sum as i64 - chain_stats.spent_txo_sum as i64,
"confirmed": chain_stats.funded_txo_sum - chain_stats.spent_txo_sum,
"unconfirmed": mempool_stats.funded_txo_sum as i64 - mempool_stats.spent_txo_sum as i64,
}))
}
Expand Down

0 comments on commit d1fd717

Please sign in to comment.