mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Remove BisqFacade
This commit is contained in:
parent
c7f8faa804
commit
618281cee9
3 changed files with 2 additions and 59 deletions
|
@ -21,7 +21,6 @@ import bisq.core.alert.AlertModule;
|
|||
import bisq.core.app.AppOptionKeys;
|
||||
import bisq.core.app.AvoidStandbyModeService;
|
||||
import bisq.core.app.BisqEnvironment;
|
||||
import bisq.core.app.BisqFacade;
|
||||
import bisq.core.app.BisqSetup;
|
||||
import bisq.core.app.P2PNetworkSetup;
|
||||
import bisq.core.app.WalletAppSetup;
|
||||
|
@ -83,7 +82,6 @@ public class CoreModule extends AppModule {
|
|||
bind(BisqSetup.class).in(Singleton.class);
|
||||
bind(P2PNetworkSetup.class).in(Singleton.class);
|
||||
bind(WalletAppSetup.class).in(Singleton.class);
|
||||
bind(BisqFacade.class).in(Singleton.class);
|
||||
|
||||
bind(BisqEnvironment.class).toInstance((BisqEnvironment) environment);
|
||||
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* This file is part of Bisq.
|
||||
*
|
||||
* Bisq is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Bisq is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package bisq.core.app;
|
||||
|
||||
import bisq.core.btc.model.BalanceModel;
|
||||
import bisq.core.presentation.BalancePresentation;
|
||||
|
||||
import bisq.common.app.Version;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
* Provides high level interface to functionality of core Bisq features.
|
||||
* E.g. useful for different APIs to access data of different domains of Bisq.
|
||||
*/
|
||||
public class BisqFacade {
|
||||
private final BalanceModel balanceModel;
|
||||
private final BalancePresentation balancePresentation;
|
||||
|
||||
@Inject
|
||||
public BisqFacade(BalanceModel balanceModel, BalancePresentation balancePresentation) {
|
||||
this.balanceModel = balanceModel;
|
||||
this.balancePresentation = balancePresentation;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return Version.VERSION;
|
||||
}
|
||||
|
||||
public long getAvailableBalance() {
|
||||
balanceModel.updateBalance();
|
||||
return balanceModel.getAvailableBalance().get().getValue();
|
||||
}
|
||||
|
||||
public String getAvailableBalanceAsString() {
|
||||
return balancePresentation.getAvailableBalance().get();
|
||||
}
|
||||
}
|
|
@ -136,13 +136,11 @@ public class BisqAppMain extends BisqExecutable {
|
|||
super.onApplicationStarted();
|
||||
|
||||
/* if (runWithHttpApi()) {
|
||||
final BisqFacade bisqFacade = injector.getInstance(BisqFacade.class);
|
||||
bisqHttpApiServer = new BisqHttpApiServer(bisqFacade);
|
||||
bisqHttpApiServer = new BisqHttpApiServer();
|
||||
}*/
|
||||
/*
|
||||
if (runWithGrpcApi()) {
|
||||
final BisqFacade bisqFacade = injector.getInstance(BisqFacade.class);
|
||||
bisqGrpcServer = new BisqGrpcServer(bisqFacade);
|
||||
bisqGrpcServer = new BisqGrpcServer();
|
||||
}*/
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue