mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
dont start version check service if not on mainnet
This commit is contained in:
parent
9872fc9221
commit
3e287bfb2d
1 changed files with 3 additions and 2 deletions
|
@ -2,6 +2,7 @@ package com.sparrowwallet.sparrow;
|
||||||
|
|
||||||
import com.google.common.eventbus.Subscribe;
|
import com.google.common.eventbus.Subscribe;
|
||||||
import com.google.common.net.HostAndPort;
|
import com.google.common.net.HostAndPort;
|
||||||
|
import com.sparrowwallet.drongo.Network;
|
||||||
import com.sparrowwallet.drongo.address.Address;
|
import com.sparrowwallet.drongo.address.Address;
|
||||||
import com.sparrowwallet.drongo.protocol.Transaction;
|
import com.sparrowwallet.drongo.protocol.Transaction;
|
||||||
import com.sparrowwallet.drongo.psbt.PSBT;
|
import com.sparrowwallet.drongo.psbt.PSBT;
|
||||||
|
@ -139,7 +140,7 @@ public class AppServices {
|
||||||
restartService(ratesService);
|
restartService(ratesService);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(config.isCheckNewVersions()) {
|
if(config.isCheckNewVersions() && Network.get() == Network.MAINNET) {
|
||||||
restartService(versionCheckService);
|
restartService(versionCheckService);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -520,7 +521,7 @@ public class AppServices {
|
||||||
public void versionCheckStatus(VersionCheckStatusEvent event) {
|
public void versionCheckStatus(VersionCheckStatusEvent event) {
|
||||||
versionCheckService.cancel();
|
versionCheckService.cancel();
|
||||||
|
|
||||||
if(Config.get().getMode() != Mode.OFFLINE && event.isEnabled()) {
|
if(Config.get().getMode() != Mode.OFFLINE && event.isEnabled() && Network.get() == Network.MAINNET) {
|
||||||
versionCheckService = createVersionCheckService();
|
versionCheckService = createVersionCheckService();
|
||||||
versionCheckService.start();
|
versionCheckService.start();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue