Skip to content

Commit

Permalink
Showcase build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
flypaper0 committed Sep 1, 2022
1 parent 8cef57d commit 429b32e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

let uri = context.url.absoluteString.replacingOccurrences(of: "showcase://wc?uri=", with: "")
Task {
try await Auth.instance.pair(uri: uri)
try await Auth.instance.pair(uri: WalletConnectURI(string: uri)!)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Auth

final class WalletInteractor {

func pair(uri: String) async throws {
func pair(uri: WalletConnectURI) async throws {
try await Auth.instance.pair(uri: uri)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ final class WalletPresenter: ObservableObject {
}

func didPastePairingURI() {
guard let uri = UIPasteboard.general.string else { return }
guard let string = UIPasteboard.general.string, let uri = WalletConnectURI(string: string) else { return }
pair(uri: uri)
}

func didScanPairingURI() {
router.presentScan { [unowned self] value in
self.pair(uri: value)
guard let uri = WalletConnectURI(string: value) else { return }
self.pair(uri: uri)
self.router.dismiss()
} onError: { error in
print(error.localizedDescription)
Expand Down Expand Up @@ -53,7 +54,7 @@ private extension WalletPresenter {
}.store(in: &disposeBag)
}

func pair(uri: String) {
func pair(uri: WalletConnectURI) {
Task(priority: .high) { [unowned self] in
try await self.interactor.pair(uri: uri)
}
Expand Down

0 comments on commit 429b32e

Please sign in to comment.