diff --git a/Kukai Mobile.xcodeproj/project.pbxproj b/Kukai Mobile.xcodeproj/project.pbxproj index 5c0c15bc..539ff8f6 100644 --- a/Kukai Mobile.xcodeproj/project.pbxproj +++ b/Kukai Mobile.xcodeproj/project.pbxproj @@ -2768,7 +2768,7 @@ repositoryURL = "https://github.com/getsentry/sentry-cocoa"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 8.3.0; + minimumVersion = 8.24.0; }; }; C0CB9C1F2A4C512C000E12FA /* XCRemoteSwiftPackageReference "keychain-swift" */ = { diff --git a/Kukai Mobile.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Kukai Mobile.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a371fe39..47ec3c39 100644 --- a/Kukai Mobile.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Kukai Mobile.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -18,22 +18,13 @@ "version" : "5.3.0" } }, - { - "identity" : "cryptoswift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/krzyzanowskim/CryptoSwift.git", - "state" : { - "revision" : "19b3c3ceed117c5cc883517c4e658548315ba70b", - "version" : "1.6.0" - } - }, { "identity" : "curvelib.swift", "kind" : "remoteSourceControl", "location" : "https://github.com/tkey/curvelib.swift", "state" : { - "revision" : "7dad3bf1793de263f83406c08c18c9316abf082f", - "version" : "0.1.2" + "revision" : "9f88bd5e56d1df443a908f7a7e81ae4f4d9170ea", + "version" : "1.0.1" } }, { @@ -41,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/torusresearch/customauth-swift-sdk", "state" : { - "branch" : "master", - "revision" : "ef2d280cbdf39f75a2ed9b8ad6e734d349992371" + "revision" : "60b48acb161fb4341c353c27bc6dd96af76887ff", + "version" : "10.0.1" } }, { @@ -50,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/torusresearch/fetch-node-details-swift", "state" : { - "revision" : "d591af500f32ce3c88d04af9bb74d746585acfea", - "version" : "5.1.0" + "revision" : "5f67cd080c26cf38ae91e7fe63e6217c6e401c07", + "version" : "6.0.2" } }, { @@ -78,7 +69,7 @@ "location" : "https://github.com/kukai-wallet/kukai-core-swift", "state" : { "branch" : "feature/update_torus", - "revision" : "9a013be16c4fc922d75e3caaee978b99bc3ac898" + "revision" : "a74cadbca20353f50faea41f4aedd6bdca7fdbf7" } }, { @@ -86,8 +77,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/kukai-wallet/kukai-crypto-swift", "state" : { - "revision" : "b83b7109b577337600cc064cb95aa1df9f8a9979", - "version" : "1.0.18" + "revision" : "baba23dbfc54ada78bacc4b61b24efb2afa45b85", + "version" : "1.0.19" } }, { @@ -122,8 +113,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/getsentry/sentry-cocoa", "state" : { - "revision" : "c85564d7c92adb28f7ee15e2d758b67d7bfd06bd", - "version" : "8.3.0" + "revision" : "ef4fec9dfb8dd5027b09a4a5c9362feafd118e1a", + "version" : "8.24.0" } }, { @@ -176,8 +167,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/torusresearch/torus-utils-swift", "state" : { - "revision" : "04c62fd5f73f21bd01b7c07e08f6135db26c5940", - "version" : "8.0.0" + "revision" : "ff85c3e96bfa29013309b487875c4d9383e4ac80", + "version" : "8.1.1" } }, { diff --git a/Kukai Mobile/Extensions/String+extensions.swift b/Kukai Mobile/Extensions/String+extensions.swift index 6429c2a7..1019b372 100644 --- a/Kukai Mobile/Extensions/String+extensions.swift +++ b/Kukai Mobile/Extensions/String+extensions.swift @@ -22,7 +22,7 @@ extension String { return processString(fromIndex: 14) } - let d = (try? Data(hexString: self)) ?? Data() + let d = Data(hexString: self) ?? Data() let readable = String(data: d, encoding: .isoLatin1) return readable ?? "" @@ -40,7 +40,7 @@ extension String { let index = self.index(self.startIndex, offsetBy: fromIndex) let subString = String(self.suffix(from: index)) - let d = (try? Data(hexString: subString)) ?? Data() + let d = Data(hexString: subString) ?? Data() let readable = String(data: d, encoding: .isoLatin1) return readable ?? "" diff --git a/Kukai Mobile/Extensions/UIViewController+extensions.swift b/Kukai Mobile/Extensions/UIViewController+extensions.swift index 3a1aab2a..a62e00b6 100644 --- a/Kukai Mobile/Extensions/UIViewController+extensions.swift +++ b/Kukai Mobile/Extensions/UIViewController+extensions.swift @@ -175,6 +175,14 @@ extension UIViewController { } } + static func removeLoadingModal(invisible: Bool = false, completion: (() -> Void)? = nil) { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { + UIViewController.activityIndicator.stopAnimating() + UIViewController.loadingModal.dismiss(animated: !invisible, completion: completion) + UIViewController.loadingModalStatusLabel.text = "" + } + } + var isModal: Bool { let presentingIsModal = presentingViewController != nil let presentingIsNavigation = navigationController?.presentingViewController?.presentedViewController == navigationController diff --git a/Kukai Mobile/Modules/Send/SendAbstractConfirmViewController.swift b/Kukai Mobile/Modules/Send/SendAbstractConfirmViewController.swift index 9bd1ba81..4d37d1cb 100644 --- a/Kukai Mobile/Modules/Send/SendAbstractConfirmViewController.swift +++ b/Kukai Mobile/Modules/Send/SendAbstractConfirmViewController.swift @@ -37,17 +37,19 @@ class SendAbstractConfirmViewController: UIViewController { super.viewWillAppear(animated) // Monitor connection - Networking.instance.socketConnectionStatusPublisher.sink { [weak self] status in - DispatchQueue.main.async { [weak self] in - - if status == .disconnected { - self?.showLoadingModal() - self?.updateLoadingModalStatusLabel(message: "Reconnecting ... ") - } else { - self?.hideLoadingModal() + if isWalletConnectOp { + Networking.instance.socketConnectionStatusPublisher.sink { [weak self] status in + DispatchQueue.main.async { [weak self] in + + if status == .disconnected { + self?.showLoadingModal() + self?.updateLoadingModalStatusLabel(message: "Reconnecting ... ") + } else { + UIViewController.removeLoadingModal() + } } - } - }.store(in: &bag) + }.store(in: &bag) + } } override func viewDidDisappear(_ animated: Bool) { @@ -60,7 +62,10 @@ class SendAbstractConfirmViewController: UIViewController { func dismissAndReturn(collapseOnly: Bool) { DispatchQueue.main.async { [weak self] in - self?.dismiss(animated: true) + self?.dismiss(animated: true, completion: { + UIViewController.removeLoadingView() + UIViewController.removeLoadingModal() + }) if collapseOnly == false { (self?.presentingViewController as? UINavigationController)?.popToHome() diff --git a/Kukai Mobile/Services/RequestIfService.swift b/Kukai Mobile/Services/RequestIfService.swift index 446dc156..13371fd2 100644 --- a/Kukai Mobile/Services/RequestIfService.swift +++ b/Kukai Mobile/Services/RequestIfService.swift @@ -105,8 +105,8 @@ public class RequestIfService { } private func validate(secureObject: SecureServiceObject, responseType: T.Type) -> T? { - guard let publicKeyData = try? Data(hexString: "d71729958d14ba994b9bf29816f9710bd944d0ed7dc3e5a58a31532ca87e06f6"), - let signatureData = try? Data(hexString: secureObject.signature), + guard let publicKeyData = Data(hexString: "d71729958d14ba994b9bf29816f9710bd944d0ed7dc3e5a58a31532ca87e06f6"), + let signatureData = Data(hexString: secureObject.signature), let data = Data(base64Encoded: secureObject.data) else { Logger.app.error("RequestIfService unable to setup secure data processing")