mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-23 04:29:22 +00:00
move redundant deposit tx from ProcessModel to getSelf().getDepositTx()
This commit is contained in:
parent
74b0e42dae
commit
5c9a6b9ed6
4 changed files with 4 additions and 11 deletions
|
@ -111,7 +111,7 @@ public class ProcessModel implements Model, PersistablePayload {
|
||||||
// After successful verified we copy that over to the trade.tradePeerAddress
|
// After successful verified we copy that over to the trade.tradePeerAddress
|
||||||
@Nullable
|
@Nullable
|
||||||
@Setter
|
@Setter
|
||||||
private NodeAddress tempTradePeerNodeAddress; // TODO (woodser): remove entirely?
|
private NodeAddress tempTradePeerNodeAddress;
|
||||||
|
|
||||||
// Added in v.1.1.6
|
// Added in v.1.1.6
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -123,8 +123,6 @@ public class ProcessModel implements Model, PersistablePayload {
|
||||||
private long sellerPayoutAmountFromMediation;
|
private long sellerPayoutAmountFromMediation;
|
||||||
|
|
||||||
// Added for XMR integration
|
// Added for XMR integration
|
||||||
@Getter
|
|
||||||
transient private MoneroTxWallet takeOfferFeeTx; // TODO (woodser): remove
|
|
||||||
@Setter
|
@Setter
|
||||||
transient private TradeMessage tradeMessage;
|
transient private TradeMessage tradeMessage;
|
||||||
@Getter
|
@Getter
|
||||||
|
@ -136,9 +134,6 @@ public class ProcessModel implements Model, PersistablePayload {
|
||||||
transient private MoneroTxWallet reserveTx;
|
transient private MoneroTxWallet reserveTx;
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
transient private MoneroTxWallet depositTxXmr;
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
transient private MoneroTxWallet unsignedPayoutTx;
|
transient private MoneroTxWallet unsignedPayoutTx;
|
||||||
@Nullable
|
@Nullable
|
||||||
@Getter
|
@Getter
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class MaybeSendSignContractRequest extends TradeTask {
|
||||||
}
|
}
|
||||||
|
|
||||||
// skip if deposit tx already created
|
// skip if deposit tx already created
|
||||||
if (processModel.getDepositTxXmr() != null) {
|
if (trade.getSelf().getDepositTx() != null) {
|
||||||
complete();
|
complete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,6 @@ public class MaybeSendSignContractRequest extends TradeTask {
|
||||||
for (MoneroOutput input : depositTx.getInputs()) reservedKeyImages.add(input.getKeyImage().getHex());
|
for (MoneroOutput input : depositTx.getInputs()) reservedKeyImages.add(input.getKeyImage().getHex());
|
||||||
|
|
||||||
// save process state
|
// save process state
|
||||||
processModel.setDepositTxXmr(depositTx); // TODO: redundant with trade.getSelf().setDepositTx(), remove?
|
|
||||||
trade.getSelf().setDepositTx(depositTx);
|
trade.getSelf().setDepositTx(depositTx);
|
||||||
trade.getSelf().setDepositTxHash(depositTx.getHash());
|
trade.getSelf().setDepositTxHash(depositTx.getHash());
|
||||||
trade.getSelf().setDepositTxFee(depositTx.getFee());
|
trade.getSelf().setDepositTxFee(depositTx.getFee());
|
||||||
|
|
|
@ -76,7 +76,6 @@ public class ProcessSignContractRequest extends TradeTask {
|
||||||
}
|
}
|
||||||
|
|
||||||
// sign contract only when both deposit txs hashes known
|
// sign contract only when both deposit txs hashes known
|
||||||
// TODO (woodser): remove makerDepositTxId and takerDepositTxId from Trade
|
|
||||||
if (processModel.getMaker().getDepositTxHash() == null || processModel.getTaker().getDepositTxHash() == null) {
|
if (processModel.getMaker().getDepositTxHash() == null || processModel.getTaker().getDepositTxHash() == null) {
|
||||||
complete();
|
complete();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -80,8 +80,8 @@ public class ProcessSignContractResponse extends TradeTask {
|
||||||
Version.getP2PMessageVersion(),
|
Version.getP2PMessageVersion(),
|
||||||
new Date().getTime(),
|
new Date().getTime(),
|
||||||
trade.getSelf().getContractSignature(),
|
trade.getSelf().getContractSignature(),
|
||||||
processModel.getDepositTxXmr().getFullHex(),
|
trade.getSelf().getDepositTx().getFullHex(),
|
||||||
processModel.getDepositTxXmr().getKey(),
|
trade.getSelf().getDepositTx().getKey(),
|
||||||
trade.getSelf().getPaymentAccountKey());
|
trade.getSelf().getPaymentAccountKey());
|
||||||
|
|
||||||
// send request to arbitrator
|
// send request to arbitrator
|
||||||
|
|
Loading…
Reference in a new issue