Skip to content

Thirdweb in-app wallet with wagmi (without smart account) always sends 0 value #6444

@cvpfus

Description

@cvpfus

When using thirdweb in-app wallet with wagmi (without smart account), transactions are being processed with 0 value regardless of the amount specified in the sendTransaction call. I believe other methods behave the same way.

Steps to reproduce

  1. Clone this repository: https://github.com/thirdweb-example/wagmi-inapp-smart-wallets
  2. Comment out the smartAccount configuration in wagmi.ts:
export const config = createConfig({
  chains: [chain],
  connectors: [
    inAppWalletConnector({
      client,
      // smartAccount: {
      //   chain: thirdwebChain(chain),
      //   sponsorGas: true,
      // },
    }),
  ],
  transports: {
    [chain.id]: http(),
  },
});
  1. Try to send a transaction with a non-zero value in App.tsx:
<button onClick={() => sendTransaction({ to: account.address, value: parseEther("0.001") })} type="button">
  1. Check the transaction on the blockchain - it will show a value of 0.

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