web3-onboard: [Bug] Wallet Connect + Gnosis

Current Behavior

Trying to perform a transaction using Gnosis (via Wallet connect), but the transasction hash is never retrieved (even if the transaction is well signed + executed via Metamask on gnosis)…

Expected Behavior

Get the tx hash even if the request is perform using wallet connect on gnosis

Steps To Reproduce

  1. Here is the code relative which perform a transaction on a gnosis wallet using wallet connect
  const sendTransaction = async (token: CurrencyType, to: string, amount: number, network: NetworkType, metadata) => {
    const metadataHex = stringToHex(JSON.stringify(metadata));
    const amountWei = ethers.utils.parseUnits(amount.toString(), tokenConfig.decimal[token].toString());
    await setChain(networkConfig[network]);

    try {
      if (wallets.value[0]) {
        const ethersProvider = new ethers.providers.Web3Provider(wallets.value[0].provider, 'any');
        const signer = ethersProvider.getSigner();
        let request = { to, value: amountWei, data: `0x${metadataHex}` };

        const _isNativeToken = isNativeToken(token, network);

        if (!_isNativeToken) {
          const transferInterface = 'function transfer(address to, uint256 amount)';
          const tokenContract = tokenConfig.address[network][token];
          const generatedData = new ethers.utils.Interface([transferInterface]).encodeFunctionData('transfer', [
            to,
            amountWei
          ]);

          request = { to: tokenContract, data: `${generatedData}${metadataHex}` };
        }

        const txn = await signer.sendTransaction(request);
        return txn.hash;
      }
    } catch (error) {
      throw error;
    }
  };

If I put a console.log after the txn, I still stuck on the await of the signer to retrieve the transaction…

Here the reproduce step:

  1. Open wallet connect on your app, copy paste the link (top right corner),
  2. Connect to gnosis on a goerliETH account for example and click on app in the left menu
  3. Paste wallet connect link into wallet connect provider
  4. Go back on your UI and perform a transaction
  5. Validate the transaction on the Gnosis UI
  6. The tx hash on this executed transaction is never retrieved

I perform an integration using wallet connect and wagmi (following the documentation of wagmi, and the hash is well retrieved.

What package is effected by this issue?

@web3-onboard/core

Is this a build or a runtime issue?

Runtime

Package Version

2.6.2

Node Version

16.13

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Anything else?

I am using wallet connect v1 / same not working with v2

Sanity Check

  • If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Thanks @katspaugh will do

Currently experiencing the same issue.