From e1a24d3bc00c0ccd6adbf6780219718f4d93f85a Mon Sep 17 00:00:00 2001 From: Rodrigo Varela Date: Wed, 11 Dec 2024 10:28:02 +1100 Subject: [PATCH] - fix crash when connect fails --- iosClient/Podfile.lock | 4 ++-- iosClient/Pods/Local Podspecs/domain.podspec.json | 2 +- iosClient/Pods/Manifest.lock | 4 ++-- shared/domain/domain.podspec | 2 +- shared/presentation/presentation.podspec | 2 +- .../bisq/mobile/client/ClientMainPresenter.kt | 12 +++++++++++- 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/iosClient/Podfile.lock b/iosClient/Podfile.lock index dea4083f..63e8cc90 100644 --- a/iosClient/Podfile.lock +++ b/iosClient/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - domain (0.0.9) + - domain (0.0.11) - presentation (0.0.9) DEPENDENCIES: @@ -13,7 +13,7 @@ EXTERNAL SOURCES: :path: "../shared/presentation" SPEC CHECKSUMS: - domain: feb764d7802f6a414d3f649e95721d16a38d018e + domain: 7b60b3f5ced94f5e4004f4239c7534bb7e8d0297 presentation: 8c21a3748676af08d28227a02cad92c9a7eeb27a PODFILE CHECKSUM: 431d52ef58584308462794999ebead56142b0160 diff --git a/iosClient/Pods/Local Podspecs/domain.podspec.json b/iosClient/Pods/Local Podspecs/domain.podspec.json index c3ee2e40..d217542b 100644 --- a/iosClient/Pods/Local Podspecs/domain.podspec.json +++ b/iosClient/Pods/Local Podspecs/domain.podspec.json @@ -1,6 +1,6 @@ { "name": "domain", - "version": "0.0.9", + "version": "0.0.11", "homepage": "X", "source": { "http": "" diff --git a/iosClient/Pods/Manifest.lock b/iosClient/Pods/Manifest.lock index dea4083f..63e8cc90 100644 --- a/iosClient/Pods/Manifest.lock +++ b/iosClient/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - domain (0.0.9) + - domain (0.0.11) - presentation (0.0.9) DEPENDENCIES: @@ -13,7 +13,7 @@ EXTERNAL SOURCES: :path: "../shared/presentation" SPEC CHECKSUMS: - domain: feb764d7802f6a414d3f649e95721d16a38d018e + domain: 7b60b3f5ced94f5e4004f4239c7534bb7e8d0297 presentation: 8c21a3748676af08d28227a02cad92c9a7eeb27a PODFILE CHECKSUM: 431d52ef58584308462794999ebead56142b0160 diff --git a/shared/domain/domain.podspec b/shared/domain/domain.podspec index 74bb372c..ef309cf1 100644 --- a/shared/domain/domain.podspec +++ b/shared/domain/domain.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'domain' - spec.version = '0.0.9' + spec.version = '0.0.11' spec.homepage = 'X' spec.source = { :http=> ''} spec.authors = '' diff --git a/shared/presentation/presentation.podspec b/shared/presentation/presentation.podspec index 8da21de4..4fb980a8 100644 --- a/shared/presentation/presentation.podspec +++ b/shared/presentation/presentation.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'presentation' - spec.version = '0.0.9' + spec.version = '0.0.11' spec.homepage = 'X' spec.source = { :http=> ''} spec.authors = '' diff --git a/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/client/ClientMainPresenter.kt b/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/client/ClientMainPresenter.kt index f420f3a6..513b63a4 100644 --- a/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/client/ClientMainPresenter.kt +++ b/shared/presentation/src/commonMain/kotlin/network/bisq/mobile/client/ClientMainPresenter.kt @@ -19,7 +19,17 @@ class ClientMainPresenter( override fun onViewAttached() { super.onViewAttached() runCatching { - backgroundScope.launch { webSocketClient.connect() } + backgroundScope.launch { + runCatching { + webSocketClient.connect() + }.onSuccess { + log.d { "Connected to trusted node" } + }.onFailure { + // TODO give user feedback (we could have a general error screen covering usual + // issues like connection issues and potential solutions) + log.e { "ERROR: FAILED to connect to trusted node - details above" } + } + } applicationBootstrapFacade.activate() offerbookServiceFacade.activate()