bitcoinj 0.15: Replace deprecated Transaction.getHash() with Transaction.getTxId().

This commit is contained in:
Oscar Guindzberg 2019-04-22 17:52:49 -03:00
parent 9a9b067d70
commit 76e6955aa4
No known key found for this signature in database
GPG key ID: 209796BF2E1D4F75
3 changed files with 3 additions and 3 deletions

View file

@ -405,7 +405,7 @@ public class BsqWalletService extends WalletService implements DaoStateListener
if (isConfirmed) {
// We lookup if we have a BSQ tx matching the parent tx
// We cannot make that findTx call outside of the loop as the parent tx can change at each iteration
Optional<Tx> txOptional = daoStateService.getTx(parentTransaction.getHash().toString());
Optional<Tx> txOptional = daoStateService.getTx(parentTransaction.getTxId().toString());
if (txOptional.isPresent()) {
TxOutput txOutput = txOptional.get().getTxOutputs().get(connectedOutput.getIndex());
if (daoStateService.isBsqTxOutputType(txOutput)) {

View file

@ -761,7 +761,7 @@ public abstract class WalletService {
Wallet wallet,
TransactionConfidence.Source source) throws VerificationException {
Transaction tx = new Transaction(wallet.getParams(), serializedTransaction);
Transaction walletTransaction = wallet.getTransaction(tx.getHash());
Transaction walletTransaction = wallet.getTransaction(tx.getTxId());
if (walletTransaction == null) {
// We need to recreate the transaction otherwise we get a null pointer...

View file

@ -695,7 +695,7 @@ public abstract class Trade implements Tradable, Model {
// The deserialized tx has not actual confidence data, so we need to get the fresh one from the wallet.
void updateDepositTxFromWallet() {
if (getDepositTx() != null)
applyDepositTx(processModel.getTradeWalletService().getWalletTx(getDepositTx().getHash()));
applyDepositTx(processModel.getTradeWalletService().getWalletTx(getDepositTx().getTxId()));
}
public void applyDepositTx(Transaction tx) {