Merge pull request #12686 from MetaMask/Version-v10.5.2

Version v10.5.2 RC
feature/default_network_editable
Dan J Miller 3 years ago committed by GitHub
commit f20cce1f9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      CHANGELOG.md
  2. 2
      package.json
  3. 6
      ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js
  4. 21
      ui/pages/confirm-approve/confirm-approve.js

@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [10.5.2]
### Fixed
- [#12685](https://github.com/MetaMask/metamask-extension/pull/12685): Fix Ledger WebHID issue preventing confirmation of token approvals
## [10.5.1] ## [10.5.1]
### Changed ### 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 - [#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 ### Uncategorized
- Added the ability to restore accounts from seed words. - 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.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.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 [10.4.1]: https://github.com/MetaMask/metamask-extension/compare/v10.4.0...v10.4.1

@ -1,6 +1,6 @@
{ {
"name": "metamask-crx", "name": "metamask-crx",
"version": "10.5.1", "version": "10.5.2",
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",

@ -46,7 +46,7 @@ export default class ConfirmApproveContent extends Component {
showCustomizeNonceModal: PropTypes.func, showCustomizeNonceModal: PropTypes.func,
warning: PropTypes.string, warning: PropTypes.string,
txData: PropTypes.object, txData: PropTypes.object,
ledgerWalletRequiredHidConnection: PropTypes.bool, fromAddressIsLedger: PropTypes.bool,
}; };
state = { state = {
@ -242,7 +242,7 @@ export default class ConfirmApproveContent extends Component {
useNonceField, useNonceField,
warning, warning,
txData, txData,
ledgerWalletRequiredHidConnection, fromAddressIsLedger,
} = this.props; } = this.props;
const { showFullTxDetails } = this.state; const { showFullTxDetails } = this.state;
@ -351,7 +351,7 @@ export default class ConfirmApproveContent extends Component {
})} })}
</div> </div>
{ledgerWalletRequiredHidConnection ? ( {fromAddressIsLedger ? (
<div className="confirm-approve-content__ledger-instruction-wrapper"> <div className="confirm-approve-content__ledger-instruction-wrapper">
<LedgerInstructionField <LedgerInstructionField
showDataInstruction={Boolean(txData.txParams?.data)} showDataInstruction={Boolean(txData.txParams?.data)}

@ -15,7 +15,11 @@ import {
getTokenValueParam, getTokenValueParam,
} from '../../helpers/utils/token-util'; } from '../../helpers/utils/token-util';
import { useTokenTracker } from '../../hooks/useTokenTracker'; import { useTokenTracker } from '../../hooks/useTokenTracker';
import { getTokens, getNativeCurrency } from '../../ducks/metamask/metamask'; import {
getTokens,
getNativeCurrency,
isAddressLedger,
} from '../../ducks/metamask/metamask';
import { import {
transactionFeeSelector, transactionFeeSelector,
txDataSelector, txDataSelector,
@ -24,7 +28,6 @@ import {
getUseNonceField, getUseNonceField,
getCustomNonceValue, getCustomNonceValue,
getNextSuggestedNonce, getNextSuggestedNonce,
doesAddressRequireLedgerHidConnection,
} from '../../selectors'; } from '../../selectors';
import { useApproveTransaction } from '../../hooks/useApproveTransaction'; import { useApproveTransaction } from '../../hooks/useApproveTransaction';
@ -36,10 +39,8 @@ import { isEqualCaseInsensitive } from '../../helpers/utils/util';
import { getCustomTxParamsData } from './confirm-approve.util'; import { getCustomTxParamsData } from './confirm-approve.util';
import ConfirmApproveContent from './confirm-approve-content'; import ConfirmApproveContent from './confirm-approve-content';
const doesAddressRequireLedgerHidConnectionByFromAddress = (address) => ( const isAddressLedgerByFromAddress = (address) => (state) => {
state, return isAddressLedger(state, address);
) => {
return doesAddressRequireLedgerHidConnection(state, address);
}; };
export default function ConfirmApprove() { export default function ConfirmApprove() {
@ -59,9 +60,7 @@ export default function ConfirmApprove() {
const nextNonce = useSelector(getNextSuggestedNonce); const nextNonce = useSelector(getNextSuggestedNonce);
const customNonceValue = useSelector(getCustomNonceValue); const customNonceValue = useSelector(getCustomNonceValue);
const ledgerWalletRequiredHidConnection = useSelector( const fromAddressIsLedger = useSelector(isAddressLedgerByFromAddress(from));
doesAddressRequireLedgerHidConnectionByFromAddress(from),
);
const transaction = const transaction =
currentNetworkTxList.find( currentNetworkTxList.find(
@ -219,9 +218,7 @@ export default function ConfirmApprove() {
} }
warning={submitWarning} warning={submitWarning}
txData={transaction} txData={transaction}
ledgerWalletRequiredHidConnection={ fromAddressIsLedger={fromAddressIsLedger}
ledgerWalletRequiredHidConnection
}
/> />
{showCustomizeGasPopover && ( {showCustomizeGasPopover && (
<EditGasPopover <EditGasPopover

Loading…
Cancel
Save