diff --git a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js index 5ef9171f8..a00a46e0d 100644 --- a/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js +++ b/ui/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js @@ -56,7 +56,7 @@ export default class ConfirmApproveContent extends Component { showCustomizeNonceModal: PropTypes.func, warning: PropTypes.string, txData: PropTypes.object, - ledgerWalletRequiredHidConnection: PropTypes.bool, + fromAddressIsLedger: PropTypes.bool, tokenImage: PropTypes.string, chainId: PropTypes.string, rpcPrefs: PropTypes.object, @@ -281,7 +281,7 @@ export default class ConfirmApproveContent extends Component { useNonceField, warning, txData, - ledgerWalletRequiredHidConnection, + fromAddressIsLedger, tokenImage, toAddress, chainId, @@ -479,7 +479,7 @@ export default class ConfirmApproveContent extends Component { })} - {ledgerWalletRequiredHidConnection ? ( + {fromAddressIsLedger ? (
( - state, -) => { - return doesAddressRequireLedgerHidConnection(state, address); +const isAddressLedgerByFromAddress = (address) => (state) => { + return isAddressLedger(state, address); }; export default function ConfirmApprove() { @@ -64,9 +65,7 @@ export default function ConfirmApprove() { const chainId = useSelector(getCurrentChainId); const rpcPrefs = useSelector(getRpcPrefsForCurrentProvider); - const ledgerWalletRequiredHidConnection = useSelector( - doesAddressRequireLedgerHidConnectionByFromAddress(from), - ); + const fromAddressIsLedger = useSelector(isAddressLedgerByFromAddress(from)); const transaction = currentNetworkTxList.find( @@ -239,9 +238,7 @@ export default function ConfirmApprove() { } warning={submitWarning} txData={transaction} - ledgerWalletRequiredHidConnection={ - ledgerWalletRequiredHidConnection - } + fromAddressIsLedger={fromAddressIsLedger} chainId={chainId} rpcPrefs={rpcPrefs} isContract={isContract}