Use tx id instead of tx as param

This commit is contained in:
Manfred Karrer 2016-01-15 01:40:56 +01:00
parent 51358a7775
commit e2a9a3701c
2 changed files with 4 additions and 5 deletions

View file

@ -848,13 +848,12 @@ public class TradeWalletService {
} }
/** /**
* @param tx The transaction we want to lookup * @param txId The transaction ID of the transaction we want to lookup
* @return Returns local existing wallet transaction * @return Returns local existing wallet transaction
* @throws VerificationException * @throws VerificationException
*/ */
public Transaction getWalletTx(Transaction tx) throws VerificationException { public Transaction getWalletTx(Sha256Hash txId) throws VerificationException {
// log.trace("getWalleTx tx " + tx.toString()); return wallet.getTransaction(txId);
return wallet.getTransaction(tx.getHash());
} }
/** /**

View file

@ -264,7 +264,7 @@ abstract public class Trade implements Tradable, Model, Serializable {
// The deserialized tx has not actual confidence data, so we need to get the fresh one from the wallet. // The deserialized tx has not actual confidence data, so we need to get the fresh one from the wallet.
public void updateDepositTxFromWallet(TradeWalletService tradeWalletService) { public void updateDepositTxFromWallet(TradeWalletService tradeWalletService) {
if (depositTx != null) if (depositTx != null)
setDepositTx(tradeWalletService.getWalletTx(depositTx)); setDepositTx(tradeWalletService.getWalletTx(depositTx.getHash()));
} }
public void setDepositTx(Transaction tx) { public void setDepositTx(Transaction tx) {