1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

hide ledger instructions

This commit is contained in:
Matthias Kretschmann 2023-03-16 13:34:29 +00:00
parent f09a8a9b93
commit 35bc7428bb
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { memoize } from 'lodash'; import { memoize } from 'lodash';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import LedgerInstructionField from '../ledger-instruction-field'; // import LedgerInstructionField from '../ledger-instruction-field';
import { sanitizeMessage, getURLHostName } from '../../../helpers/utils/util'; import { sanitizeMessage, getURLHostName } from '../../../helpers/utils/util';
import { EVENT } from '../../../../shared/constants/metametrics'; import { EVENT } from '../../../../shared/constants/metametrics';
import SiteOrigin from '../../ui/site-origin'; import SiteOrigin from '../../ui/site-origin';
@ -43,7 +43,7 @@ export default class SignatureRequest extends PureComponent {
/** /**
* Check if the wallet is ledget wallet or not * Check if the wallet is ledget wallet or not
*/ */
isLedgerWallet: PropTypes.bool, // isLedgerWallet: PropTypes.bool,
/** /**
* Handler for cancel button * Handler for cancel button
*/ */
@ -154,7 +154,7 @@ export default class SignatureRequest extends PureComponent {
fromAccount: { address, balance, name }, fromAccount: { address, balance, name },
cancel, cancel,
sign, sign,
isLedgerWallet, // isLedgerWallet,
hardwareWalletRequiresConnection, hardwareWalletRequiresConnection,
chainId, chainId,
rpcPrefs, rpcPrefs,
@ -302,11 +302,11 @@ export default class SignatureRequest extends PureComponent {
</div> </div>
) : null} ) : null}
</div> </div>
{isLedgerWallet ? ( {/* {isLedgerWallet ? (
<div className="confirm-approve-content__ledger-instruction-wrapper"> <div className="confirm-approve-content__ledger-instruction-wrapper">
<LedgerInstructionField showDataInstruction /> <LedgerInstructionField showDataInstruction />
</div> </div>
) : null} ) : null} */}
<Message <Message
data={sanitizedMessage} data={sanitizedMessage}
onMessageScrolled={() => this.setState({ hasScrolledMessage: true })} onMessageScrolled={() => this.setState({ hasScrolledMessage: true })}

View File

@ -41,7 +41,7 @@ import {
} from '../../selectors'; } from '../../selectors';
import { getMostRecentOverviewPage } from '../../ducks/history/history'; import { getMostRecentOverviewPage } from '../../ducks/history/history';
import { import {
isAddressLedger, // isAddressLedger,
updateGasFees, updateGasFees,
getIsGasEstimatesLoading, getIsGasEstimatesLoading,
getNativeCurrency, getNativeCurrency,
@ -197,7 +197,7 @@ const mapStateToProps = (state, ownProps) => {
const gasFeeIsCustom = const gasFeeIsCustom =
fullTxData.userFeeLevel === CUSTOM_GAS_ESTIMATE || fullTxData.userFeeLevel === CUSTOM_GAS_ESTIMATE ||
txParamsAreDappSuggested(fullTxData); txParamsAreDappSuggested(fullTxData);
const fromAddressIsLedger = isAddressLedger(state, fromAddress); // const fromAddressIsLedger = isAddressLedger(state, fromAddress);
const nativeCurrency = getNativeCurrency(state); const nativeCurrency = getNativeCurrency(state);
const hardwareWalletRequiresConnection = const hardwareWalletRequiresConnection =
@ -250,7 +250,7 @@ const mapStateToProps = (state, ownProps) => {
maxPriorityFeePerGas: gasEstimationObject.maxPriorityFeePerGas, maxPriorityFeePerGas: gasEstimationObject.maxPriorityFeePerGas,
baseFeePerGas: gasEstimationObject.baseFeePerGas, baseFeePerGas: gasEstimationObject.baseFeePerGas,
gasFeeIsCustom, gasFeeIsCustom,
showLedgerSteps: fromAddressIsLedger, showLedgerSteps: false,
nativeCurrency, nativeCurrency,
hardwareWalletRequiresConnection, hardwareWalletRequiresConnection,
isMultiLayerFeeNetwork, isMultiLayerFeeNetwork,