wevm / references

Collection of Chains & Connectors for wagmi
MIT License
99 stars 205 forks source link

bug: Got "Oops! An error occurred" when using TrustWallet chrome extension for approve() function of ERC20 #445

Closed jingxuan98 closed 1 year ago

jingxuan98 commented 1 year ago

Is there an existing issue for this?

Current Behavior

Got "Oops! An error occurred" when using TrustWallet chrome extension for approve() function of ERC20 Screenshot 2023-07-21 at 10 19 36 AM

When its other contract interaction, it works fine Screenshot 2023-07-21 at 10 18 24 AM

Expected Behavior

Able to sign the approval txn successfully

Steps To Reproduce

  1. Try to sign a ERC20 approve() function

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

The way i initiate the ERC20 approve()

const token = TokenImplementation__factory.connect(tokenAddress, signer);
  return await (
    await token.approve(tokenBridgeAddress, amount, overrides)
  ).wait();

No response

Anything else?

No response

imaksp commented 1 year ago

Are you sure that this is wagmi/viem's issue,? it could be due to some bug in beta trust wallet extension. Have you tried calling it directly using ethereum.request or using other web3 lib?

jxom commented 1 year ago

This is a Trust Wallet issue. Best to get in touch with them.