Skip to content

Commit

Permalink
fix: account for 0 diff transactions when emitting events
Browse files Browse the repository at this point in the history
  • Loading branch information
Syn-McJ committed Jan 12, 2025
1 parent 6a8ffcf commit a8df760
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/bitcoinj/wallet/Wallet.java
Original file line number Diff line number Diff line change
Expand Up @@ -2420,9 +2420,9 @@ private void receive(Transaction tx, StoredBlock block, BlockChain.NewBlockType
int diff = valueDifference.signum();
// We pick one callback based on the value difference, though a tx can of course both send and receive
// coins from the wallet.
if (diff > 0) {
if (diff >= 0) {
queueOnCoinsReceived(tx, prevBalance, newBalance);
} else if (diff < 0) {
} else {
queueOnCoinsSent(tx, prevBalance, newBalance);
}
}
Expand Down

0 comments on commit a8df760

Please sign in to comment.