Skip to content

Commit

Permalink
refactor: hd path prefix as const
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinbodnar committed May 9, 2022
1 parent 90639d5 commit 436e270
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
clearAccountState
} from '../../../redux/actions/account';
import { selectAccountSlice } from '../../../redux/slices/account';
import { actions as ledgerActions, LEDGER_MODAL_STATUS, selectLedgerSignInWithLedger, selectLedgerSignInWithLedgerStatus, selectLedgerTxSigned } from '../../../redux/slices/ledger';
import { actions as ledgerActions, LEDGER_HD_PATH_PREFIX, LEDGER_MODAL_STATUS, selectLedgerSignInWithLedger, selectLedgerSignInWithLedgerStatus, selectLedgerTxSigned } from '../../../redux/slices/ledger';
import { selectStatusMainLoader } from '../../../redux/slices/status';
import parseFundingOptions from '../../../utils/parseFundingOptions';
import Container from '../../common/styled/Container.css';
Expand Down Expand Up @@ -40,7 +40,7 @@ export function SignInLedgerWrapper(props) {
const [accountId, setAccountId] = useState('');
const [loader, setLoader] = useState(false);
const [confirmedPath, setConfirmedPath] = useState(1);
const ledgerHdPath = `44'/397'/0'/0'/${confirmedPath}'`;
const ledgerHdPath = `${LEDGER_HD_PATH_PREFIX}${confirmedPath}'`;

const account = useSelector(selectAccountSlice);
const signInWithLedgerState = useSelector(selectLedgerSignInWithLedger);
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/src/redux/slices/ledger/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import refreshAccountOwner from '../../sharedThunks/refreshAccountOwner';

const SLICE_NAME = 'ledger';

export const LEDGER_HD_PATH_PREFIX = '44\'/397\'/0\'/0\'/';

export const LEDGER_MODAL_STATUS = {
CONFIRM_PUBLIC_KEY: 'confirm-public-key',
CONFIRM_ACCOUNTS: 'confirm-accounts',
Expand Down

0 comments on commit 436e270

Please sign in to comment.