reown-com / appkit

The full stack toolkit to build onchain app UX
https://reown.com/appkit
Apache License 2.0
4.95k stars 1.42k forks source link

[bug] Approve Transaction Modal - Sending Unlimited XYZ #2959

Open 0xonerb opened 2 months ago

0xonerb commented 2 months ago

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",
},
rtomas commented 2 months ago

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

0x33dm commented 2 months ago

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".

0xonerb commented 2 months ago

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

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

0xonerb commented 2 months ago

Hey @rtomas, here are two transactions:

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

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

rtomas commented 1 month ago

https://linear.app/reown/issue/APKT-1239/[bug]-showing-sending-unlimited-usdt-when-approving-erc-20