-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #505 from Outblock/67-bug-issue-connecting-to-ankr…
…-staking-on-mobile-flow-wallet Fix WC modal not response on iOS
- Loading branch information
Showing
5 changed files
with
84 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// AppExternalLinks.swift | ||
// FRW | ||
// | ||
// Created by Hao Fu on 11/11/2024. | ||
// | ||
|
||
import Foundation | ||
|
||
enum AppExternalLinks: String, CaseIterable { | ||
case frw = "frw://" | ||
case fcw = "fcw://" | ||
case lilico = "lilico://" | ||
case frwUL = "https://frw-link.lilico.app" | ||
case fcwUL = "https://fcw-link.lilico.app" | ||
|
||
var isUniversalLink: Bool { | ||
switch self { | ||
case .frwUL, .fcwUL: | ||
return true | ||
default: | ||
return false | ||
} | ||
} | ||
|
||
static var allLinks: [String] { | ||
AppExternalLinks.allCases.map(\.rawValue) | ||
} | ||
|
||
static func exactWCLink(link: String) -> String { | ||
let newLink = link | ||
.replacingOccurrences(of: "wc%2Fwc", with: "wc") | ||
.replacingOccurrences(of: "wc/wc", with: "wc") | ||
|
||
return newLink | ||
.deletingPrefixes(allLinks.map{link in "\(link)/wc?uri=" }) | ||
.deletingPrefixes(allLinks.map{link in "\(link)wc?uri=" }) | ||
.deletingPrefixes(allLinks) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters