Fix (no functional change): returning value in void function

pull/3637/head
Hwee-Boon Yar 3 years ago
parent 126735ab92
commit 52df48aa4d
  1. 12
      AlphaWallet/Browser/ViewControllers/BrowserViewController.swift
  2. 3
      AlphaWallet/Core/Enjin/EnjinAuthorization.swift
  3. 3
      AlphaWallet/Export/Coordinators/BackupCoordinator.swift
  4. 3
      AlphaWallet/Tokens/Coordinators/ENSReverseLookupCoordinator.swift
  5. 6
      AlphaWallet/Tokens/ViewControllers/StaticHTMLViewController.swift

@ -221,20 +221,24 @@ extension BrowserViewController: WKNavigationDelegate {
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
guard let url = navigationAction.request.url, let scheme = url.scheme else {
return decisionHandler(.allow)
decisionHandler(.allow)
return
}
let app = UIApplication.shared
if ["tel", "mailto"].contains(scheme), app.canOpenURL(url) {
app.open(url)
return decisionHandler(.cancel)
decisionHandler(.cancel)
return
}
if MagicLinkURL(url: url) != nil {
delegate?.handleUniversalLink(url, inBrowserViewController: self)
return decisionHandler(.cancel)
decisionHandler(.cancel)
return
}
if url.scheme == ShareContentAction.scheme {
delegate?.handleCustomUrlScheme(url, inBrowserViewController: self)
return decisionHandler(.cancel)
decisionHandler(.cancel)
return
}
decisionHandler(.allow)

@ -246,7 +246,8 @@ class UserManagementInterceptor: ApolloInterceptor {
}
guard let token = UserManager.shared.accessToken else {
return authorizeEnjinUser()
authorizeEnjinUser()
return
}
addTokenAndProceed(token, to: request, chain: chain, response: response, completion: overridenCompletion)

@ -56,7 +56,8 @@ class BackupCoordinator: Coordinator {
do {
try value.data(using: .utf8)!.write(to: url)
} catch {
return completion(.failure(AnyError(error)))
completion(.failure(AnyError(error)))
return
}
let activityViewController = UIActivityViewController(

@ -43,7 +43,8 @@ class ENSReverseLookupCoordinator {
) {
let node = "\(input.eip55String.drop0x).addr.reverse".lowercased().nameHash
if let cachedResult = cachedResult(forNode: node) {
return completion(.success(cachedResult))
completion(.success(cachedResult))
return
}
let function = GetENSResolverEncode()

@ -66,12 +66,14 @@ class StaticHTMLViewController: UIViewController {
extension StaticHTMLViewController: WKNavigationDelegate {
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
guard let url = navigationAction.request.url, url.scheme != nil else {
return decisionHandler(.allow)
decisionHandler(.allow)
return
}
if url.absoluteString.hasPrefix("http") {
delegate?.didPressOpenWebPage(url, in: self)
return decisionHandler(.cancel)
decisionHandler(.cancel)
return
}
decisionHandler(.allow)

Loading…
Cancel
Save