Commit a09d076
authored
fix(cherry-pick) : selector getKnownMethodData should return empty object if user has opted out for using 4Byte Resolution (#27213)
## **Description**
If user has toggled off **Decode smart contracts** setting he is not
able to approve ERC20. This is regression introduced recently.
## **Related issues**
Fixes: #27188
## **Manual testing steps**
1. Toggle off setting "Decode smart contracts"
2. Try to approve an ERC 20
3. It should not throw error
## **Screenshots/Recordings**
https://github.com/user-attachments/assets/7f0fd8f9-3d97-4f4b-8e99-c694445ad929
## **Pre-merge author checklist**
- [X] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [X] I've completed the PR template to the best of my ability
- [X] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [X] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.1 parent 4b48aa9 commit a09d076
File tree
3 files changed
+5
-5
lines changed- ui
- pages/confirmations/components/confirm/info
- hooks
- selectors
3 files changed
+5
-5
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1236 | 1236 | | |
1237 | 1237 | | |
1238 | 1238 | | |
1239 | | - | |
| 1239 | + | |
1240 | 1240 | | |
1241 | 1241 | | |
1242 | 1242 | | |
| |||
0 commit comments