@@ -1,5 +1,6 @@
11import * as bip32 from 'bip32';
22import React, { useState } from 'react';
3+import { times } from 'lodash';
34import Maybe from 'folktale/maybe';
45import Transport from '@ledgerhq/hw-transport-u2f';
56import Eth from '@ledgerhq/hw-app-eth';
@@ -67,13 +68,10 @@ export default function Ledger({ loginCompleted }) {
6768 ];
6869 const basePathTitle = pathOptions.find(o => o.value === basePath).title;
6970
70− let accountOptions = [];
71− for (let i = 0; i < 20; i++) {
72− accountOptions.push({
73− title: 'Account #' + (i + 1),
74− value: i,
75− });
76− }
71+ const accountOptions = times(20, i => ({
72+ title: `Account #${i + 1}`,
73+ value: i,
74+ }));
7775 const accountTitle = accountOptions.find(o => o.value === account).title;
7876
7977 const basePathSelection = (