diff --git a/common/src/main/proto/pb.proto b/common/src/main/proto/pb.proto index 4f9371653a3..3ad7b1a520c 100644 --- a/common/src/main/proto/pb.proto +++ b/common/src/main/proto/pb.proto @@ -1023,6 +1023,7 @@ message AddressEntry { RESERVED_FOR_TRADE = 4; MULTI_SIG = 5; TRADE_PAYOUT = 6; + MEDIATOR = 7; } string offer_id = 7; diff --git a/core/src/main/java/bisq/core/CoreModule.java b/core/src/main/java/bisq/core/CoreModule.java index 9e94ab20215..742f12d8fde 100644 --- a/core/src/main/java/bisq/core/CoreModule.java +++ b/core/src/main/java/bisq/core/CoreModule.java @@ -28,6 +28,7 @@ import bisq.core.arbitration.ArbitratorModule; import bisq.core.btc.BitcoinModule; import bisq.core.dao.DaoModule; +import bisq.core.disputes.MediatorModule; import bisq.core.filter.FilterModule; import bisq.core.network.p2p.seed.DefaultSeedNodeRepository; import bisq.core.network.p2p.seed.SeedNodeAddressLookup; @@ -131,6 +132,7 @@ protected void configure() { install(tradeModule()); install(encryptionServiceModule()); install(arbitratorModule()); + install(mediatorModule()); install(offerModule()); install(p2pModule()); install(bitcoinModule()); @@ -152,6 +154,10 @@ private ArbitratorModule arbitratorModule() { return new ArbitratorModule(environment); } + private MediatorModule mediatorModule() { + return new MediatorModule(environment); + } + private AlertModule alertModule() { return new AlertModule(environment); } diff --git a/core/src/main/java/bisq/core/app/BisqSetup.java b/core/src/main/java/bisq/core/app/BisqSetup.java index 210ac1e1b39..3d981ee4f32 100644 --- a/core/src/main/java/bisq/core/app/BisqSetup.java +++ b/core/src/main/java/bisq/core/app/BisqSetup.java @@ -33,6 +33,7 @@ import bisq.core.dao.governance.asset.AssetService; import bisq.core.dao.governance.voteresult.VoteResultException; import bisq.core.dao.governance.voteresult.VoteResultService; +import bisq.core.disputes.MediatorManager; import bisq.core.filter.FilterManager; import bisq.core.locale.Res; import bisq.core.notifications.MobileNotificationService; @@ -154,6 +155,7 @@ public interface BisqSetupCompleteListener { private final VoteResultService voteResultService; private final AssetTradeActivityCheck tradeActivityCheck; private final AssetService assetService; + private final MediatorManager mediatorManager; private final BSFormatter formatter; @Setter @Nullable @@ -230,6 +232,7 @@ public BisqSetup(P2PNetworkSetup p2PNetworkSetup, VoteResultService voteResultService, AssetTradeActivityCheck tradeActivityCheck, AssetService assetService, + MediatorManager mediatorManager, BSFormatter formatter) { @@ -268,6 +271,7 @@ public BisqSetup(P2PNetworkSetup p2PNetworkSetup, this.voteResultService = voteResultService; this.tradeActivityCheck = tradeActivityCheck; this.assetService = assetService; + this.mediatorManager = mediatorManager; this.formatter = formatter; } @@ -611,6 +615,7 @@ public void onBalanceChanged(Coin balance, Transaction tx) { openOfferManager.onAllServicesInitialized(); arbitratorManager.onAllServicesInitialized(); + mediatorManager.onAllServicesInitialized(); alertManager.alertMessageProperty().addListener((observable, oldValue, newValue) -> displayAlertIfPresent(newValue, false)); diff --git a/core/src/main/java/bisq/core/arbitration/ArbitratorModule.java b/core/src/main/java/bisq/core/arbitration/ArbitratorModule.java index d65760c3aba..484f7eb48f3 100644 --- a/core/src/main/java/bisq/core/arbitration/ArbitratorModule.java +++ b/core/src/main/java/bisq/core/arbitration/ArbitratorModule.java @@ -30,6 +30,7 @@ public ArbitratorModule(Environment environment) { @Override protected final void configure() { + bind(ArbitratorManager.class).in(Singleton.class); bind(ArbitratorManager.class).in(Singleton.class); bind(DisputeManager.class).in(Singleton.class); bind(ArbitratorService.class).in(Singleton.class); diff --git a/core/src/main/java/bisq/core/btc/model/AddressEntry.java b/core/src/main/java/bisq/core/btc/model/AddressEntry.java index 887163ef9a8..43feaad4c08 100644 --- a/core/src/main/java/bisq/core/btc/model/AddressEntry.java +++ b/core/src/main/java/bisq/core/btc/model/AddressEntry.java @@ -53,12 +53,12 @@ public final class AddressEntry implements PersistablePayload { public enum Context { ARBITRATOR, - MEDIATOR, AVAILABLE, OFFER_FUNDING, RESERVED_FOR_TRADE, MULTI_SIG, - TRADE_PAYOUT + TRADE_PAYOUT, + MEDIATOR } // keyPair can be null in case the object is created from deserialization as it is transient.