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
* @throws VerificationException
*/
public Transaction getWalletTx(Transaction tx) throws VerificationException {
// log.trace("getWalleTx tx " + tx.toString());
return wallet.getTransaction(tx.getHash());
public Transaction getWalletTx(Sha256Hash txId) throws VerificationException {
return wallet.getTransaction(txId);
}
/**

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.
public void updateDepositTxFromWallet(TradeWalletService tradeWalletService) {
if (depositTx != null)
setDepositTx(tradeWalletService.getWalletTx(depositTx));
setDepositTx(tradeWalletService.getWalletTx(depositTx.getHash()));
}
public void setDepositTx(Transaction tx) {