Skip to content

Commit

Permalink
Merge pull request #6422 from jmacxx/fix_trade_timer_issue
Browse files Browse the repository at this point in the history
Fix:  incorrect wallet tx handling
  • Loading branch information
alejandrogarcia83 authored Nov 26, 2022
2 parents 8c882a7 + 24ae5f6 commit 92e4c62
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions core/src/main/java/bisq/core/btc/wallet/WalletService.java
Original file line number Diff line number Diff line change
Expand Up @@ -837,17 +837,12 @@ public static Transaction maybeAddTxToWallet(byte[] serializedTransaction,
Wallet wallet,
TransactionConfidence.Source source) throws VerificationException {
Transaction tx = new Transaction(wallet.getParams(), serializedTransaction);
Transaction walletTransaction = wallet.getTransaction(tx.getTxId());

if (walletTransaction == null) {
if (wallet.getTransaction(tx.getTxId()) == null) {
// We need to recreate the transaction otherwise we get a null pointer...
tx.getConfidence(Context.get()).setSource(source);
//wallet.maybeCommitTx(tx);
wallet.receivePending(tx, null, true);
return tx;
} else {
return walletTransaction;
}
return wallet.getTransaction(tx.getTxId());
}

public static Transaction maybeAddNetworkTxToWallet(byte[] serializedTransaction,
Expand Down

0 comments on commit 92e4c62

Please sign in to comment.