Skip to content

Commit

Permalink
Merge branch 'feature/wc2_experiment' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmcl committed Apr 25, 2024
2 parents 19f9321 + c26f251 commit c0d1c2b
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Kukai Mobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,31 @@
"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"
}
},
{
"identity" : "customauth-swift-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/torusresearch/customauth-swift-sdk",
"state" : {
"branch" : "master",
"revision" : "ef2d280cbdf39f75a2ed9b8ad6e734d349992371"
"revision" : "60b48acb161fb4341c353c27bc6dd96af76887ff",
"version" : "10.0.1"
}
},
{
"identity" : "fetch-node-details-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/torusresearch/fetch-node-details-swift",
"state" : {
"revision" : "d591af500f32ce3c88d04af9bb74d746585acfea",
"version" : "5.1.0"
"revision" : "5f67cd080c26cf38ae91e7fe63e6217c6e401c07",
"version" : "6.0.2"
}
},
{
Expand All @@ -78,16 +69,16 @@
"location" : "https://github.com/kukai-wallet/kukai-core-swift",
"state" : {
"branch" : "feature/update_torus",
"revision" : "9a013be16c4fc922d75e3caaee978b99bc3ac898"
"revision" : "a74cadbca20353f50faea41f4aedd6bdca7fdbf7"
}
},
{
"identity" : "kukai-crypto-swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kukai-wallet/kukai-crypto-swift",
"state" : {
"revision" : "b83b7109b577337600cc064cb95aa1df9f8a9979",
"version" : "1.0.18"
"revision" : "baba23dbfc54ada78bacc4b61b24efb2afa45b85",
"version" : "1.0.19"
}
},
{
Expand Down Expand Up @@ -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"
}
},
{
Expand Down Expand Up @@ -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"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions Kukai Mobile/Extensions/String+extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? ""
Expand All @@ -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 ?? ""
Expand Down
8 changes: 8 additions & 0 deletions Kukai Mobile/Extensions/UIViewController+extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 16 additions & 11 deletions Kukai Mobile/Modules/Send/SendAbstractConfirmViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions Kukai Mobile/Services/RequestIfService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public class RequestIfService {
}

private func validate<T: Codable>(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")
Expand Down

0 comments on commit c0d1c2b

Please sign in to comment.