get rid of empty step in BisqSetup

This commit is contained in:
Dominykas Mostauskis 2020-03-16 12:07:16 +01:00
parent 4d9d06e25b
commit 167be79269
No known key found for this signature in database
GPG key ID: 97B407C08F2499EB

View file

@ -343,25 +343,21 @@ public class BisqSetup {
UserThread.runPeriodically(() -> {
}, 1);
maybeReSyncSPVChain();
maybeShowTac();
maybeShowTac(this::step2);
}
private void step2() {
step3();
}
private void step3() {
torSetup.cleanupTorFiles();
readMapsFromResources(this::step4);
readMapsFromResources(this::step3);
checkCryptoSetup();
checkForCorrectOSArchitecture();
}
private void step4() {
startP2pNetworkAndWallet(this::step5);
private void step3() {
startP2pNetworkAndWallet(this::step4);
}
private void step5() {
private void step4() {
initDomainServices();
bisqSetupListeners.forEach(BisqSetupListener::onSetupComplete);
@ -469,15 +465,15 @@ public class BisqSetup {
}
}
private void maybeShowTac() {
private void maybeShowTac(Runnable nextStep) {
if (!preferences.isTacAcceptedV120() && !DevEnv.isDevMode()) {
if (displayTacHandler != null)
displayTacHandler.accept(() -> {
preferences.setTacAcceptedV120(true);
step2();
nextStep.run();
});
} else {
step2();
nextStep.run();
}
}