mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fixing ledger steps display (Confirm TX) (#12163)
* Fixing ledger steps display (Confirm TX) * Hiding step two on Firefox
This commit is contained in:
parent
9929820b88
commit
aba2c71948
@ -125,7 +125,7 @@ export default class ConfirmTransactionBase extends Component {
|
||||
baseFeePerGas: PropTypes.string,
|
||||
isMainnet: PropTypes.bool,
|
||||
gasFeeIsCustom: PropTypes.bool,
|
||||
isLedgerAccount: PropTypes.bool.isRequired,
|
||||
showLedgerSteps: PropTypes.bool.isRequired,
|
||||
isFirefox: PropTypes.bool.isRequired,
|
||||
nativeCurrency: PropTypes.string,
|
||||
};
|
||||
@ -307,7 +307,7 @@ export default class ConfirmTransactionBase extends Component {
|
||||
maxFeePerGas,
|
||||
maxPriorityFeePerGas,
|
||||
isMainnet,
|
||||
isLedgerAccount,
|
||||
showLedgerSteps,
|
||||
isFirefox,
|
||||
} = this.props;
|
||||
const { t } = this.context;
|
||||
@ -417,7 +417,7 @@ export default class ConfirmTransactionBase extends Component {
|
||||
);
|
||||
};
|
||||
|
||||
const ledgerInstructionField = isLedgerAccount ? (
|
||||
const ledgerInstructionField = showLedgerSteps ? (
|
||||
<div>
|
||||
<div className="confirm-detail-row">
|
||||
<Dialog type="message">
|
||||
@ -427,7 +427,10 @@ export default class ConfirmTransactionBase extends Component {
|
||||
`- ${t('ledgerLiveDialogStepOne')}`,
|
||||
!isFirefox,
|
||||
)}
|
||||
{renderLedgerLiveStep(`- ${t('ledgerLiveDialogStepTwo')}`)}
|
||||
{renderLedgerLiveStep(
|
||||
`- ${t('ledgerLiveDialogStepTwo')}`,
|
||||
!isFirefox,
|
||||
)}
|
||||
{renderLedgerLiveStep(`- ${t('ledgerLiveDialogStepThree')}`)}
|
||||
{renderLedgerLiveStep(
|
||||
`- ${t('ledgerLiveDialogStepFour')}`,
|
||||
|
@ -28,7 +28,7 @@ import {
|
||||
getShouldShowFiat,
|
||||
checkNetworkAndAccountSupports1559,
|
||||
getPreferences,
|
||||
getAccountType,
|
||||
getHardwareWalletType,
|
||||
getUseTokenDetection,
|
||||
getTokenList,
|
||||
} from '../../selectors';
|
||||
@ -168,7 +168,7 @@ const mapStateToProps = (state, ownProps) => {
|
||||
const gasFeeIsCustom =
|
||||
fullTxData.userFeeLevel === 'custom' ||
|
||||
txParamsAreDappSuggested(fullTxData);
|
||||
const isLedgerAccount = getAccountType(state) === KEYRING_TYPES.LEDGER;
|
||||
const showLedgerSteps = getHardwareWalletType(state) === KEYRING_TYPES.LEDGER;
|
||||
const isFirefox = getPlatform() === PLATFORM_FIREFOX;
|
||||
const nativeCurrency = getNativeCurrency(state);
|
||||
|
||||
@ -217,7 +217,7 @@ const mapStateToProps = (state, ownProps) => {
|
||||
maxPriorityFeePerGas: gasEstimationObject.maxPriorityFeePerGas,
|
||||
baseFeePerGas: gasEstimationObject.baseFeePerGas,
|
||||
gasFeeIsCustom,
|
||||
isLedgerAccount,
|
||||
showLedgerSteps,
|
||||
isFirefox,
|
||||
nativeCurrency,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user