mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 23:58:06 +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
f200876b54
commit
a58211c0dd
@ -123,7 +123,7 @@ export default class ConfirmTransactionBase extends Component {
|
|||||||
maxPriorityFeePerGas: PropTypes.string,
|
maxPriorityFeePerGas: PropTypes.string,
|
||||||
baseFeePerGas: PropTypes.string,
|
baseFeePerGas: PropTypes.string,
|
||||||
gasFeeIsCustom: PropTypes.bool,
|
gasFeeIsCustom: PropTypes.bool,
|
||||||
isLedgerAccount: PropTypes.bool.isRequired,
|
showLedgerSteps: PropTypes.bool.isRequired,
|
||||||
isFirefox: PropTypes.bool.isRequired,
|
isFirefox: PropTypes.bool.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -303,7 +303,7 @@ export default class ConfirmTransactionBase extends Component {
|
|||||||
primaryTotalTextOverrideMaxAmount,
|
primaryTotalTextOverrideMaxAmount,
|
||||||
maxFeePerGas,
|
maxFeePerGas,
|
||||||
maxPriorityFeePerGas,
|
maxPriorityFeePerGas,
|
||||||
isLedgerAccount,
|
showLedgerSteps,
|
||||||
isFirefox,
|
isFirefox,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { t } = this.context;
|
const { t } = this.context;
|
||||||
@ -418,7 +418,7 @@ export default class ConfirmTransactionBase extends Component {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const ledgerInstructionField = isLedgerAccount ? (
|
const ledgerInstructionField = showLedgerSteps ? (
|
||||||
<div>
|
<div>
|
||||||
<div className="confirm-detail-row">
|
<div className="confirm-detail-row">
|
||||||
<Dialog type="message">
|
<Dialog type="message">
|
||||||
@ -428,7 +428,10 @@ export default class ConfirmTransactionBase extends Component {
|
|||||||
`- ${t('ledgerLiveDialogStepOne')}`,
|
`- ${t('ledgerLiveDialogStepOne')}`,
|
||||||
!isFirefox,
|
!isFirefox,
|
||||||
)}
|
)}
|
||||||
{renderLedgerLiveStep(`- ${t('ledgerLiveDialogStepTwo')}`)}
|
{renderLedgerLiveStep(
|
||||||
|
`- ${t('ledgerLiveDialogStepTwo')}`,
|
||||||
|
!isFirefox,
|
||||||
|
)}
|
||||||
{renderLedgerLiveStep(`- ${t('ledgerLiveDialogStepThree')}`)}
|
{renderLedgerLiveStep(`- ${t('ledgerLiveDialogStepThree')}`)}
|
||||||
{renderLedgerLiveStep(
|
{renderLedgerLiveStep(
|
||||||
`- ${t('ledgerLiveDialogStepFour')}`,
|
`- ${t('ledgerLiveDialogStepFour')}`,
|
||||||
|
@ -29,7 +29,7 @@ import {
|
|||||||
getShouldShowFiat,
|
getShouldShowFiat,
|
||||||
checkNetworkAndAccountSupports1559,
|
checkNetworkAndAccountSupports1559,
|
||||||
getPreferences,
|
getPreferences,
|
||||||
getAccountType,
|
getHardwareWalletType,
|
||||||
} from '../../selectors';
|
} from '../../selectors';
|
||||||
import { getMostRecentOverviewPage } from '../../ducks/history/history';
|
import { getMostRecentOverviewPage } from '../../ducks/history/history';
|
||||||
import {
|
import {
|
||||||
@ -165,7 +165,7 @@ const mapStateToProps = (state, ownProps) => {
|
|||||||
const gasFeeIsCustom =
|
const gasFeeIsCustom =
|
||||||
fullTxData.userFeeLevel === 'custom' ||
|
fullTxData.userFeeLevel === 'custom' ||
|
||||||
txParamsAreDappSuggested(fullTxData);
|
txParamsAreDappSuggested(fullTxData);
|
||||||
const isLedgerAccount = getAccountType(state) === KEYRING_TYPES.LEDGER;
|
const showLedgerSteps = getHardwareWalletType(state) === KEYRING_TYPES.LEDGER;
|
||||||
const isFirefox = getPlatform() === PLATFORM_FIREFOX;
|
const isFirefox = getPlatform() === PLATFORM_FIREFOX;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -214,7 +214,7 @@ const mapStateToProps = (state, ownProps) => {
|
|||||||
maxPriorityFeePerGas: gasEstimationObject.maxPriorityFeePerGas,
|
maxPriorityFeePerGas: gasEstimationObject.maxPriorityFeePerGas,
|
||||||
baseFeePerGas: gasEstimationObject.baseFeePerGas,
|
baseFeePerGas: gasEstimationObject.baseFeePerGas,
|
||||||
gasFeeIsCustom,
|
gasFeeIsCustom,
|
||||||
isLedgerAccount,
|
showLedgerSteps,
|
||||||
isFirefox,
|
isFirefox,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user