Skip to content

Commit

Permalink
Merge pull request #8 from ManfredKarrer/mediator-tab
Browse files Browse the repository at this point in the history
Fix Mediator registration
  • Loading branch information
craigsailor committed Dec 23, 2018
2 parents 8ee4129 + 81f238b commit 65bb27e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions common/src/main/proto/pb.proto
Expand Up @@ -1023,6 +1023,7 @@ message AddressEntry {
RESERVED_FOR_TRADE = 4;
MULTI_SIG = 5;
TRADE_PAYOUT = 6;
MEDIATOR = 7;
}

string offer_id = 7;
Expand Down
6 changes: 6 additions & 0 deletions core/src/main/java/bisq/core/CoreModule.java
Expand Up @@ -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;
Expand Down Expand Up @@ -131,6 +132,7 @@ protected void configure() {
install(tradeModule());
install(encryptionServiceModule());
install(arbitratorModule());
install(mediatorModule());
install(offerModule());
install(p2pModule());
install(bitcoinModule());
Expand All @@ -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);
}
Expand Down
5 changes: 5 additions & 0 deletions core/src/main/java/bisq/core/app/BisqSetup.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -230,6 +232,7 @@ public BisqSetup(P2PNetworkSetup p2PNetworkSetup,
VoteResultService voteResultService,
AssetTradeActivityCheck tradeActivityCheck,
AssetService assetService,
MediatorManager mediatorManager,
BSFormatter formatter) {


Expand Down Expand Up @@ -268,6 +271,7 @@ public BisqSetup(P2PNetworkSetup p2PNetworkSetup,
this.voteResultService = voteResultService;
this.tradeActivityCheck = tradeActivityCheck;
this.assetService = assetService;
this.mediatorManager = mediatorManager;
this.formatter = formatter;
}

Expand Down Expand Up @@ -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));
Expand Down
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/bisq/core/btc/model/AddressEntry.java
Expand Up @@ -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.
Expand Down

0 comments on commit 65bb27e

Please sign in to comment.