web3modal icon indicating copy to clipboard operation
web3modal copied to clipboard

[bug] Approve Transaction Modal - Sending Unlimited XYZ

Open 0xonerb opened this issue 1 year ago • 5 comments

Link to minimal reproducible example

N/A

Summary

Why does the Sending field say "Unlimited" instead of the amount the user is sending?

Screenshot from 2024-09-27 14-59-52

List of related npm package versions

"dependencies": {
  "@reown/appkit": "^1.0.4",
  "@reown/appkit-adapter-wagmi": "^1.0.4",
  "@tanstack/react-query": "^5.40.1",
  "@wagmi/core": "^2.13.4",
  "next": "^14.2.9",
  "react": "^18.3.1",
  "react-dom": "^18.3.1",
  "viem": "^2.21.2",
  "wagmi": "^2.12.8",
},

0xonerb avatar Sep 27 '24 18:09 0xonerb

hi @0xonerb can you show me what are you approving ?

rtomas avatar Sep 29 '24 23:09 rtomas

hi @0xonerb

can you show me what are you approving ?

In this case it's a regular ERC-20 Approve call.

On metamask it shows the amount correctly, but when testing wallet with authentication we are seeing "unlimited".

0x33dm avatar Sep 30 '24 04:09 0x33dm

hi @0xonerb can you show me what are you approving ?

Hey @rtomas... as @0x33dm said, it's a regular ERC-20 Approve call.

0xonerb avatar Sep 30 '24 11:09 0xonerb

Hey @rtomas, here are two transactions:

  • Transaction using AppKit: https://optimistic.etherscan.io/tx/0x177cd5aa50ec82e59c774ebb2694ca77ded0f82530d25d5777b3e9f6f7699e61

Screenshot from 2024-10-02 18-18-31

As you can see, in our app we made a transaction with an amount of 5:

Screenshot from 2024-10-02 18-22-06

The AppKit modal shows Unlimited WETH??

Screenshot from 2024-10-02 18-24-16

  • Transaction using MetaMask: https://optimistic.etherscan.io/tx/0x1d37ed2aadaae405bf1ddf7cdc7fd52571231d1e5fb06677903722c832b46558

Screenshot from 2024-10-02 11-00-19 Screenshot from 2024-10-02 11-00-11

0xonerb avatar Oct 02 '24 21:10 0xonerb

@0x33dm @0xonerb sorry for the delay - it may have been fixed - checking with the team

arein avatar Dec 12 '24 04:12 arein

https://linear.app/reown/issue/APKT-2688/[bug]-approve-transaction-modal-text-and-amount-are-wrong

rtomas avatar Apr 15 '25 01:04 rtomas

Releasing in the next version.

rtomas avatar Apr 30 '25 20:04 rtomas