Skip to content

Wrong app launched on session requests when two installed apps share a custom scheme (OKX Wallet vs OKX exchange app on Android) #373

Description

@z-chu

Environment

  • reown_appkit: 1.8.3
  • Platform: Android
  • Test device has both OKX Wallet and the OKX exchange app installed (both register the okx:// scheme)

Steps to reproduce

  1. Open the AppKit grid → tap OKX Wallet → pairing succeeds, OKX Wallet opens correctly.
  2. Once the session is established, trigger any RPC (e.g. solana_signMessage).
  3. Expected: OKX Wallet is brought to the foreground.
  4. Actual: the OKX exchange app opens instead.

Cause

_launchRequestOnWallet in appkit_modal_impl.dart launches the wallet using the peer-supplied metadata.redirect.native (or .universal), while the initial pairing path (connectSelectedWallet) uses the explorer-registered walletInfo.listing.mobileLink.

OKX Wallet self-reports the generic okx:// scheme, which Android's OKX exchange app also handles — so the OS resolves to the wrong app on every request after pairing. The initial pairing works because the explorer-registered mobileLink is wallet-id specific.

My fix

I've patched the request path locally to prefer the explorer registry's mobileLink over the peer-supplied scheme, falling back to peer-supplied only when the registry has no entry. Behavior is unchanged for wallets where the two agree (the common case); only mismatched wallets like OKX Wallet get realigned to the scheme that already works at pairing time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions