mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Adding "Enable smart contract data" step to Ledger Instructions (Confirmation Screen) (#12115)
This commit is contained in:
parent
2b104603d5
commit
792f9efa56
@ -1213,6 +1213,9 @@
|
|||||||
"ledgerLiveDialogHeader": {
|
"ledgerLiveDialogHeader": {
|
||||||
"message": "Prior to clicking confirm:"
|
"message": "Prior to clicking confirm:"
|
||||||
},
|
},
|
||||||
|
"ledgerLiveDialogStepFour": {
|
||||||
|
"message": "Enable smart contract data on your Ledger device"
|
||||||
|
},
|
||||||
"ledgerLiveDialogStepOne": {
|
"ledgerLiveDialogStepOne": {
|
||||||
"message": "Enable Use Ledger Live under Settings > Advanced"
|
"message": "Enable Use Ledger Live under Settings > Advanced"
|
||||||
},
|
},
|
||||||
|
@ -402,45 +402,37 @@ export default class ConfirmTransactionBase extends Component {
|
|||||||
</div>
|
</div>
|
||||||
) : null;
|
) : null;
|
||||||
|
|
||||||
|
const renderLedgerLiveStep = (text, show = true) => {
|
||||||
|
return (
|
||||||
|
show && (
|
||||||
|
<Typography
|
||||||
|
boxProps={{ margin: 0 }}
|
||||||
|
color={COLORS.PRIMARY3}
|
||||||
|
fontWeight={FONT_WEIGHT.BOLD}
|
||||||
|
variant={TYPOGRAPHY.H7}
|
||||||
|
>
|
||||||
|
{text}
|
||||||
|
</Typography>
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const ledgerInstructionField = isLedgerAccount ? (
|
const ledgerInstructionField = isLedgerAccount ? (
|
||||||
<div>
|
<div>
|
||||||
<div className="confirm-detail-row">
|
<div className="confirm-detail-row">
|
||||||
<Dialog type="message">
|
<Dialog type="message">
|
||||||
<div className="ledger-live-dialog">
|
<div className="ledger-live-dialog">
|
||||||
<Typography
|
{renderLedgerLiveStep(t('ledgerLiveDialogHeader'))}
|
||||||
boxProps={{ margin: 0 }}
|
{renderLedgerLiveStep(
|
||||||
color={COLORS.PRIMARY3}
|
`- ${t('ledgerLiveDialogStepOne')}`,
|
||||||
fontWeight={FONT_WEIGHT.BOLD}
|
!isFirefox,
|
||||||
variant={TYPOGRAPHY.H7}
|
)}
|
||||||
>
|
{renderLedgerLiveStep(`- ${t('ledgerLiveDialogStepTwo')}`)}
|
||||||
{t('ledgerLiveDialogHeader')}
|
{renderLedgerLiveStep(`- ${t('ledgerLiveDialogStepThree')}`)}
|
||||||
</Typography>
|
{renderLedgerLiveStep(
|
||||||
{!isFirefox && (
|
`- ${t('ledgerLiveDialogStepFour')}`,
|
||||||
<Typography
|
Boolean(txData.txParams?.data),
|
||||||
boxProps={{ margin: 0 }}
|
|
||||||
color={COLORS.PRIMARY3}
|
|
||||||
fontWeight={FONT_WEIGHT.BOLD}
|
|
||||||
variant={TYPOGRAPHY.H7}
|
|
||||||
>
|
|
||||||
{`- ${t('ledgerLiveDialogStepOne')}`}
|
|
||||||
</Typography>
|
|
||||||
)}
|
)}
|
||||||
<Typography
|
|
||||||
boxProps={{ margin: 0 }}
|
|
||||||
color={COLORS.PRIMARY3}
|
|
||||||
fontWeight={FONT_WEIGHT.BOLD}
|
|
||||||
variant={TYPOGRAPHY.H7}
|
|
||||||
>
|
|
||||||
{`- ${t('ledgerLiveDialogStepTwo')}`}
|
|
||||||
</Typography>
|
|
||||||
<Typography
|
|
||||||
boxProps={{ margin: 0 }}
|
|
||||||
color={COLORS.PRIMARY3}
|
|
||||||
fontWeight={FONT_WEIGHT.BOLD}
|
|
||||||
variant={TYPOGRAPHY.H7}
|
|
||||||
>
|
|
||||||
{`- ${t('ledgerLiveDialogStepThree')}`}
|
|
||||||
</Typography>
|
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user