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

[feature] Universal Links do not work as intended #39

Open
AlexandrosGounis opened this issue Oct 24, 2024 · 0 comments
Open

[feature] Universal Links do not work as intended #39

AlexandrosGounis opened this issue Oct 24, 2024 · 0 comments

Comments

@AlexandrosGounis
Copy link

What problem does this new feature solve?

We want to use Universal Links with a custom mobile wallet that we defined in mobileWallets, as follows:

new WalletConnectModal({
    // ...
    explorerExcludedWalletIds: 'ALL',
    mobileWallets: [{
        name: "Foo Wallet",
        id: "foo",
        links: {
            universal: "https://link.foo.com",
            native: "foo://"
        }
    }],
});

Because we included both a universal and a native link, the Wallet Connect Modal tries to use the native link first, which results in a system prompt: "Open this page in Foo". However, if we set native to an empty string or use the same universal link, that does not work as intended. This is because there is a small delay between the user action (selecting a wallet) and the triggering of the universal link. Apple changes the entitlement when there are such delays, and, instead of being redirected to the iOS app, the user is redirected to the web page that is associated with that universal link.

Describe the solution you'd like

Pairings/sessions should be created before selecting a wallet to avoid delays between the user action and the universal link trigger. If there's no native link defined, the universal link should be used as the primary link:

new WalletConnectModal({
    // ...
    explorerExcludedWalletIds: 'ALL',
    mobileWallets: [{
        name: "Foo Wallet",
        id: "foo",
        links: {
            universal: "https://link.foo.com",
            native: null // forces universal link
        }
    }],
});
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

No branches or pull requests

1 participant