mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 20:19:21 +00:00
update to monero-project v0.18.0.0, monero-java v0.7.2
This commit is contained in:
parent
4b46871cc3
commit
3753a42023
11 changed files with 93 additions and 71 deletions
4
Makefile
4
Makefile
|
@ -68,7 +68,7 @@ monerod-local1:
|
||||||
--no-zmq \
|
--no-zmq \
|
||||||
--add-exclusive-node 127.0.0.1:28080 \
|
--add-exclusive-node 127.0.0.1:28080 \
|
||||||
--rpc-access-control-origins http://localhost:8080 \
|
--rpc-access-control-origins http://localhost:8080 \
|
||||||
--fixed-difficulty 100
|
--fixed-difficulty 400
|
||||||
|
|
||||||
monerod-local2:
|
monerod-local2:
|
||||||
./.localnet/monerod \
|
./.localnet/monerod \
|
||||||
|
@ -82,7 +82,7 @@ monerod-local2:
|
||||||
--confirm-external-bind \
|
--confirm-external-bind \
|
||||||
--add-exclusive-node 127.0.0.1:48080 \
|
--add-exclusive-node 127.0.0.1:48080 \
|
||||||
--rpc-access-control-origins http://localhost:8080 \
|
--rpc-access-control-origins http://localhost:8080 \
|
||||||
--fixed-difficulty 100
|
--fixed-difficulty 400
|
||||||
|
|
||||||
funding-wallet-local:
|
funding-wallet-local:
|
||||||
./.localnet/monero-wallet-rpc \
|
./.localnet/monero-wallet-rpc \
|
||||||
|
|
|
@ -42,7 +42,7 @@ configure(subprojects) {
|
||||||
grpcVersion = '1.25.0'
|
grpcVersion = '1.25.0'
|
||||||
gsonVersion = '2.8.5'
|
gsonVersion = '2.8.5'
|
||||||
guavaVersion = '28.2-jre'
|
guavaVersion = '28.2-jre'
|
||||||
moneroJavaVersion = '0.7.0'
|
moneroJavaVersion = '0.7.2'
|
||||||
httpclient5Version = '5.0'
|
httpclient5Version = '5.0'
|
||||||
guiceVersion = '4.2.2'
|
guiceVersion = '4.2.2'
|
||||||
hamcrestVersion = '1.3'
|
hamcrestVersion = '1.3'
|
||||||
|
|
|
@ -109,6 +109,7 @@ public abstract class Trade implements Tradable, Model {
|
||||||
PREPARATION(Phase.INIT),
|
PREPARATION(Phase.INIT),
|
||||||
MULTISIG_PREPARED(Phase.INIT),
|
MULTISIG_PREPARED(Phase.INIT),
|
||||||
MULTISIG_MADE(Phase.INIT),
|
MULTISIG_MADE(Phase.INIT),
|
||||||
|
MULTISIG_EXCHANGED(Phase.INIT),
|
||||||
MULTISIG_COMPLETED(Phase.INIT),
|
MULTISIG_COMPLETED(Phase.INIT),
|
||||||
CONTRACT_SIGNATURE_REQUESTED(Phase.INIT),
|
CONTRACT_SIGNATURE_REQUESTED(Phase.INIT),
|
||||||
CONTRACT_SIGNED(Phase.INIT),
|
CONTRACT_SIGNED(Phase.INIT),
|
||||||
|
|
|
@ -42,6 +42,8 @@ public final class InitMultisigRequest extends TradeMessage implements DirectMes
|
||||||
private final String preparedMultisigHex;
|
private final String preparedMultisigHex;
|
||||||
@Nullable
|
@Nullable
|
||||||
private final String madeMultisigHex;
|
private final String madeMultisigHex;
|
||||||
|
@Nullable
|
||||||
|
private final String exchangedMultisigHex;
|
||||||
|
|
||||||
public InitMultisigRequest(String tradeId,
|
public InitMultisigRequest(String tradeId,
|
||||||
NodeAddress senderNodeAddress,
|
NodeAddress senderNodeAddress,
|
||||||
|
@ -50,13 +52,15 @@ public final class InitMultisigRequest extends TradeMessage implements DirectMes
|
||||||
String messageVersion,
|
String messageVersion,
|
||||||
long currentDate,
|
long currentDate,
|
||||||
String preparedMultisigHex,
|
String preparedMultisigHex,
|
||||||
String madeMultisigHex) {
|
String madeMultisigHex,
|
||||||
|
String exchangedMultisigHex) {
|
||||||
super(messageVersion, tradeId, uid);
|
super(messageVersion, tradeId, uid);
|
||||||
this.senderNodeAddress = senderNodeAddress;
|
this.senderNodeAddress = senderNodeAddress;
|
||||||
this.pubKeyRing = pubKeyRing;
|
this.pubKeyRing = pubKeyRing;
|
||||||
this.currentDate = currentDate;
|
this.currentDate = currentDate;
|
||||||
this.preparedMultisigHex = preparedMultisigHex;
|
this.preparedMultisigHex = preparedMultisigHex;
|
||||||
this.madeMultisigHex = madeMultisigHex;
|
this.madeMultisigHex = madeMultisigHex;
|
||||||
|
this.exchangedMultisigHex = exchangedMultisigHex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,6 +78,7 @@ public final class InitMultisigRequest extends TradeMessage implements DirectMes
|
||||||
|
|
||||||
Optional.ofNullable(preparedMultisigHex).ifPresent(e -> builder.setPreparedMultisigHex(preparedMultisigHex));
|
Optional.ofNullable(preparedMultisigHex).ifPresent(e -> builder.setPreparedMultisigHex(preparedMultisigHex));
|
||||||
Optional.ofNullable(madeMultisigHex).ifPresent(e -> builder.setMadeMultisigHex(madeMultisigHex));
|
Optional.ofNullable(madeMultisigHex).ifPresent(e -> builder.setMadeMultisigHex(madeMultisigHex));
|
||||||
|
Optional.ofNullable(exchangedMultisigHex).ifPresent(e -> builder.setExchangedMultisigHex(exchangedMultisigHex));
|
||||||
|
|
||||||
builder.setCurrentDate(currentDate);
|
builder.setCurrentDate(currentDate);
|
||||||
|
|
||||||
|
@ -90,7 +95,8 @@ public final class InitMultisigRequest extends TradeMessage implements DirectMes
|
||||||
messageVersion,
|
messageVersion,
|
||||||
proto.getCurrentDate(),
|
proto.getCurrentDate(),
|
||||||
ProtoUtil.stringOrNullFromProto(proto.getPreparedMultisigHex()),
|
ProtoUtil.stringOrNullFromProto(proto.getPreparedMultisigHex()),
|
||||||
ProtoUtil.stringOrNullFromProto(proto.getMadeMultisigHex()));
|
ProtoUtil.stringOrNullFromProto(proto.getMadeMultisigHex()),
|
||||||
|
ProtoUtil.stringOrNullFromProto(proto.getExchangedMultisigHex()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -101,6 +107,7 @@ public final class InitMultisigRequest extends TradeMessage implements DirectMes
|
||||||
",\n currentDate=" + currentDate +
|
",\n currentDate=" + currentDate +
|
||||||
",\n preparedMultisigHex='" + preparedMultisigHex +
|
",\n preparedMultisigHex='" + preparedMultisigHex +
|
||||||
",\n madeMultisigHex='" + madeMultisigHex +
|
",\n madeMultisigHex='" + madeMultisigHex +
|
||||||
|
",\n exchangedMultisigHex='" + exchangedMultisigHex +
|
||||||
"\n} " + super.toString();
|
"\n} " + super.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,14 +173,6 @@ public class ProcessModel implements Model, PersistablePayload {
|
||||||
@Nullable
|
@Nullable
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
private String preparedMultisigHex; // TODO (woodser): ProcessModel shares many fields with TradingPeer; switch to trade getMaker(), getTaker(), getArbitrator(), getSelf(), with common TradingPeer object?
|
|
||||||
@Nullable
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
private String madeMultisigHex;
|
|
||||||
@Nullable
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
private String multisigAddress;
|
private String multisigAddress;
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
||||||
|
@ -240,8 +232,6 @@ public class ProcessModel implements Model, PersistablePayload {
|
||||||
Optional.ofNullable(tempTradingPeerNodeAddress).ifPresent(e -> builder.setTempTradingPeerNodeAddress(tempTradingPeerNodeAddress.toProtoMessage()));
|
Optional.ofNullable(tempTradingPeerNodeAddress).ifPresent(e -> builder.setTempTradingPeerNodeAddress(tempTradingPeerNodeAddress.toProtoMessage()));
|
||||||
Optional.ofNullable(makerSignature).ifPresent(e -> builder.setMakerSignature(makerSignature));
|
Optional.ofNullable(makerSignature).ifPresent(e -> builder.setMakerSignature(makerSignature));
|
||||||
Optional.ofNullable(backupArbitrator).ifPresent(e -> builder.setBackupArbitrator(backupArbitrator.toProtoMessage()));
|
Optional.ofNullable(backupArbitrator).ifPresent(e -> builder.setBackupArbitrator(backupArbitrator.toProtoMessage()));
|
||||||
Optional.ofNullable(preparedMultisigHex).ifPresent(e -> builder.setPreparedMultisigHex(preparedMultisigHex));
|
|
||||||
Optional.ofNullable(madeMultisigHex).ifPresent(e -> builder.setMadeMultisigHex(madeMultisigHex));
|
|
||||||
Optional.ofNullable(multisigAddress).ifPresent(e -> builder.setMultisigAddress(multisigAddress));
|
Optional.ofNullable(multisigAddress).ifPresent(e -> builder.setMultisigAddress(multisigAddress));
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
@ -271,8 +261,6 @@ public class ProcessModel implements Model, PersistablePayload {
|
||||||
processModel.setMediatedPayoutTxSignature(ProtoUtil.byteArrayOrNullFromProto(proto.getMediatedPayoutTxSignature()));
|
processModel.setMediatedPayoutTxSignature(ProtoUtil.byteArrayOrNullFromProto(proto.getMediatedPayoutTxSignature()));
|
||||||
processModel.setMakerSignature(proto.getMakerSignature());
|
processModel.setMakerSignature(proto.getMakerSignature());
|
||||||
processModel.setBackupArbitrator(proto.hasBackupArbitrator() ? NodeAddress.fromProto(proto.getBackupArbitrator()) : null);
|
processModel.setBackupArbitrator(proto.hasBackupArbitrator() ? NodeAddress.fromProto(proto.getBackupArbitrator()) : null);
|
||||||
processModel.setPreparedMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getPreparedMultisigHex()));
|
|
||||||
processModel.setMadeMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getMadeMultisigHex()));
|
|
||||||
processModel.setMultisigAddress(ProtoUtil.stringOrNullFromProto(proto.getMultisigAddress()));
|
processModel.setMultisigAddress(ProtoUtil.stringOrNullFromProto(proto.getMultisigAddress()));
|
||||||
|
|
||||||
String paymentStartedMessageStateString = ProtoUtil.stringOrNullFromProto(proto.getPaymentStartedMessageState());
|
String paymentStartedMessageStateString = ProtoUtil.stringOrNullFromProto(proto.getPaymentStartedMessageState());
|
||||||
|
|
|
@ -108,6 +108,8 @@ public final class TradingPeer implements PersistablePayload {
|
||||||
@Nullable
|
@Nullable
|
||||||
private String madeMultisigHex;
|
private String madeMultisigHex;
|
||||||
@Nullable
|
@Nullable
|
||||||
|
private String exchangedMultisigHex;
|
||||||
|
@Nullable
|
||||||
private String depositTxHash;
|
private String depositTxHash;
|
||||||
@Nullable
|
@Nullable
|
||||||
private String depositTxHex;
|
private String depositTxHex;
|
||||||
|
@ -150,6 +152,7 @@ public final class TradingPeer implements PersistablePayload {
|
||||||
Optional.ofNullable(reserveTxKey).ifPresent(e -> builder.setReserveTxKey(reserveTxKey));
|
Optional.ofNullable(reserveTxKey).ifPresent(e -> builder.setReserveTxKey(reserveTxKey));
|
||||||
Optional.ofNullable(preparedMultisigHex).ifPresent(e -> builder.setPreparedMultisigHex(preparedMultisigHex));
|
Optional.ofNullable(preparedMultisigHex).ifPresent(e -> builder.setPreparedMultisigHex(preparedMultisigHex));
|
||||||
Optional.ofNullable(madeMultisigHex).ifPresent(e -> builder.setMadeMultisigHex(madeMultisigHex));
|
Optional.ofNullable(madeMultisigHex).ifPresent(e -> builder.setMadeMultisigHex(madeMultisigHex));
|
||||||
|
Optional.ofNullable(exchangedMultisigHex).ifPresent(e -> builder.setExchangedMultisigHex(exchangedMultisigHex));
|
||||||
Optional.ofNullable(payoutTxHex).ifPresent(e -> builder.setPayoutTxHex(payoutTxHex));
|
Optional.ofNullable(payoutTxHex).ifPresent(e -> builder.setPayoutTxHex(payoutTxHex));
|
||||||
Optional.ofNullable(depositTxHash).ifPresent(e -> builder.setDepositTxHash(depositTxHash));
|
Optional.ofNullable(depositTxHash).ifPresent(e -> builder.setDepositTxHash(depositTxHash));
|
||||||
Optional.ofNullable(depositTxHex).ifPresent(e -> builder.setDepositTxHex(depositTxHex));
|
Optional.ofNullable(depositTxHex).ifPresent(e -> builder.setDepositTxHex(depositTxHex));
|
||||||
|
@ -194,6 +197,7 @@ public final class TradingPeer implements PersistablePayload {
|
||||||
tradingPeer.setReserveTxKeyImages(proto.getReserveTxKeyImagesList());
|
tradingPeer.setReserveTxKeyImages(proto.getReserveTxKeyImagesList());
|
||||||
tradingPeer.setPreparedMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getPreparedMultisigHex()));
|
tradingPeer.setPreparedMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getPreparedMultisigHex()));
|
||||||
tradingPeer.setMadeMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getMadeMultisigHex()));
|
tradingPeer.setMadeMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getMadeMultisigHex()));
|
||||||
|
tradingPeer.setExchangedMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getExchangedMultisigHex()));
|
||||||
tradingPeer.setDepositTxHash(ProtoUtil.stringOrNullFromProto(proto.getDepositTxHash()));
|
tradingPeer.setDepositTxHash(ProtoUtil.stringOrNullFromProto(proto.getDepositTxHash()));
|
||||||
tradingPeer.setDepositTxHex(ProtoUtil.stringOrNullFromProto(proto.getDepositTxHex()));
|
tradingPeer.setDepositTxHex(ProtoUtil.stringOrNullFromProto(proto.getDepositTxHex()));
|
||||||
tradingPeer.setDepositTxKey(ProtoUtil.stringOrNullFromProto(proto.getDepositTxKey()));
|
tradingPeer.setDepositTxKey(ProtoUtil.stringOrNullFromProto(proto.getDepositTxKey()));
|
||||||
|
|
|
@ -148,7 +148,7 @@ public class ArbitratorSendsInitTradeAndMultisigRequests extends TradeTask {
|
||||||
|
|
||||||
// prepare multisig
|
// prepare multisig
|
||||||
String preparedHex = multisigWallet.prepareMultisig();
|
String preparedHex = multisigWallet.prepareMultisig();
|
||||||
processModel.setPreparedMultisigHex(preparedHex);
|
trade.getSelf().setPreparedMultisigHex(preparedHex);
|
||||||
|
|
||||||
// create message to initialize multisig
|
// create message to initialize multisig
|
||||||
InitMultisigRequest initMultisigRequest = new InitMultisigRequest(
|
InitMultisigRequest initMultisigRequest = new InitMultisigRequest(
|
||||||
|
@ -159,6 +159,7 @@ public class ArbitratorSendsInitTradeAndMultisigRequests extends TradeTask {
|
||||||
Version.getP2PMessageVersion(),
|
Version.getP2PMessageVersion(),
|
||||||
new Date().getTime(),
|
new Date().getTime(),
|
||||||
preparedHex,
|
preparedHex,
|
||||||
|
null,
|
||||||
null);
|
null);
|
||||||
|
|
||||||
// send request to maker
|
// send request to maker
|
||||||
|
|
|
@ -83,13 +83,15 @@ public class ProcessInitMultisigRequest extends TradeTask {
|
||||||
else if (request.getPreparedMultisigHex() != null && !multisigParticipant.getPreparedMultisigHex().equals(request.getPreparedMultisigHex())) throw new RuntimeException("Message's prepared multisig differs from previous messages, previous: " + multisigParticipant.getPreparedMultisigHex() + ", message: " + request.getPreparedMultisigHex());
|
else if (request.getPreparedMultisigHex() != null && !multisigParticipant.getPreparedMultisigHex().equals(request.getPreparedMultisigHex())) throw new RuntimeException("Message's prepared multisig differs from previous messages, previous: " + multisigParticipant.getPreparedMultisigHex() + ", message: " + request.getPreparedMultisigHex());
|
||||||
if (multisigParticipant.getMadeMultisigHex() == null) multisigParticipant.setMadeMultisigHex(request.getMadeMultisigHex());
|
if (multisigParticipant.getMadeMultisigHex() == null) multisigParticipant.setMadeMultisigHex(request.getMadeMultisigHex());
|
||||||
else if (request.getMadeMultisigHex() != null && !multisigParticipant.getMadeMultisigHex().equals(request.getMadeMultisigHex())) throw new RuntimeException("Message's made multisig differs from previous messages: " + request.getMadeMultisigHex() + " versus " + multisigParticipant.getMadeMultisigHex());
|
else if (request.getMadeMultisigHex() != null && !multisigParticipant.getMadeMultisigHex().equals(request.getMadeMultisigHex())) throw new RuntimeException("Message's made multisig differs from previous messages: " + request.getMadeMultisigHex() + " versus " + multisigParticipant.getMadeMultisigHex());
|
||||||
|
if (multisigParticipant.getExchangedMultisigHex() == null) multisigParticipant.setExchangedMultisigHex(request.getExchangedMultisigHex());
|
||||||
|
else if (request.getExchangedMultisigHex() != null && !multisigParticipant.getExchangedMultisigHex().equals(request.getExchangedMultisigHex())) throw new RuntimeException("Message's exchanged multisig differs from previous messages: " + request.getExchangedMultisigHex() + " versus " + multisigParticipant.getExchangedMultisigHex());
|
||||||
|
|
||||||
// prepare multisig if applicable
|
// prepare multisig if applicable
|
||||||
boolean updateParticipants = false;
|
boolean updateParticipants = false;
|
||||||
if (processModel.getPreparedMultisigHex() == null) {
|
if (trade.getSelf().getPreparedMultisigHex() == null) {
|
||||||
log.info("Preparing multisig wallet for trade {}", trade.getId());
|
log.info("Preparing multisig wallet for trade {}", trade.getId());
|
||||||
multisigWallet = xmrWalletService.createMultisigWallet(trade.getId());
|
multisigWallet = xmrWalletService.createMultisigWallet(trade.getId());
|
||||||
processModel.setPreparedMultisigHex(multisigWallet.prepareMultisig());
|
trade.getSelf().setPreparedMultisigHex(multisigWallet.prepareMultisig());
|
||||||
trade.setStateIfValidTransitionTo(Trade.State.MULTISIG_PREPARED);
|
trade.setStateIfValidTransitionTo(Trade.State.MULTISIG_PREPARED);
|
||||||
updateParticipants = true;
|
updateParticipants = true;
|
||||||
} else if (processModel.getMultisigAddress() == null) {
|
} else if (processModel.getMultisigAddress() == null) {
|
||||||
|
@ -98,19 +100,28 @@ public class ProcessInitMultisigRequest extends TradeTask {
|
||||||
|
|
||||||
// make multisig if applicable
|
// make multisig if applicable
|
||||||
TradingPeer[] peers = getMultisigPeers();
|
TradingPeer[] peers = getMultisigPeers();
|
||||||
if (processModel.getMadeMultisigHex() == null && peers[0].getPreparedMultisigHex() != null && peers[1].getPreparedMultisigHex() != null) {
|
if (trade.getSelf().getMadeMultisigHex() == null && peers[0].getPreparedMultisigHex() != null && peers[1].getPreparedMultisigHex() != null) {
|
||||||
log.info("Making multisig wallet for trade {}", trade.getId());
|
log.info("Making multisig wallet for trade {}", trade.getId());
|
||||||
MoneroMultisigInitResult result = multisigWallet.makeMultisig(Arrays.asList(peers[0].getPreparedMultisigHex(), peers[1].getPreparedMultisigHex()), 2, xmrWalletService.getWalletPassword()); // TODO (woodser): xmrWalletService.makeMultisig(tradeId, multisigHexes, threshold)?
|
String multisigHex = multisigWallet.makeMultisig(Arrays.asList(peers[0].getPreparedMultisigHex(), peers[1].getPreparedMultisigHex()), 2, xmrWalletService.getWalletPassword()); // TODO (woodser): xmrWalletService.makeMultisig(tradeId, multisigHexes, threshold)?
|
||||||
processModel.setMadeMultisigHex(result.getMultisigHex());
|
trade.getSelf().setMadeMultisigHex(multisigHex);
|
||||||
trade.setStateIfValidTransitionTo(Trade.State.MULTISIG_MADE);
|
trade.setStateIfValidTransitionTo(Trade.State.MULTISIG_MADE);
|
||||||
updateParticipants = true;
|
updateParticipants = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// exchange multisig keys if applicable
|
// import made multisig keys if applicable
|
||||||
if (processModel.getMultisigAddress() == null && peers[0].getMadeMultisigHex() != null && peers[1].getMadeMultisigHex() != null) {
|
if (trade.getSelf().getExchangedMultisigHex() == null && peers[0].getMadeMultisigHex() != null && peers[1].getMadeMultisigHex() != null) {
|
||||||
log.info("Exchanging multisig wallet keys for trade {}", trade.getId());
|
log.info("Importing made multisig hex for trade {}", trade.getId());
|
||||||
multisigWallet.exchangeMultisigKeys(Arrays.asList(peers[0].getMadeMultisigHex(), peers[1].getMadeMultisigHex()), xmrWalletService.getWalletPassword());
|
MoneroMultisigInitResult result = multisigWallet.exchangeMultisigKeys(Arrays.asList(peers[0].getMadeMultisigHex(), peers[1].getMadeMultisigHex()), xmrWalletService.getWalletPassword());
|
||||||
processModel.setMultisigAddress(multisigWallet.getPrimaryAddress());
|
trade.getSelf().setExchangedMultisigHex(result.getMultisigHex());
|
||||||
|
trade.setStateIfValidTransitionTo(Trade.State.MULTISIG_EXCHANGED);
|
||||||
|
updateParticipants = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// import exchanged multisig keys if applicable
|
||||||
|
if (processModel.getMultisigAddress() == null && peers[0].getExchangedMultisigHex() != null && peers[1].getExchangedMultisigHex() != null) {
|
||||||
|
log.info("Importing exchanged multisig hex for trade {}", trade.getId());
|
||||||
|
MoneroMultisigInitResult result = multisigWallet.exchangeMultisigKeys(Arrays.asList(peers[0].getExchangedMultisigHex(), peers[1].getExchangedMultisigHex()), xmrWalletService.getWalletPassword());
|
||||||
|
processModel.setMultisigAddress(result.getAddress());
|
||||||
trade.setStateIfValidTransitionTo(Trade.State.MULTISIG_COMPLETED);
|
trade.setStateIfValidTransitionTo(Trade.State.MULTISIG_COMPLETED);
|
||||||
processModel.getProvider().getXmrWalletService().closeMultisigWallet(trade.getId()); // save and close multisig wallet once it's created
|
processModel.getProvider().getXmrWalletService().closeMultisigWallet(trade.getId()); // save and close multisig wallet once it's created
|
||||||
}
|
}
|
||||||
|
@ -209,8 +220,9 @@ public class ProcessInitMultisigRequest extends TradeTask {
|
||||||
UUID.randomUUID().toString(),
|
UUID.randomUUID().toString(),
|
||||||
Version.getP2PMessageVersion(),
|
Version.getP2PMessageVersion(),
|
||||||
new Date().getTime(),
|
new Date().getTime(),
|
||||||
processModel.getPreparedMultisigHex(),
|
trade.getSelf().getPreparedMultisigHex(),
|
||||||
processModel.getMadeMultisigHex());
|
trade.getSelf().getMadeMultisigHex(),
|
||||||
|
trade.getSelf().getExchangedMultisigHex());
|
||||||
|
|
||||||
log.info("Send {} with offerId {} and uid {} to peer {}", request.getClass().getSimpleName(), request.getTradeId(), request.getUid(), recipient);
|
log.info("Send {} with offerId {} and uid {} to peer {}", request.getClass().getSimpleName(), request.getTradeId(), request.getUid(), recipient);
|
||||||
processModel.getP2PService().sendEncryptedDirectMessage(recipient, pubKeyRing, request, listener);
|
processModel.getP2PService().sendEncryptedDirectMessage(recipient, pubKeyRing, request, listener);
|
||||||
|
|
|
@ -306,7 +306,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private String getPaymentUri() {
|
private String getPaymentUri() {
|
||||||
return xmrWalletService.getWallet().createPaymentUri(new MoneroTxConfig()
|
return xmrWalletService.getWallet().getPaymentUri(new MoneroTxConfig()
|
||||||
.setAddress(addressTextField.getAddress())
|
.setAddress(addressTextField.getAddress())
|
||||||
.setAmount(ParsingUtils.coinToAtomicUnits(getAmountAsCoin()))
|
.setAmount(ParsingUtils.coinToAtomicUnits(getAmountAsCoin()))
|
||||||
.setNote(paymentLabelString));
|
.setNote(paymentLabelString));
|
||||||
|
|
|
@ -853,6 +853,14 @@
|
||||||
<sha256 value="ead76a2facdfaa55fcc2bc4aa706e3c6eebd5df4b9dcb153a9ff01f8f0324596" origin="Generated by Gradle"/>
|
<sha256 value="ead76a2facdfaa55fcc2bc4aa706e3c6eebd5df4b9dcb153a9ff01f8f0324596" origin="Generated by Gradle"/>
|
||||||
</artifact>
|
</artifact>
|
||||||
</component>
|
</component>
|
||||||
|
<component group="io.github.monero-ecosystem" name="monero-java" version="0.7.2">
|
||||||
|
<artifact name="monero-java-0.7.2.jar">
|
||||||
|
<sha256 value="166903729f2f554f2c7a9c908bc79e5940a96510852d9f9673494d346cec3c82" origin="Generated by Gradle"/>
|
||||||
|
</artifact>
|
||||||
|
<artifact name="monero-java-0.7.2.pom">
|
||||||
|
<sha256 value="7a3e7af49228370cc10401fe98a598c36e64e9b9fcafd5f07689c5ebeac46508" origin="Generated by Gradle"/>
|
||||||
|
</artifact>
|
||||||
|
</component>
|
||||||
<component group="io.github.resilience4j" name="resilience4j-all" version="1.7.0">
|
<component group="io.github.resilience4j" name="resilience4j-all" version="1.7.0">
|
||||||
<artifact name="resilience4j-all-1.7.0.jar">
|
<artifact name="resilience4j-all-1.7.0.jar">
|
||||||
<sha256 value="46c17f491886c0152d957cd04b00b871f39df09d2bd01067d650e2bc89451b04" origin="Generated by Gradle"/>
|
<sha256 value="46c17f491886c0152d957cd04b00b871f39df09d2bd01067d650e2bc89451b04" origin="Generated by Gradle"/>
|
||||||
|
|
|
@ -307,6 +307,7 @@ message InitMultisigRequest {
|
||||||
int64 current_date = 5;
|
int64 current_date = 5;
|
||||||
string prepared_multisig_hex = 6;
|
string prepared_multisig_hex = 6;
|
||||||
string made_multisig_hex = 7;
|
string made_multisig_hex = 7;
|
||||||
|
string exchanged_multisig_hex = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SignContractRequest {
|
message SignContractRequest {
|
||||||
|
@ -1626,36 +1627,37 @@ message Trade {
|
||||||
PREPARATION = 1;
|
PREPARATION = 1;
|
||||||
MULTISIG_PREPARED = 2;
|
MULTISIG_PREPARED = 2;
|
||||||
MULTISIG_MADE = 3;
|
MULTISIG_MADE = 3;
|
||||||
MULTISIG_COMPLETED = 4;
|
MULTISIG_EXCHANGED = 4;
|
||||||
CONTRACT_SIGNATURE_REQUESTED = 5;
|
MULTISIG_COMPLETED = 5;
|
||||||
CONTRACT_SIGNED = 6;
|
CONTRACT_SIGNATURE_REQUESTED = 6;
|
||||||
SENT_PUBLISH_DEPOSIT_TX_REQUEST = 7;
|
CONTRACT_SIGNED = 7;
|
||||||
SAW_ARRIVED_PUBLISH_DEPOSIT_TX_REQUEST = 8;
|
SENT_PUBLISH_DEPOSIT_TX_REQUEST = 8;
|
||||||
STORED_IN_MAILBOX_PUBLISH_DEPOSIT_TX_REQUEST = 9;
|
SAW_ARRIVED_PUBLISH_DEPOSIT_TX_REQUEST = 9;
|
||||||
SEND_FAILED_PUBLISH_DEPOSIT_TX_REQUEST = 10;
|
STORED_IN_MAILBOX_PUBLISH_DEPOSIT_TX_REQUEST = 10;
|
||||||
ARBITRATOR_PUBLISHED_DEPOSIT_TXS = 11;
|
SEND_FAILED_PUBLISH_DEPOSIT_TX_REQUEST = 11;
|
||||||
SAW_DEPOSIT_TXS_IN_NETWORK = 12;
|
ARBITRATOR_PUBLISHED_DEPOSIT_TXS = 12;
|
||||||
DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN = 13;
|
SAW_DEPOSIT_TXS_IN_NETWORK = 13;
|
||||||
BUYER_CONFIRMED_IN_UI_PAYMENT_SENT = 14;
|
DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN = 14;
|
||||||
BUYER_SENT_PAYMENT_SENT_MSG = 15;
|
BUYER_CONFIRMED_IN_UI_PAYMENT_SENT = 15;
|
||||||
BUYER_SAW_ARRIVED_PAYMENT_SENT_MSG = 16;
|
BUYER_SENT_PAYMENT_SENT_MSG = 16;
|
||||||
BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG = 17;
|
BUYER_SAW_ARRIVED_PAYMENT_SENT_MSG = 17;
|
||||||
BUYER_SEND_FAILED_PAYMENT_SENT_MSG = 18;
|
BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG = 18;
|
||||||
SELLER_RECEIVED_PAYMENT_SENT_MSG = 19;
|
BUYER_SEND_FAILED_PAYMENT_SENT_MSG = 19;
|
||||||
SELLER_CONFIRMED_IN_UI_PAYMENT_RECEIPT = 20;
|
SELLER_RECEIVED_PAYMENT_SENT_MSG = 20;
|
||||||
SELLER_SENT_PAYMENT_RECEIVED_MSG = 21;
|
SELLER_CONFIRMED_IN_UI_PAYMENT_RECEIPT = 21;
|
||||||
SELLER_SAW_ARRIVED_PAYMENT_RECEIVED_MSG = 22;
|
SELLER_SENT_PAYMENT_RECEIVED_MSG = 22;
|
||||||
SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG = 23;
|
SELLER_SAW_ARRIVED_PAYMENT_RECEIVED_MSG = 23;
|
||||||
SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG = 24;
|
SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG = 24;
|
||||||
SELLER_PUBLISHED_PAYOUT_TX = 25;
|
SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG = 25;
|
||||||
SELLER_SENT_PAYOUT_TX_PUBLISHED_MSG = 26;
|
SELLER_PUBLISHED_PAYOUT_TX = 26;
|
||||||
SELLER_SAW_ARRIVED_PAYOUT_TX_PUBLISHED_MSG = 27;
|
SELLER_SENT_PAYOUT_TX_PUBLISHED_MSG = 27;
|
||||||
SELLER_STORED_IN_MAILBOX_PAYOUT_TX_PUBLISHED_MSG = 28;
|
SELLER_SAW_ARRIVED_PAYOUT_TX_PUBLISHED_MSG = 28;
|
||||||
SELLER_SEND_FAILED_PAYOUT_TX_PUBLISHED_MSG = 29;
|
SELLER_STORED_IN_MAILBOX_PAYOUT_TX_PUBLISHED_MSG = 29;
|
||||||
BUYER_RECEIVED_PAYOUT_TX_PUBLISHED_MSG = 30;
|
SELLER_SEND_FAILED_PAYOUT_TX_PUBLISHED_MSG = 30;
|
||||||
BUYER_SAW_PAYOUT_TX_IN_NETWORK = 31;
|
BUYER_RECEIVED_PAYOUT_TX_PUBLISHED_MSG = 31;
|
||||||
BUYER_PUBLISHED_PAYOUT_TX = 32;
|
BUYER_SAW_PAYOUT_TX_IN_NETWORK = 32;
|
||||||
WITHDRAW_COMPLETED = 33;
|
BUYER_PUBLISHED_PAYOUT_TX = 33;
|
||||||
|
WITHDRAW_COMPLETED = 34;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Phase {
|
enum Phase {
|
||||||
|
@ -1781,9 +1783,7 @@ message ProcessModel {
|
||||||
TradingPeer taker = 1004;
|
TradingPeer taker = 1004;
|
||||||
TradingPeer arbitrator = 1005;
|
TradingPeer arbitrator = 1005;
|
||||||
NodeAddress temp_trading_peer_node_address = 1006;
|
NodeAddress temp_trading_peer_node_address = 1006;
|
||||||
string prepared_multisig_hex = 1007;
|
string multisig_address = 1007;
|
||||||
string made_multisig_hex = 1008;
|
|
||||||
string multisig_address = 1009;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message TradingPeer {
|
message TradingPeer {
|
||||||
|
@ -1812,11 +1812,12 @@ message TradingPeer {
|
||||||
repeated string reserve_tx_key_images = 1004;
|
repeated string reserve_tx_key_images = 1004;
|
||||||
string prepared_multisig_hex = 1005;
|
string prepared_multisig_hex = 1005;
|
||||||
string made_multisig_hex = 1006;
|
string made_multisig_hex = 1006;
|
||||||
string payout_tx_hex = 1007;
|
string exchanged_multisig_hex = 1007;
|
||||||
string deposit_tx_hash = 1008;
|
string payout_tx_hex = 1008;
|
||||||
string deposit_tx_hex = 1009;
|
string deposit_tx_hash = 1009;
|
||||||
string deposit_tx_key = 1010;
|
string deposit_tx_hex = 1010;
|
||||||
string updated_multisig_hex = 1011;
|
string deposit_tx_key = 1011;
|
||||||
|
string updated_multisig_hex = 1012;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in a new issue