diff --git a/lib/network/bloc/network_cubit.dart b/lib/network/bloc/network_cubit.dart index 9f0f4841..79684246 100644 --- a/lib/network/bloc/network_cubit.dart +++ b/lib/network/bloc/network_cubit.dart @@ -387,25 +387,28 @@ class NetworkCubit extends Cubit { } // Connection test with electrum - final mainnetElectrumLive = await isElectrumLive(tempNetwork.mainnet); - if (!mainnetElectrumLive) { - emit( - state.copyWith( - errLoadingNetworks: - 'Pls check mainnet electrum URL. Cannot connect to electrum', - ), - ); - return; - } - final testnetElectrumLive = await isElectrumLive(tempNetwork.testnet); - if (!testnetElectrumLive) { - emit( - state.copyWith( - errLoadingNetworks: - 'Pls check testnet electrum URL. Cannot connect to electrum', - ), - ); - return; + if (state.testnet) { + final testnetElectrumLive = await isElectrumLive(tempNetwork.testnet); + if (!testnetElectrumLive) { + emit( + state.copyWith( + errLoadingNetworks: + 'Check Testnet electrum URL. Could not connect to electrum.', + ), + ); + return; + } + } else { + final mainnetElectrumLive = await isElectrumLive(tempNetwork.mainnet); + if (!mainnetElectrumLive) { + emit( + state.copyWith( + errLoadingNetworks: + 'Check Mainnet electrum URL. Could not connect to electrum.', + ), + ); + return; + } } final index = diff --git a/pubspec.yaml b/pubspec.yaml index f4da1fb7..41e001c1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: bb_mobile description: Bull Bitcoin Mobile Wallet publish_to: "none" -version: 0.3.2+23 +version: 0.3.2-4+23 environment: sdk: ">=3.3.0 <4.0.0"