Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mediation support #3221

Merged
merged 181 commits into from Sep 9, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
9c0eb76
Refactoring: Move arbitration package inside dispute package
chimp1984 Aug 30, 2019
ff1011d
Use abstract base class DisputeResolver for arbitrator
chimp1984 Aug 30, 2019
fc5a2b7
Refactoring: Move mediator to mediator package.
chimp1984 Aug 30, 2019
9da8e36
Let Mediator inherit DisputeResolver.
chimp1984 Aug 30, 2019
8f48402
Do not use protobuf inheritance
chimp1984 Aug 30, 2019
324feb7
Refactoring: Move ArbitratorModule to parent package
chimp1984 Aug 30, 2019
62b6c39
Refactoring: Rename ArbitratorModule to DisputeModule
chimp1984 Aug 30, 2019
97b1154
Add mediators to Filter
chimp1984 Aug 30, 2019
4160e43
Add mediators to filter window
chimp1984 Aug 30, 2019
b297715
Use abstract DisputeResolverService as base class for ArbitratorService
chimp1984 Aug 30, 2019
b2b4bc4
Fix test
chimp1984 Aug 30, 2019
406642f
Use abstract DisputeResolverManager as base class for ArbitratorManager
chimp1984 Aug 30, 2019
9171601
Refactor: Move arbitratorregistration package inside register pkg
chimp1984 Aug 30, 2019
b50fca4
Refactor: Rename arbitratorregistration package to arbitrator
chimp1984 Aug 30, 2019
d00ed78
Add registration view for mediator
chimp1984 Aug 30, 2019
40cf1be
Separate pub key list for mediator (no new keys added yet)
chimp1984 Aug 30, 2019
e8f97f0
Set new pubkeys for mediator registration
chimp1984 Aug 31, 2019
0642df5
Set disputes @Nullable. Add null checks
chimp1984 Aug 31, 2019
c280ee2
Remove pre v0.9 handling for supported arbitrators from offer
chimp1984 Aug 31, 2019
7528550
Remove supported arbitrators info in offer details window
chimp1984 Aug 31, 2019
00b1ba5
Remove check for matching arbitrator languages
chimp1984 Aug 31, 2019
a55f8dc
Remove not used classes
chimp1984 Aug 31, 2019
705e09d
Remove checks for arbitrator and mediator in offer
chimp1984 Aug 31, 2019
92d37c8
Add check if sig of proto object is not empty
chimp1984 Aug 31, 2019
e274e2e
Remove TakerSelectMediator
chimp1984 Aug 31, 2019
de43777
Set arbitratorNodeAddresses and mediatorNodeAddresses to deprecated
chimp1984 Aug 31, 2019
035b0f6
Make ArbitratorSelection generic. Add MEDIATOR_ADDRESS
chimp1984 Aug 31, 2019
8ec7849
Refactor: Rename ArbitratorSelection to DisputeResolverSelection
chimp1984 Aug 31, 2019
6553ee7
Add mediator to OfferAvailabilityResponse and mediatorNodeAddress to …
chimp1984 Aug 31, 2019
7ec0dff
Make arbitrator not nullable
chimp1984 Aug 31, 2019
195b773
Add selectedMediator to OfferAvailabilityModel
chimp1984 Aug 31, 2019
bbf903d
Refactor: Rename method
chimp1984 Aug 31, 2019
69f6524
Add todo for using more generic keys for display strings
chimp1984 Aug 31, 2019
fdf708e
Refactor: Rename method
chimp1984 Aug 31, 2019
7c8eb65
Fix wrong handling of registeredMediator
chimp1984 Aug 31, 2019
015a097
Add mediatorNodeAddress to trade
chimp1984 Aug 31, 2019
4a44a0c
Handle nullable mediator in ProcessOfferAvailabilityResponse
chimp1984 Aug 31, 2019
b813c3f
Change log level, cleanup
chimp1984 Aug 31, 2019
12a5402
Revert changes in OfferPayload due backward compatibility issues
chimp1984 Aug 31, 2019
5782cf5
Add checks if any mediator is available
chimp1984 Aug 31, 2019
de63f8c
Cleanup classes
chimp1984 Aug 31, 2019
7ac4151
Fix test
chimp1984 Aug 31, 2019
04ffaab
Add mediator DisputeStates
chimp1984 Aug 31, 2019
067cde5
Cleanup; support isMediationDispute
chimp1984 Aug 31, 2019
d86e0c4
Handle mediator data in Dispute domain
chimp1984 Aug 31, 2019
58794cc
Add support for mediation in dispute domain
chimp1984 Aug 31, 2019
e88d7ba
Remove impossible case
chimp1984 Aug 31, 2019
9aecdcb
Fix typos
chimp1984 Aug 31, 2019
486e9d4
Handle mediator and arbitrator strings
chimp1984 Aug 31, 2019
05bdbc8
Refactor: Rename arbitrator package to disputeresolvers
chimp1984 Aug 31, 2019
3505460
Refactor: Rename ArbitratorDisputeView classes to DisputeResolverView
chimp1984 Aug 31, 2019
1ca8ce5
Add support for close ticket from mediator (WIP)
chimp1984 Aug 31, 2019
1fd86fa
Refactoring: Rename class
chimp1984 Sep 2, 2019
c91aed5
Refactoring: Move dispute classes to dispute package
chimp1984 Sep 2, 2019
3219605
Refactoring: Move Attachment class to dispute package
chimp1984 Sep 2, 2019
84c9816
Refactoring: Move package one level up
chimp1984 Sep 2, 2019
4407477
Add todo comment
chimp1984 Sep 2, 2019
9d9fb42
Use ARBITRATION instead of DISPUTE
chimp1984 Sep 2, 2019
b979aef
Make DisputeManager abstract base class for ArbitrationDisputeManager
chimp1984 Sep 2, 2019
cadc0e0
Add MediationDisputeManager
chimp1984 Sep 2, 2019
6788bc4
Add MediationDisputeManager and ArbitrationDisputeManager to test
chimp1984 Sep 2, 2019
45118ad
Add mediationDisputeManager to relevant classes
chimp1984 Sep 2, 2019
1d9a5c5
Add TradersArbitrationDisputeView and TradersMediationDisputeView
chimp1984 Sep 2, 2019
851e218
Refactor: Rename class
chimp1984 Sep 2, 2019
de1697f
Refactor: Rename support.tab.support to support.tab.mediation.support
chimp1984 Sep 2, 2019
70d533b
Add DisputeView as common base class
chimp1984 Sep 2, 2019
50fdbd2
Refactor: Rename package
chimp1984 Sep 2, 2019
6cbf866
Refactor: Rename DisputesView to SupportView
chimp1984 Sep 2, 2019
3399aa0
Refactor: Rename package
chimp1984 Sep 2, 2019
1b6b17e
Add MediationDisputeManager to CorePersistedDataHost
chimp1984 Sep 2, 2019
c1a83cb
Add MediationDisputeList as db file, refactor DisputeList
chimp1984 Sep 2, 2019
1898c56
Further refactoring to split mediation and arbitration
chimp1984 Sep 2, 2019
e67c973
Further refactoring to split mediation and arbitration
chimp1984 Sep 2, 2019
bf3b15f
Refactor: Rename package
chimp1984 Sep 2, 2019
f68d38c
Refactor: Move dispute domain classes into isq.core.support.dispute p…
chimp1984 Sep 2, 2019
78cfedb
Refactor: Move classes
chimp1984 Sep 2, 2019
a8cb308
Refactor: Move DisputeCommunicationMessage
chimp1984 Sep 2, 2019
adbc97c
Refactor: Rename DisputeCommunicationMessage to ChatMessage
chimp1984 Sep 2, 2019
2dd2a5b
Add comments
chimp1984 Sep 2, 2019
f061f7b
Refactor: Move class
chimp1984 Sep 2, 2019
d5422f2
Refactor: Rename class
chimp1984 Sep 2, 2019
8fc7035
Refactor: Rename addDisputeCommunicationMessage and strings and varia…
chimp1984 Sep 2, 2019
4328d2a
Refactor: Rename method
chimp1984 Sep 2, 2019
6711a7d
Refactor: Rename methods and strings
chimp1984 Sep 2, 2019
b771ce7
Add ArbitrationChatMessage and DisputeChatMessage
chimp1984 Sep 2, 2019
41b1851
Refactor: Rename class
chimp1984 Sep 2, 2019
c1c7c2c
Move ChatMessage.Type to SupportType
chimp1984 Sep 2, 2019
b4115ca
Refactor: Move classed to new package
chimp1984 Sep 2, 2019
5aa8939
Refactor: Rename package
chimp1984 Sep 2, 2019
a7bde14
Refactor: Move classed to new package
chimp1984 Sep 2, 2019
8178614
Refactor: Move classed to new package
chimp1984 Sep 2, 2019
156db1d
Refactor: Rename classes
chimp1984 Sep 2, 2019
0d7b19e
Refactor: Rename package
chimp1984 Sep 2, 2019
740a2b7
Refactor: Rename classes
chimp1984 Sep 2, 2019
0a7c709
Refactor: Rename classes
chimp1984 Sep 2, 2019
88efcd8
Remove empty DisputeModule
chimp1984 Sep 3, 2019
5bd478f
Refactor: Rename classes
chimp1984 Sep 3, 2019
21d84b8
Refactor SupportManager domain (WIP)
chimp1984 Sep 3, 2019
4768a9b
Refactor SupportSession domain (WIP)
chimp1984 Sep 3, 2019
8805454
Remove methods from SupportSession
chimp1984 Sep 3, 2019
9df9d7c
Dont expose p2pService in SupportManager
chimp1984 Sep 3, 2019
a584e1a
Remove supportType in SupportSession
chimp1984 Sep 3, 2019
01e9d19
Remove supportSession from getPeerNodeAddress method
chimp1984 Sep 3, 2019
a48c43c
Remove isBuyer from supportSession
chimp1984 Sep 3, 2019
77f62c7
Move creation of ChatMessage to SupportManager
chimp1984 Sep 3, 2019
a6821db
Remove isMediationDispute fielf in ChatMessage
chimp1984 Sep 3, 2019
948dccf
Remove chatMessage.isMediationDispute()
chimp1984 Sep 3, 2019
d6fabdc
Refactor: Rename trade.getCommunicationMessages()
chimp1984 Sep 3, 2019
5efc3a2
Move creation of ChatMessage to Chat
chimp1984 Sep 3, 2019
05403e2
Refactor: Rename class
chimp1984 Sep 3, 2019
e9c346f
Refactor: Move ChatView class
chimp1984 Sep 3, 2019
9f0a8ab
Refactor: Move PriceFeedComboBoxItem class to shared package
chimp1984 Sep 3, 2019
7fc3ad1
Refactor: Use 'public abstract' instead of 'abstract public'
chimp1984 Sep 3, 2019
2610d49
Refactor: Use 'protected abstract' instead of 'abstract protected'
chimp1984 Sep 3, 2019
dfcaa4d
Add traderChatManager.onAllServicesInitialized() to BisqSetup
chimp1984 Sep 3, 2019
85ec354
Remove unused param
chimp1984 Sep 3, 2019
85671f0
Refactor: Rename addChatMessage to addAndPersistChatMessage
chimp1984 Sep 3, 2019
97b76e9
Fix missing check at ack msg handling
chimp1984 Sep 3, 2019
79009e3
Remove addAndPersistChatMessage from SupportSession
chimp1984 Sep 3, 2019
416c93a
Remove disputeManager from DisputeSession
chimp1984 Sep 3, 2019
aae447a
Fix missing getConcreteDisputeChatSession impl.
chimp1984 Sep 3, 2019
659f55d
Refactor: Rename package
chimp1984 Sep 3, 2019
13d7a51
Refactor: Rename classes
chimp1984 Sep 3, 2019
0f3a22c
Refactor: Move classes to new package
chimp1984 Sep 3, 2019
ba57972
Fix missing protobuf data
chimp1984 Sep 3, 2019
7b18174
Clone list at persisting to avoid ConcurrentModificationException
chimp1984 Sep 3, 2019
0cb0d91
Fix order of SupportType
chimp1984 Sep 3, 2019
aaa6da6
Add getDisputeState_StartedByPeer template method
chimp1984 Sep 3, 2019
be5e805
Add trade protocol tasks for mediation result tx signing and msg sending
chimp1984 Sep 3, 2019
9d5baee
Complete protocol tasks for mediation
chimp1984 Sep 4, 2019
a5e3af7
Refactor: Remove unneeded SuppressWarnings type: "WeakerAccess"
chimp1984 Sep 4, 2019
b5849e2
Complete mediation result protocol
chimp1984 Sep 4, 2019
8d65b6a
Add activation date and capability
chimp1984 Sep 4, 2019
04f6739
Various fixes
chimp1984 Sep 5, 2019
eebf99d
Remove code part which does not make sense (anymore)
chimp1984 Sep 5, 2019
4fb9250
Add check of balance is > 0
chimp1984 Sep 5, 2019
16a4d69
Only close trade if payout tx is set
chimp1984 Sep 5, 2019
c9e4c27
Add missing check if arbitrator and mediator are available
chimp1984 Sep 5, 2019
f229b9f
Fix wrong key
chimp1984 Sep 5, 2019
7b99d93
Improve handling of checks and popup display
chimp1984 Sep 5, 2019
06cd7c6
Rename any occurrance of DisputeResolver to DisputeAgent
chimp1984 Sep 5, 2019
d5f8847
Fix handling of mediatorPubKeyRing
chimp1984 Sep 5, 2019
68eaa76
Remove disputeSummaryWindow.evidence fields
chimp1984 Sep 5, 2019
9d13f47
Add missing persistence for MediationResultState
chimp1984 Sep 6, 2019
91cb68d
Fix tests
chimp1984 Sep 6, 2019
caad832
Make text more compact to not exceed space
chimp1984 Sep 6, 2019
01cd6c8
Refactor NotificationGroup
chimp1984 Sep 6, 2019
d28faf3
Improve text, add dev testing feature for popups
chimp1984 Sep 6, 2019
8cf8003
Improve text
chimp1984 Sep 6, 2019
40a1f9e
Renamed a key and assigned a new text
chimp1984 Sep 6, 2019
aba1162
Fix states
chimp1984 Sep 6, 2019
c46e2b0
Do not set errorMessage
chimp1984 Sep 6, 2019
90b8cef
Remove logs used for dev testing
chimp1984 Sep 6, 2019
b2ad192
Fix getMedian method with empty list
chimp1984 Sep 7, 2019
680363e
Add new methods and tests
chimp1984 Sep 7, 2019
9b6c9d1
Move error log outside of delayed call
chimp1984 Sep 7, 2019
4f4d791
Add capabilities entry to extraDataMap in offer
chimp1984 Sep 7, 2019
4a63f01
Rename non sync protobuf definitions
chimp1984 Sep 8, 2019
d34e215
Fix UI state when arbitration has started
chimp1984 Sep 8, 2019
e5c8451
Remove restriction
chimp1984 Sep 8, 2019
3bf108f
Fix typo; remove errorMessage
chimp1984 Sep 8, 2019
861c579
Improve text
chimp1984 Sep 8, 2019
a291e50
Store full address for localhost dev testing
chimp1984 Sep 8, 2019
acb2da7
Remove errorMessage
chimp1984 Sep 8, 2019
1b1779d
Improve text
chimp1984 Sep 8, 2019
e7bbe9d
Keep accept or reject button enabled after accept
chimp1984 Sep 8, 2019
6a21ee9
Cleanups (no functional change)
chimp1984 Sep 8, 2019
3d14918
Update core/src/main/resources/i18n/displayStrings.properties
chimp1984 Sep 9, 2019
d727ef3
Update core/src/main/resources/i18n/displayStrings.properties
chimp1984 Sep 9, 2019
66e437c
Update core/src/main/resources/i18n/displayStrings.properties
chimp1984 Sep 9, 2019
b9ed4ca
Update core/src/main/resources/i18n/displayStrings.properties
chimp1984 Sep 9, 2019
cbc0b7e
Update core/src/main/resources/i18n/displayStrings.properties
chimp1984 Sep 9, 2019
a17c623
Update core/src/main/resources/i18n/displayStrings.properties
chimp1984 Sep 9, 2019
8193e71
Update core/src/main/resources/i18n/displayStrings.properties
chimp1984 Sep 9, 2019
160b7d5
Update core/src/main/resources/i18n/displayStrings.properties
chimp1984 Sep 9, 2019
a85c06d
Update core/src/main/resources/i18n/displayStrings.properties
chimp1984 Sep 9, 2019
909df56
Update core/src/main/resources/i18n/displayStrings.properties
chimp1984 Sep 9, 2019
b88f225
Improve text
chimp1984 Sep 9, 2019
7e1f06e
Merge branch 'add-mediation-support' of https://github.com/chimp1984/…
chimp1984 Sep 9, 2019
dc8a45b
Merge branch 'v1.1.6' into add-mediation-support
chimp1984 Sep 9, 2019
81bf39c
Auto fill remaining amount in custom payout
chimp1984 Sep 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 8 additions & 13 deletions common/src/main/proto/pb.proto
Expand Up @@ -44,8 +44,7 @@ message NetworkEnvelope {

OpenNewDisputeMessage open_new_dispute_message = 22;
PeerOpenedDisputeMessage peer_opened_dispute_message = 23;
// ChatMessage in java class. We cannot rename protobuf definition because it would break backward compatibility
DisputeCommunicationMessage dispute_communication_message = 24;
ChatMessage chat_message = 24;
DisputeResultMessage dispute_result_message = 25;
PeerPublishedDisputePayoutTxMessage peer_published_dispute_payout_tx_message = 26;

Expand Down Expand Up @@ -307,8 +306,7 @@ message PeerOpenedDisputeMessage {
SupportType type = 4;
}

// ChatMessage in java class. We cannot rename protobuf definition because it would break backward compatibility
message DisputeCommunicationMessage {
message ChatMessage {
int64 date = 1;
string trade_id = 2;
int32 trader_id = 3;
Expand Down Expand Up @@ -704,10 +702,9 @@ message Dispute {
string contract_as_json = 15;
string maker_contract_signature = 16;
string taker_contract_signature = 17;
PubKeyRing arbitrator_pub_key_ring = 18; // Is agentPubKeyRing in java, but we cannot rename because of backward compatibility
PubKeyRing agent_pub_key_ring = 18;
bool is_support_ticket = 19;
// ChatMessage in java class. We cannot rename protobuf definition because it would break backward compatibility
repeated DisputeCommunicationMessage dispute_communication_messages = 20;
repeated ChatMessage chat_message = 20;
bool is_closed = 21;
DisputeResult dispute_result = 22;
string dispute_payout_tx_id = 23;
Expand Down Expand Up @@ -744,8 +741,7 @@ message DisputeResult {
bool id_verification = 6;
bool screen_cast = 7;
string summary_notes = 8;
// ChatMessage in java class. We cannot rename protobuf definition because it would break backward compatibility
DisputeCommunicationMessage dispute_communication_message = 9;
ChatMessage chat_message = 9;
bytes arbitrator_signature = 10;
int64 buyer_payout_amount = 11;
int64 seller_payout_amount = 12;
Expand Down Expand Up @@ -1036,7 +1032,7 @@ message PersistableEnvelope {

TradableList tradable_list = 6;
TradeStatisticsList trade_statistics_list = 7 [deprecated = true]; // Was used in pre v0.6.0 version. Not used anymore.
DisputeList dispute_list = 8; // mapped to java class ArbitrationDisputeList We cannot rename protobuf definition because it would break backward compatibility
ArbitrationDisputeList arbitration_dispute_list = 8;

PreferencesPayload preferences_payload = 9;
UserPayload user_payload = 10;
Expand Down Expand Up @@ -1296,8 +1292,7 @@ message Trade {
PubKeyRing arbitrator_pub_key_ring = 26;
PubKeyRing mediator_pub_key_ring = 27;
string counter_currency_tx_id = 28;
// ChatMessage in java class. We cannot rename protobuf definition because it would break backward compatibility
repeated DisputeCommunicationMessage communication_messages = 29;
repeated ChatMessage chat_message = 29;
MediationResultState mediation_result_state = 30;
}

Expand Down Expand Up @@ -1362,7 +1357,7 @@ message TradingPeer {
// Dispute
///////////////////////////////////////////////////////////////////////////////////////////

message DisputeList {
message ArbitrationDisputeList {
repeated Dispute dispute = 1;
}

Expand Down
Expand Up @@ -153,8 +153,8 @@ public NetworkEnvelope fromProto(protobuf.NetworkEnvelope proto) throws Protobuf
return OpenNewDisputeMessage.fromProto(proto.getOpenNewDisputeMessage(), this, messageVersion);
case PEER_OPENED_DISPUTE_MESSAGE:
return PeerOpenedDisputeMessage.fromProto(proto.getPeerOpenedDisputeMessage(), this, messageVersion);
case DISPUTE_COMMUNICATION_MESSAGE:
return ChatMessage.fromProto(proto.getDisputeCommunicationMessage(), messageVersion);
case CHAT_MESSAGE:
return ChatMessage.fromProto(proto.getChatMessage(), messageVersion);
case DISPUTE_RESULT_MESSAGE:
return DisputeResultMessage.fromProto(proto.getDisputeResultMessage(), messageVersion);
case PEER_PUBLISHED_DISPUTE_PAYOUT_TX_MESSAGE:
Expand Down
Expand Up @@ -33,10 +33,10 @@
import bisq.core.dao.state.model.governance.BallotList;
import bisq.core.dao.state.model.governance.MeritList;
import bisq.core.dao.state.unconfirmed.UnconfirmedBsqChangeOutputList;
import bisq.core.support.dispute.arbitration.ArbitrationDisputeList;
import bisq.core.support.dispute.mediation.MediationDisputeList;
import bisq.core.payment.PaymentAccountList;
import bisq.core.proto.CoreProtoResolver;
import bisq.core.support.dispute.arbitration.ArbitrationDisputeList;
import bisq.core.support.dispute.mediation.MediationDisputeList;
import bisq.core.trade.TradableList;
import bisq.core.trade.statistics.TradeStatistics2Store;
import bisq.core.user.PreferencesPayload;
Expand Down Expand Up @@ -102,8 +102,8 @@ public PersistableEnvelope fromProto(protobuf.PersistableEnvelope proto) {
btcWalletService.get());
case TRADE_STATISTICS_LIST:
throw new ProtobufferRuntimeException("TRADE_STATISTICS_LIST is not used anymore");
case DISPUTE_LIST:
return ArbitrationDisputeList.fromProto(proto.getDisputeList(),
case ARBITRATION_DISPUTE_LIST:
return ArbitrationDisputeList.fromProto(proto.getArbitrationDisputeList(),
this,
new Storage<>(storageDir, this, corruptedDatabaseFilesHandler));
case MEDIATION_DISPUTE_LIST:
Expand Down
10 changes: 5 additions & 5 deletions core/src/main/java/bisq/core/support/dispute/Dispute.java
Expand Up @@ -192,10 +192,10 @@ public protobuf.Dispute toProtoMessage() {
.setTradeDate(tradeDate)
.setContract(contract.toProtoMessage())
.setContractAsJson(contractAsJson)
.setArbitratorPubKeyRing(agentPubKeyRing.toProtoMessage()) // We renamed to agentPubKeyRing but need to keep protobuf as it was to be backward compatible
.setAgentPubKeyRing(agentPubKeyRing.toProtoMessage()) // We renamed to agentPubKeyRing but need to keep protobuf as it was to be backward compatible
.setIsSupportTicket(isSupportTicket)
.addAllDisputeCommunicationMessages(clonedChatMessages.stream()
.map(msg -> msg.toProtoNetworkEnvelope().getDisputeCommunicationMessage())
.addAllChatMessage(clonedChatMessages.stream()
.map(msg -> msg.toProtoNetworkEnvelope().getChatMessage())
.collect(Collectors.toList()))
.setIsClosed(isClosedProperty.get())
.setOpeningDate(openingDate)
Expand Down Expand Up @@ -229,10 +229,10 @@ public static Dispute fromProto(protobuf.Dispute proto, CoreProtoResolver corePr
proto.getContractAsJson(),
ProtoUtil.stringOrNullFromProto(proto.getMakerContractSignature()),
ProtoUtil.stringOrNullFromProto(proto.getTakerContractSignature()),
PubKeyRing.fromProto(proto.getArbitratorPubKeyRing()), // We renamed to agentPubKeyRing but need to keep protobuf as it was to be backward compatible
PubKeyRing.fromProto(proto.getAgentPubKeyRing()), // We renamed to agentPubKeyRing but need to keep protobuf as it was to be backward compatible
proto.getIsSupportTicket());

dispute.chatMessages.addAll(proto.getDisputeCommunicationMessagesList().stream()
dispute.chatMessages.addAll(proto.getChatMessageList().stream()
.map(ChatMessage::fromPayloadProto)
.collect(Collectors.toList()));

Expand Down
Expand Up @@ -138,7 +138,7 @@ public static DisputeResult fromProto(protobuf.DisputeResult proto) {
proto.getIdVerification(),
proto.getScreenCast(),
proto.getSummaryNotes(),
proto.getDisputeCommunicationMessage() == null ? null : ChatMessage.fromPayloadProto(proto.getDisputeCommunicationMessage()),
proto.getChatMessage() == null ? null : ChatMessage.fromPayloadProto(proto.getChatMessage()),
proto.getArbitratorSignature().toByteArray(),
proto.getBuyerPayoutAmount(),
proto.getSellerPayoutAmount(),
Expand Down Expand Up @@ -166,7 +166,7 @@ public protobuf.DisputeResult toProtoMessage() {
Optional.ofNullable(arbitratorPubKey).ifPresent(arbitratorPubKey -> builder.setArbitratorPubKey(ByteString.copyFrom(arbitratorPubKey)));
Optional.ofNullable(winner).ifPresent(result -> builder.setWinner(protobuf.DisputeResult.Winner.valueOf(winner.name())));
Optional.ofNullable(chatMessage).ifPresent(chatMessage ->
builder.setDisputeCommunicationMessage(chatMessage.toProtoNetworkEnvelope().getDisputeCommunicationMessage()));
builder.setChatMessage(chatMessage.toProtoNetworkEnvelope().getChatMessage()));

return builder.build();
}
Expand Down
Expand Up @@ -67,11 +67,11 @@ private ArbitrationDisputeList(Storage<ArbitrationDisputeList> storage, List<Dis

@Override
public Message toProtoMessage() {
return protobuf.PersistableEnvelope.newBuilder().setDisputeList(protobuf.DisputeList.newBuilder()
return protobuf.PersistableEnvelope.newBuilder().setArbitrationDisputeList(protobuf.ArbitrationDisputeList.newBuilder()
.addAllDispute(ProtoUtil.collectionToProto(new ArrayList<>(list)))).build();
}

public static ArbitrationDisputeList fromProto(protobuf.DisputeList proto,
public static ArbitrationDisputeList fromProto(protobuf.ArbitrationDisputeList proto,
CoreProtoResolver coreProtoResolver,
Storage<ArbitrationDisputeList> storage) {
List<Dispute> list = proto.getDisputeList().stream()
Expand Down
12 changes: 6 additions & 6 deletions core/src/main/java/bisq/core/support/messages/ChatMessage.java
Expand Up @@ -204,7 +204,7 @@ private ChatMessage(SupportType supportType,
// We cannot rename protobuf definition because it would break backward compatibility
@Override
public protobuf.NetworkEnvelope toProtoNetworkEnvelope() {
protobuf.DisputeCommunicationMessage.Builder builder = protobuf.DisputeCommunicationMessage.newBuilder()
protobuf.ChatMessage.Builder builder = protobuf.ChatMessage.newBuilder()
.setType(SupportType.toProtoMessage(supportType))
.setTradeId(tradeId)
.setTraderId(traderId)
Expand All @@ -222,12 +222,12 @@ public protobuf.NetworkEnvelope toProtoNetworkEnvelope() {
Optional.ofNullable(sendMessageErrorProperty.get()).ifPresent(builder::setSendMessageError);
Optional.ofNullable(ackErrorProperty.get()).ifPresent(builder::setAckError);
return getNetworkEnvelopeBuilder()
.setDisputeCommunicationMessage(builder)
.setChatMessage(builder)
.build();
}

// The protobuf definition DisputeCommunicationMessage cannot be changed as it would break backward compatibility.
public static ChatMessage fromProto(protobuf.DisputeCommunicationMessage proto,
// The protobuf definition ChatMessage cannot be changed as it would break backward compatibility.
public static ChatMessage fromProto(protobuf.ChatMessage proto,
int messageVersion) {
// If we get a msg from an old client type will be ordinal 0 which is the dispute entry and as we only added
// the trade case it is the desired behaviour.
Expand All @@ -252,7 +252,7 @@ public static ChatMessage fromProto(protobuf.DisputeCommunicationMessage proto,
return chatMessage;
}

public static ChatMessage fromPayloadProto(protobuf.DisputeCommunicationMessage proto) {
public static ChatMessage fromPayloadProto(protobuf.ChatMessage proto) {
// We have the case that an envelope got wrapped into a payload.
// We don't check the message version here as it was checked in the carrier envelope already (in connection class)
// Payloads don't have a message version and are also used for persistence
Expand All @@ -265,7 +265,7 @@ public static ChatMessage fromPayloadProto(protobuf.DisputeCommunicationMessage
// API
///////////////////////////////////////////////////////////////////////////////////////////

public void addAllAttachments(List<Attachment> attachments) {
private void addAllAttachments(List<Attachment> attachments) {
this.attachments.addAll(attachments);
}

Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/bisq/core/trade/Trade.java
Expand Up @@ -461,8 +461,8 @@ public Message toProtoMessage() {
.setState(Trade.State.toProtoMessage(state))
.setDisputeState(Trade.DisputeState.toProtoMessage(disputeState))
.setTradePeriodState(Trade.TradePeriodState.toProtoMessage(tradePeriodState))
.addAllCommunicationMessages(chatMessages.stream()
.map(msg -> msg.toProtoNetworkEnvelope().getDisputeCommunicationMessage())
.addAllChatMessage(chatMessages.stream()
.map(msg -> msg.toProtoNetworkEnvelope().getChatMessage())
.collect(Collectors.toList()));

Optional.ofNullable(takerFeeTxId).ifPresent(builder::setTakerFeeTxId);
Expand Down Expand Up @@ -510,7 +510,7 @@ public static Trade fromProto(Trade trade, protobuf.Trade proto, CoreProtoResolv
trade.setCounterCurrencyTxId(proto.getCounterCurrencyTxId().isEmpty() ? null : proto.getCounterCurrencyTxId());
trade.setMediationResultState(MediationResultState.fromProto(proto.getMediationResultState()));

trade.chatMessages.addAll(proto.getCommunicationMessagesList().stream()
trade.chatMessages.addAll(proto.getChatMessageList().stream()
.map(ChatMessage::fromPayloadProto)
.collect(Collectors.toList()));

Expand Down