Skip to content

Commit

Permalink
Fixed hardware wallet info popup
Browse files Browse the repository at this point in the history
  • Loading branch information
filipsekulic committed Mar 1, 2023
1 parent 56cba09 commit b3ee025
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ui/pages/token-allowance/token-allowance.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
getUnapprovedTxCount,
getUnapprovedTransactions,
getUseCurrencyRateCheck,
isHardwareWallet,
} from '../../selectors';
import { NETWORK_TO_NAME_MAP } from '../../../shared/constants/network';
import {
Expand Down Expand Up @@ -62,6 +63,7 @@ import { ConfirmPageContainerNavigation } from '../../components/app/confirm-pag
import { useSimulationFailureWarning } from '../../hooks/useSimulationFailureWarning';
import SimulationErrorMessage from '../../components/ui/simulation-error-message';
import { Icon, ICON_NAMES } from '../../components/component-library';
import LedgerInstructionField from '../../components/app/ledger-instruction-field/ledger-instruction-field';

export default function TokenAllowance({
origin,
Expand Down Expand Up @@ -111,6 +113,7 @@ export default function TokenAllowance({
const unapprovedTxCount = useSelector(getUnapprovedTxCount);
const unapprovedTxs = useSelector(getUnapprovedTransactions);
const useCurrencyRateCheck = useSelector(getUseCurrencyRateCheck);
const isHardwareWalletConnected = useSelector(isHardwareWallet);

const replaceCommaToDot = (inputValue) => {
return inputValue.replace(/,/gu, '.');
Expand Down Expand Up @@ -491,6 +494,11 @@ export default function TokenAllowance({
</Box>
</Box>
) : null}
{!isFirstPage && isHardwareWalletConnected && (
<Box paddingLeft={2} paddingRight={2}>
<LedgerInstructionField showDataInstruction />
</Box>
)}
<PageContainerFooter
cancelText={t('reject')}
submitText={isFirstPage ? t('next') : t('approveButtonText')}
Expand Down

0 comments on commit b3ee025

Please sign in to comment.