diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f8384e14..aef71c924 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] +## [10.18.3] +### Fixed +- Prevent confirm screen from showing method name from contract registry for transactions created within MetaMask ([#15472](https://github.com/MetaMask/metamask-extension/pull/15472)) + ## [10.18.2] ### Changed - Enhance approval screen title logic ([#15406](https://github.com/MetaMask/metamask-extension/pull/15406)) @@ -3103,7 +3107,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Uncategorized - Added the ability to restore accounts from seed words. -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.18.2...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.18.3...HEAD +[10.18.3]: https://github.com/MetaMask/metamask-extension/compare/v10.18.2...v10.18.3 [10.18.2]: https://github.com/MetaMask/metamask-extension/compare/v10.18.1...v10.18.2 [10.18.1]: https://github.com/MetaMask/metamask-extension/compare/v10.18.0...v10.18.1 [10.18.0]: https://github.com/MetaMask/metamask-extension/compare/v10.17.0...v10.18.0 diff --git a/package.json b/package.json index e085b11d1..a749aee57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "10.18.2", + "version": "10.18.3", "private": true, "repository": { "type": "git", diff --git a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js index 5e2d9861a..21c78f0ae 100644 --- a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -1048,7 +1048,10 @@ export default class ConfirmTransactionBase extends Component { } = this.getNavigateTxData(); let functionType; - if (txData.type === TRANSACTION_TYPES.CONTRACT_INTERACTION) { + if ( + txData.type === TRANSACTION_TYPES.CONTRACT_INTERACTION && + txData.origin !== 'metamask' + ) { functionType = getMethodName(name); } diff --git a/ui/pages/confirm-transaction/confirm-transaction.component.js b/ui/pages/confirm-transaction/confirm-transaction.component.js index 01e876fdb..fb853741f 100644 --- a/ui/pages/confirm-transaction/confirm-transaction.component.js +++ b/ui/pages/confirm-transaction/confirm-transaction.component.js @@ -68,7 +68,7 @@ export default class ConfirmTransaction extends Component { sendTo, history, mostRecentOverviewPage, - transaction: { txParams: { data } = {} } = {}, + transaction: { txParams: { data } = {}, origin } = {}, getContractMethodData, transactionId, paramsTransactionId, @@ -91,7 +91,9 @@ export default class ConfirmTransaction extends Component { return; } - getContractMethodData(data); + if (origin !== 'metamask') { + getContractMethodData(data); + } const txId = transactionId || paramsTransactionId; if (txId) { @@ -107,7 +109,7 @@ export default class ConfirmTransaction extends Component { componentDidUpdate(prevProps) { const { setTransactionToConfirm, - transaction: { txData: { txParams: { data } = {} } = {} }, + transaction: { txData: { txParams: { data } = {}, origin } = {} }, clearConfirmTransaction, getContractMethodData, paramsTransactionId, @@ -124,8 +126,10 @@ export default class ConfirmTransaction extends Component { prevProps.paramsTransactionId !== paramsTransactionId ) { clearConfirmTransaction(); - getContractMethodData(data); setTransactionToConfirm(paramsTransactionId); + if (origin !== 'metamask') { + getContractMethodData(data); + } } else if ( prevProps.transactionId && !transactionId &&