Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native Redirect #1202

Merged
merged 6 commits into from
Nov 1, 2023
Merged

Native Redirect #1202

merged 6 commits into from
Nov 1, 2023

Conversation

alexander-lsvk
Copy link
Contributor

Description

Resolves # (issue)

How Has This Been Tested?

Due Dilligence

  • Breaking change
  • Requires a documentation update

@alexander-lsvk alexander-lsvk temporarily deployed to internal October 30, 2023 08:31 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal October 30, 2023 08:34 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal October 30, 2023 08:37 — with GitHub Actions Inactive

public struct WalletConnectRouter {
public static func goBack(uri: String) {
DispatchQueue.main.async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we nee separate package to call UIApplication.shared.open?
May be just remove Router package?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to keep the old solution to maintain functionality for iOS versions below 17 and to be prepared for any potential future workarounds

@alexander-lsvk alexander-lsvk temporarily deployed to internal October 30, 2023 08:57 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal October 30, 2023 08:59 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal October 30, 2023 09:20 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal October 30, 2023 10:11 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal October 30, 2023 10:19 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal October 30, 2023 10:21 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal October 30, 2023 10:42 — with GitHub Actions Inactive
import UIKit

public struct WalletConnectRouter {
public static func goBack(uri: String) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if the uri is an empty string for example?
should the function throw?

/* Redirect */
let session = getSession(topic: sessionRequest.topic)
if let uri = session?.peer.redirect.native {
WalletConnectRouter.goBack(uri: uri)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do you distinguish new router from the legacy one here?

@alexander-lsvk alexander-lsvk temporarily deployed to internal October 30, 2023 16:13 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal October 30, 2023 16:49 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal October 31, 2023 11:17 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal October 31, 2023 21:26 — with GitHub Actions Inactive
@alexander-lsvk alexander-lsvk temporarily deployed to internal November 1, 2023 09:56 — with GitHub Actions Inactive
@llbartekll llbartekll merged commit b9b59ad into develop Nov 1, 2023
4 of 8 checks passed
@llbartekll llbartekll deleted the native-redirect branch November 1, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants