MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.96k stars 4.89k forks source link

[Bug]: User is able to send and (possibly) confirm transactions that involve 0 NFTs (ERC1155) #23801

Open sleepytanya opened 6 months ago

sleepytanya commented 6 months ago

Describe the bug

You can send and confirm transactions that involve 0 NFTs (I haven't tried to confirm the transaction but 'Confirm' button is active). In such transactions, the 'Total' field will display the NFT's name along with applicable fees. The 'Estimated changes' field does not display the NFT's name. Current Send flow doesn't let user send 0 NFT.

Expected behavior

-

Screenshots/Recordings

Multichain:

https://github.com/MetaMask/metamask-extension/assets/104780023/2d26cdfb-4a96-4fe8-a36c-160001b19ebb

NFT Send flow on production:

https://github.com/MetaMask/metamask-extension/assets/104780023/151d9552-f2ac-450b-a6fd-69e68903c665

Steps to reproduce

  1. Go to NFT tab.
  2. Click on any NFT to start Send transaction
  3. Choose the recipient's address
  4. You can send 0 NFT

Error messages or log output

No response

Version

Dev build develop branch

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

sleepytanya commented 6 months ago

Dev build mb843/data-flows, Chrome Still able to send 0 NFT:

https://github.com/MetaMask/metamask-extension/assets/104780023/d7754c99-0166-470e-b38f-d7ba3ca82ee1

sleepytanya commented 6 months ago

Still present on the latest build:

https://github.com/MetaMask/metamask-extension/assets/104780023/a2f245db-7a95-40fd-be78-8771dedd87ec

ejwessel commented 6 months ago

This looks like it's by design. When transferring tokens a user is allowed to transfer 0 if they so desire. However, I agree though that his could be confusing from an ERC1155 perspective.

ejwessel commented 5 months ago

Comparing V11.13.1 to develop, this looks to be a regression.

BZahory commented 5 months ago

No longer present on latest swap+send build; removing tag

https://github.com/MetaMask/metamask-extension/assets/44588480/f4c711ee-acab-4471-9b26-e52087b07df6

hesterbruikman commented 5 months ago

For hygiene, does this mean we can close this ticket once Swap and Send is merged?

sleepytanya commented 5 months ago

Fixed - user can't send 0 NFT:

https://github.com/MetaMask/metamask-extension/assets/104780023/c146c113-74df-46ec-aa27-c48b669694d2

sleepytanya commented 5 months ago

Present on RC 11.17.0

https://jam.dev/c/9348ba95-208a-4545-903d-6fd16831df1c

and on production 11.15.4

https://jam.dev/c/db00270a-fa7c-4d35-93d8-febf89547952

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.

MarketBeatAd commented 2 months ago

Hey I created the USDT USDA and the usdc I was at the Clark house apartments when I was in the ftx hackathon. So I not going to steal . Do your homework before you excuse