From 58cccdf1cdeb66e3e14d2fb7115bafd2f267b6ef Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Fri, 12 Nov 2021 19:52:24 -0330 Subject: [PATCH 1/3] Ensure approve button can be enabled when using ledger webhid (#12685) --- .../confirm-approve-content.component.js | 6 +++--- ui/pages/confirm-approve/confirm-approve.js | 21 ++++++++----------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js index 40f8e13de..6226f6e22 100644 --- a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js +++ b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js @@ -46,7 +46,7 @@ export default class ConfirmApproveContent extends Component { showCustomizeNonceModal: PropTypes.func, warning: PropTypes.string, txData: PropTypes.object, - ledgerWalletRequiredHidConnection: PropTypes.bool, + fromAddressIsLedger: PropTypes.bool, }; state = { @@ -242,7 +242,7 @@ export default class ConfirmApproveContent extends Component { useNonceField, warning, txData, - ledgerWalletRequiredHidConnection, + fromAddressIsLedger, } = this.props; const { showFullTxDetails } = this.state; @@ -351,7 +351,7 @@ export default class ConfirmApproveContent extends Component { })} - {ledgerWalletRequiredHidConnection ? ( + {fromAddressIsLedger ? (
( - state, -) => { - return doesAddressRequireLedgerHidConnection(state, address); +const isAddressLedgerByFromAddress = (address) => (state) => { + return isAddressLedger(state, address); }; export default function ConfirmApprove() { @@ -59,9 +60,7 @@ export default function ConfirmApprove() { const nextNonce = useSelector(getNextSuggestedNonce); const customNonceValue = useSelector(getCustomNonceValue); - const ledgerWalletRequiredHidConnection = useSelector( - doesAddressRequireLedgerHidConnectionByFromAddress(from), - ); + const fromAddressIsLedger = useSelector(isAddressLedgerByFromAddress(from)); const transaction = currentNetworkTxList.find( @@ -219,9 +218,7 @@ export default function ConfirmApprove() { } warning={submitWarning} txData={transaction} - ledgerWalletRequiredHidConnection={ - ledgerWalletRequiredHidConnection - } + fromAddressIsLedger={fromAddressIsLedger} /> {showCustomizeGasPopover && ( Date: Fri, 12 Nov 2021 23:34:53 +0000 Subject: [PATCH 2/3] Version v10.5.2 --- CHANGELOG.md | 7 ++++++- package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e3f994f5..2c9d2c86b 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.5.2] +### Uncategorized +- Ensure approve button can be enabled when using ledger webhid ([#12685](https://github.com/MetaMask/metamask-extension/pull/12685)) + ## [10.5.1] ### Changed - [#12658](https://github.com/MetaMask/metamask-extension/pull/12658): Properly display transaction fees on layer two networks like Optimism which have fees on both layers @@ -2550,7 +2554,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.5.1...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.5.2...HEAD +[10.5.2]: https://github.com/MetaMask/metamask-extension/compare/v10.5.1...v10.5.2 [10.5.1]: https://github.com/MetaMask/metamask-extension/compare/v10.5.0...v10.5.1 [10.5.0]: https://github.com/MetaMask/metamask-extension/compare/v10.4.1...v10.5.0 [10.4.1]: https://github.com/MetaMask/metamask-extension/compare/v10.4.0...v10.4.1 diff --git a/package.json b/package.json index 8d085fc15..7185aa783 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "10.5.1", + "version": "10.5.2", "private": true, "repository": { "type": "git", From 662b90df72fd913dd6e46e683868a9e76057c6ea Mon Sep 17 00:00:00 2001 From: ryanml Date: Fri, 12 Nov 2021 16:36:34 -0700 Subject: [PATCH 3/3] Updating changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c9d2c86b..aaf95f66d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [10.5.2] -### Uncategorized -- Ensure approve button can be enabled when using ledger webhid ([#12685](https://github.com/MetaMask/metamask-extension/pull/12685)) +### Fixed +- [#12685](https://github.com/MetaMask/metamask-extension/pull/12685): Fix Ledger WebHID issue preventing confirmation of token approvals ## [10.5.1] ### Changed