mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-29 00:57:17 -04:00
Remove static access to Bitsquare#getAppName
This commit is contained in:
parent
6f27c5ce29
commit
865cf39e64
8 changed files with 114 additions and 108 deletions
|
@ -17,7 +17,6 @@
|
|||
|
||||
package io.bitsquare.di;
|
||||
|
||||
import io.bitsquare.Bitsquare;
|
||||
import io.bitsquare.btc.BitcoinModule;
|
||||
import io.bitsquare.crypto.CryptoModule;
|
||||
import io.bitsquare.gui.GuiModule;
|
||||
|
@ -48,14 +47,16 @@ public class BitsquareModule extends AbstractBitsquareModule {
|
|||
|
||||
private static final Logger log = LoggerFactory.getLogger(BitsquareModule.class);
|
||||
private final Stage primaryStage;
|
||||
private final String appName;
|
||||
|
||||
public BitsquareModule(Stage primaryStage) {
|
||||
this(primaryStage, ConfigLoader.loadConfig());
|
||||
public BitsquareModule(Stage primaryStage, String appName) {
|
||||
this(primaryStage, appName, ConfigLoader.loadConfig());
|
||||
}
|
||||
|
||||
public BitsquareModule(Stage primaryStage, Properties properties) {
|
||||
public BitsquareModule(Stage primaryStage, String appName, Properties properties) {
|
||||
super(properties);
|
||||
this.primaryStage = primaryStage;
|
||||
this.appName = appName;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -70,7 +71,8 @@ public class BitsquareModule extends AbstractBitsquareModule {
|
|||
install(tradeModule());
|
||||
install(guiModule());
|
||||
|
||||
bind(ActorSystem.class).toInstance(ActorSystem.create(Bitsquare.getAppName()));
|
||||
bindConstant().annotatedWith(Names.named("appName")).to(appName);
|
||||
bind(ActorSystem.class).toInstance(ActorSystem.create(appName));
|
||||
|
||||
int randomPort = new Ports().tcpPort();
|
||||
bindConstant().annotatedWith(Names.named("clientPort")).to(randomPort);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue