MetaMask / metamask-extension

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

[Bug]: OPENSEA: setApprovalForAll via OpenSea website will trigger Metamask error #23749

Open bobjiang opened 4 months ago

bobjiang commented 4 months ago

Describe the bug

list a STTT on OpenSea Opensea will ask you to setApprovalForAll Metamask shows error https://youtu.be/rLfS3pNm-yc (reproducible with MM 11.11.4)

Message: Invalid data; should be 'approve' method, but instead is 'setApprovalForAll'

Code: Error

Stack:
Error: Invalid data; should be 'approve' method, but instead is 'setApprovalForAll'
  at a.getCustomTxParamsData (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-7.js:1:182560)
  at Z (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-8.js:1:60482)
  at ga (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:246078)
  at Pl (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:291005)
  at Iu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:276868)
  at Au (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:276793)
  at Eu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:274133)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:232483
  at n.unstable_runWithPriority (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-2.js:1:221729)
  at Yi (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:232192)
  at eo (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:232428)
  at Zi (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:232363)
  at bu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:270899)
  at Ia (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:249735)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-7.js:1:326789

telegram-cloud-photo-size-5-6059606939899379905-y

Tried JoyID with STTT in Opensea, works fine. Tried MM with Uniswap V# NFT in Opensea, works fine.

Expected behavior

The expected behavior is that the prompt window could be shown correctly for the users to approve the contract.

Screenshots/Recordings

telegram-cloud-photo-size-5-6059606939899379905-y

https://youtu.be/rLfS3pNm-yc (reproducible with MM 11.11.4)

Steps to reproduce

  1. go to https://app.uniswap.org/swap?exactField=&outputCurrency=0x1C672b7f931ff72Ee4DF9ADB90F410f96563D599&inputCurrency=eth&chain=sepolia
  2. buy 1-10 SATT1 on sepolia network
  3. go to opensea testnet https://testnets.opensea.io/
  4. listing the token SATT1

Error messages or log output

Message: Invalid data; should be 'approve' method, but instead is 'setApprovalForAll'

Code: Error

Stack:
Error: Invalid data; should be 'approve' method, but instead is 'setApprovalForAll'
  at a.getCustomTxParamsData (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-7.js:1:182560)
  at Z (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-8.js:1:60482)
  at ga (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:246078)
  at Pl (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:291005)
  at Iu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:276868)
  at Au (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:276793)
  at Eu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:274133)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:232483
  at n.unstable_runWithPriority (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-2.js:1:221729)
  at Yi (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:232192)
  at eo (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:232428)
  at Zi (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:232363)
  at bu (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:270899)
  at Ia (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-1.js:33:249735)
  at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/ui-7.js:1:326789


### Version

11.12.4

### Build type

None

### Browser

Chrome

### Operating system

MacOS

### Hardware wallet

_No response_

### Additional context

_No response_

### Severity

_No response_
DanielTech21 commented 4 months ago

Hi @bobjiang

Thanks for raising this issue with us.

We will review the error in more detail.

github-actions[bot] commented 1 month 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.