mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-01 13:04:40 -04:00
update more names from bisq* to haveno*
This commit is contained in:
parent
fae477fc51
commit
e8cc3d20f5
12 changed files with 66 additions and 66 deletions
|
@ -67,7 +67,7 @@ import java.util.stream.Collectors;
|
|||
/**
|
||||
* Handles the initialisation of domain classes. We should refactor to the model that the domain classes listen on the
|
||||
* relevant start up state from AppStartupState instead to get called. Only for initialisation which has a required
|
||||
* order we will still need this class. For now it helps to keep BisqSetup more focussed on the process and not getting
|
||||
* order we will still need this class. For now it helps to keep HavenoSetup more focussed on the process and not getting
|
||||
* overloaded with domain initialisation code.
|
||||
*/
|
||||
public class DomainInitialisation {
|
||||
|
|
|
@ -54,7 +54,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import javax.annotation.Nullable;
|
||||
|
||||
@Slf4j
|
||||
public abstract class HavenoExecutable implements GracefulShutDownHandler, HavenoSetup.BisqSetupListener, UncaughtExceptionHandler {
|
||||
public abstract class HavenoExecutable implements GracefulShutDownHandler, HavenoSetup.HavenoSetupListener, UncaughtExceptionHandler {
|
||||
|
||||
public static final int EXIT_SUCCESS = 0;
|
||||
public static final int EXIT_FAILURE = 1;
|
||||
|
@ -139,7 +139,7 @@ public abstract class HavenoExecutable implements GracefulShutDownHandler, Haven
|
|||
hasDowngraded = HavenoSetup.hasDowngraded();
|
||||
if (hasDowngraded) {
|
||||
// If user tried to downgrade we do not read the persisted data to avoid data corruption
|
||||
// We call startApplication to enable UI to show popup. We prevent in BisqSetup to go further
|
||||
// We call startApplication to enable UI to show popup. We prevent in HavenoSetup to go further
|
||||
// in the process and require a shut down.
|
||||
startApplication();
|
||||
} else {
|
||||
|
@ -194,12 +194,12 @@ public abstract class HavenoExecutable implements GracefulShutDownHandler, Haven
|
|||
|
||||
// Once the application is ready we get that callback and we start the setup
|
||||
protected void onApplicationStarted() {
|
||||
runBisqSetup();
|
||||
runHavenoSetup();
|
||||
}
|
||||
|
||||
protected void runBisqSetup() {
|
||||
protected void runHavenoSetup() {
|
||||
HavenoSetup bisqSetup = injector.getInstance(HavenoSetup.class);
|
||||
bisqSetup.addBisqSetupListener(this);
|
||||
bisqSetup.addHavenoSetupListener(this);
|
||||
bisqSetup.start();
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public class HavenoHeadlessApp implements HeadlessApp {
|
|||
public void startApplication() {
|
||||
try {
|
||||
bisqSetup = injector.getInstance(HavenoSetup.class);
|
||||
bisqSetup.addBisqSetupListener(this);
|
||||
bisqSetup.addHavenoSetupListener(this);
|
||||
|
||||
corruptedStorageFileHandler = injector.getInstance(CorruptedStorageFileHandler.class);
|
||||
tradeManager = injector.getInstance(TradeManager.class);
|
||||
|
|
|
@ -104,7 +104,7 @@ public class HavenoSetup {
|
|||
private static final String VERSION_FILE_NAME = "version";
|
||||
private static final String RESYNC_SPV_FILE_NAME = "resyncSpv";
|
||||
|
||||
public interface BisqSetupListener {
|
||||
public interface HavenoSetupListener {
|
||||
default void onInitP2pNetwork() {
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ public class HavenoSetup {
|
|||
private boolean allBasicServicesInitialized;
|
||||
@SuppressWarnings("FieldCanBeLocal")
|
||||
private MonadicBinding<Boolean> p2pNetworkAndWalletInitialized;
|
||||
private final List<BisqSetupListener> bisqSetupListeners = new ArrayList<>();
|
||||
private final List<HavenoSetupListener> bisqSetupListeners = new ArrayList<>();
|
||||
|
||||
@Inject
|
||||
public HavenoSetup(DomainInitialisation domainInitialisation,
|
||||
|
@ -273,7 +273,7 @@ public class HavenoSetup {
|
|||
// Main startup tasks
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public void addBisqSetupListener(BisqSetupListener listener) {
|
||||
public void addHavenoSetupListener(HavenoSetupListener listener) {
|
||||
bisqSetupListeners.add(listener);
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,7 @@ public class HavenoSetup {
|
|||
private void step4() {
|
||||
initDomainServices();
|
||||
|
||||
bisqSetupListeners.forEach(BisqSetupListener::onSetupComplete);
|
||||
bisqSetupListeners.forEach(HavenoSetupListener::onSetupComplete);
|
||||
|
||||
// We set that after calling the setupCompleteHandler to not trigger a popup from the dev dummy accounts
|
||||
// in MainViewModel
|
||||
|
@ -373,7 +373,7 @@ public class HavenoSetup {
|
|||
}, STARTUP_TIMEOUT_MINUTES, TimeUnit.MINUTES);
|
||||
|
||||
log.info("Init P2P network");
|
||||
bisqSetupListeners.forEach(BisqSetupListener::onInitP2pNetwork);
|
||||
bisqSetupListeners.forEach(HavenoSetupListener::onInitP2pNetwork);
|
||||
p2pNetworkReady = p2PNetworkSetup.init(this::initWallet, displayTorNetworkSettingsHandler);
|
||||
|
||||
// We only init wallet service here if not using Tor for bitcoinj.
|
||||
|
@ -402,10 +402,10 @@ public class HavenoSetup {
|
|||
|
||||
private void initWallet() {
|
||||
log.info("Init wallet");
|
||||
bisqSetupListeners.forEach(BisqSetupListener::onInitWallet);
|
||||
bisqSetupListeners.forEach(HavenoSetupListener::onInitWallet);
|
||||
Runnable walletPasswordHandler = () -> {
|
||||
log.info("Wallet password required");
|
||||
bisqSetupListeners.forEach(BisqSetupListener::onRequestWalletPassword);
|
||||
bisqSetupListeners.forEach(HavenoSetupListener::onRequestWalletPassword);
|
||||
if (p2pNetworkReady.get())
|
||||
p2PNetworkSetup.setSplashP2PNetworkAnimationVisible(true);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import bisq.common.setup.UncaughtExceptionHandler;
|
|||
|
||||
import com.google.inject.Injector;
|
||||
|
||||
public interface HeadlessApp extends UncaughtExceptionHandler, HavenoSetup.BisqSetupListener {
|
||||
public interface HeadlessApp extends UncaughtExceptionHandler, HavenoSetup.HavenoSetupListener {
|
||||
void setGracefulShutDownHandler(GracefulShutDownHandler gracefulShutDownHandler);
|
||||
|
||||
void setInjector(Injector injector);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue