mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
reduce monerod requests in transactions view by checking id equality
This commit is contained in:
parent
a088f685c1
commit
ee3e4fb383
@ -27,7 +27,6 @@ import haveno.core.trade.Trade;
|
|||||||
import haveno.core.xmr.wallet.XmrWalletService;
|
import haveno.core.xmr.wallet.XmrWalletService;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import monero.daemon.model.MoneroTx;
|
|
||||||
import monero.wallet.model.MoneroTxWallet;
|
import monero.wallet.model.MoneroTxWallet;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@ -68,24 +67,15 @@ class TransactionAwareTrade implements TransactionAwareTradable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isPayoutTx(String txId) {
|
private boolean isPayoutTx(String txId) {
|
||||||
return Optional.ofNullable(trade.getPayoutTx())
|
return txId.equals(trade.getPayoutTxId());
|
||||||
.map(MoneroTx::getHash)
|
|
||||||
.map(hash -> hash.equals(txId))
|
|
||||||
.orElse(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isMakerDepositTx(String txId) {
|
private boolean isMakerDepositTx(String txId) {
|
||||||
return Optional.ofNullable(trade.getMakerDepositTx())
|
return txId.equals(trade.getMaker().getDepositTxHash());
|
||||||
.map(MoneroTx::getHash)
|
|
||||||
.map(hash -> hash.equals(txId))
|
|
||||||
.orElse(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isTakerDepositTx(String txId) {
|
private boolean isTakerDepositTx(String txId) {
|
||||||
return Optional.ofNullable(trade.getTakerDepositTx())
|
return txId.equals(trade.getTaker().getDepositTxHash());
|
||||||
.map(MoneroTx::getHash)
|
|
||||||
.map(hash -> hash.equals(txId))
|
|
||||||
.orElse(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isOfferFeeTx(String txId) {
|
private boolean isOfferFeeTx(String txId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user