Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.
This repository was archived by the owner on May 13, 2025. It is now read-only.

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

@AlexandrosGounis

Description

@AlexandrosGounis

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
        }
    }],
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions