Skip to content

TokenPocket injected EVM transaction fails in the iOS mobile DApp browser #843

Description

@BiscuitCoder

Description

Image

EVM transactions initiated by LI.FI Widget fail when the application is opened inside the TokenPocket iOS mobile wallet's DApp browser and uses TokenPocket's injected EVM provider.

Wallet connection and route quoting work correctly. However, starting the transaction from the Widget results in an error, and the route cannot be executed successfully.

This issue has currently only been reproduced on iOS. We have not confirmed whether TokenPocket on Android is affected.

Environment

  • Platform: iOS
  • Wallet: TokenPocket iOS mobile wallet
  • Browser: TokenPocket's built-in DApp browser
  • Provider: window.tokenpocket?.ethereum ?? window.ethereum
  • Chain type: EVM
  • @lifi/widget: 4.5.0
  • wagmi: 3.7.1
  • viem: >=2.52.0
  • tp-js-sdk: 3.7.14

Connector configuration

const tokenPocketConnector = injected({
  target: {
    id: 'tokenPocket',
    name: 'TokenPocket',
    provider: () =>
      window.tokenpocket?.ethereum ?? window.ethereum,
  },
})

The Wagmi configuration is synchronized with the EVM chains supplied by LI.FI Widget using useSyncWagmiConfig.

Steps to reproduce

  1. Open an application containing LI.FI Widget in the TokenPocket iOS wallet's built-in DApp browser.
  2. Connect the current TokenPocket EVM wallet through the injected connector.
  3. Select an EVM source chain and token.
  4. Obtain a route and continue to the transaction review page.
  5. Start the transaction.
  6. The EVM transaction fails, and the route cannot complete.

Expected behavior

LI.FI Widget should submit the transaction through TokenPocket's injected EVM provider and display TokenPocket's normal transaction confirmation flow.

Actual behavior

The wallet connects and the route is prepared successfully, but the transaction fails during execution on TokenPocket for iOS.

Platform scope

The issue has been reproduced on TokenPocket for iOS.

We have not yet tested or reproduced it on Android, so it is currently unknown whether the Android version is affected as well.

Additional context

We are also testing the injected provider directly with:

  • eth_requestAccounts
  • personal_sign
  • A minimal eth_sendTransaction request

This is intended to determine whether the incompatibility is in TokenPocket's iOS provider or in the Widget/Wagmi transaction request.

Could you confirm whether TokenPocket's injected EVM provider on iOS is currently supported by @lifi/widget-provider-ethereum and whether any TokenPocket-specific connector or transaction-request normalization is required?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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