diff --git a/CHANGELOG.md b/CHANGELOG.md index ad00f06ec372..529d6764a977 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [12.2.4] +### Fixed +- Fixes token approvals for users who have the "Decode smart contracts" setting toggled off ([#27203](https://github.com/MetaMask/metamask-extension/pull/27203)) + ## [12.2.3] ### Fixed - Fixes dapps integrating with the cosmos chain that rely on setting the `verifyingContract` field of a signature to `"cosmos"` @@ -5048,7 +5052,8 @@ Update styles and spacing on the critical error page ([#20350](https://github.c - Added the ability to restore accounts from seed words. -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.2.3...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.2.4...HEAD +[12.2.4]: https://github.com/MetaMask/metamask-extension/compare/v12.2.3...v12.2.4 [12.2.3]: https://github.com/MetaMask/metamask-extension/compare/v12.2.2...v12.2.3 [12.2.2]: https://github.com/MetaMask/metamask-extension/compare/v12.2.1...v12.2.2 [12.2.1]: https://github.com/MetaMask/metamask-extension/compare/v12.2.0...v12.2.1 diff --git a/package.json b/package.json index 541a6a7bba82..e796cab76162 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "12.2.3", + "version": "12.2.4", "private": true, "repository": { "type": "git", diff --git a/ui/pages/confirmations/components/confirm/info/hooks/useFourByte.test.ts b/ui/pages/confirmations/components/confirm/info/hooks/useFourByte.test.ts index 1c3d66570d8b..bdff31ac33e6 100644 --- a/ui/pages/confirmations/components/confirm/info/hooks/useFourByte.test.ts +++ b/ui/pages/confirmations/components/confirm/info/hooks/useFourByte.test.ts @@ -34,7 +34,7 @@ describe('useFourByte', () => { expect(result.current.params).toEqual([]); }); - it('returns undefined if resolution is turned off', () => { + it('returns empty object if resolution is turned off', () => { const currentConfirmation = genUnapprovedContractInteractionConfirmation({ address: CONTRACT_INTERACTION_SENDER_ADDRESS, txData: depositHexData, @@ -54,7 +54,7 @@ describe('useFourByte', () => { }, ); - expect(result.current).toBeUndefined(); + expect(result.current).toEqual({}); }); it("returns undefined if it's not known even if resolution is enabled", () => { @@ -75,6 +75,6 @@ describe('useFourByte', () => { }, ); - expect(result.current).toBeUndefined(); + expect(result.current).toEqual({}); }); }); diff --git a/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx b/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx index 992e16f1baad..89bee67f4c51 100644 --- a/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx +++ b/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx @@ -70,7 +70,7 @@ const MethodDataRow = () => { const methodData = useFourByte(currentConfirmation); - if (!methodData) { + if (!methodData?.name) { return null; } diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index e2f208149092..68187a1874b3 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -1236,7 +1236,7 @@ export function getKnownMethodData(state, data) { const fourBytePrefix = prefixedData.slice(0, 10); const { knownMethodData, use4ByteResolution } = state.metamask; // If 4byte setting is off, we do not want to return the knownMethodData - return use4ByteResolution ? knownMethodData?.[fourBytePrefix] : undefined; + return use4ByteResolution ? knownMethodData?.[fourBytePrefix] ?? {} : {}; } export function getFeatureFlags(state) {