diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index df8fd5139..ffa4609d0 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -1213,6 +1213,9 @@ "ledgerLiveDialogHeader": { "message": "Prior to clicking confirm:" }, + "ledgerLiveDialogStepFour": { + "message": "Enable smart contract data on your Ledger device" + }, "ledgerLiveDialogStepOne": { "message": "Enable Use Ledger Live under Settings > Advanced" }, diff --git a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js index d40c8a24f..f555e1923 100644 --- a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -402,45 +402,37 @@ export default class ConfirmTransactionBase extends Component { ) : null; + const renderLedgerLiveStep = (text, show = true) => { + return ( + show && ( + + {text} + + ) + ); + }; + const ledgerInstructionField = isLedgerAccount ? (
- - {t('ledgerLiveDialogHeader')} - - {!isFirefox && ( - - {`- ${t('ledgerLiveDialogStepOne')}`} - + {renderLedgerLiveStep(t('ledgerLiveDialogHeader'))} + {renderLedgerLiveStep( + `- ${t('ledgerLiveDialogStepOne')}`, + !isFirefox, + )} + {renderLedgerLiveStep(`- ${t('ledgerLiveDialogStepTwo')}`)} + {renderLedgerLiveStep(`- ${t('ledgerLiveDialogStepThree')}`)} + {renderLedgerLiveStep( + `- ${t('ledgerLiveDialogStepFour')}`, + Boolean(txData.txParams?.data), )} - - {`- ${t('ledgerLiveDialogStepTwo')}`} - - - {`- ${t('ledgerLiveDialogStepThree')}`} -