Skip to content

Commit 68ea3e5

Browse files
matevzactions-user
authored andcommitted
[Mega-Linter] Apply linters fixes
1 parent e396059 commit 68ea3e5

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/app/lib/ledger.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { WalletError, WalletErrors } from 'types/errors'
55
import { hex2uint } from './helpers'
66
import type Transport from '@ledgerhq/hw-transport'
77

8-
export const DerivationPathAdr8 = 'adr8';
9-
export const DerivationPathLegacy = 'legacy';
8+
export const DerivationPathAdr8 = 'adr8'
9+
export const DerivationPathLegacy = 'legacy'
1010

1111
interface Response {
1212
return_code: number
@@ -40,12 +40,12 @@ export class Ledger {
4040
public static mustGetPath(pathType: string, i: number) {
4141
switch (pathType) {
4242
case DerivationPathAdr8:
43-
return [44, 474, i];
43+
return [44, 474, i]
4444
case DerivationPathLegacy:
45-
return [44, 474, 0, 0, i];
45+
return [44, 474, 0, 0, i]
4646
}
4747

48-
throw new TypeError("invalid pathType: "+pathType);
48+
throw new TypeError('invalid pathType: ' + pathType)
4949
}
5050

5151
public static async enumerateAccounts(transport: Transport, pathType: string, count = 5) {
@@ -58,7 +58,7 @@ export class Ledger {
5858
throw new WalletError(WalletErrors.LedgerOasisAppIsNotOpen, 'Oasis App is not open')
5959
}
6060
for (let i = 0; i < count; i++) {
61-
const path = Ledger.mustGetPath(pathType, i);
61+
const path = Ledger.mustGetPath(pathType, i)
6262
const publicKeyResponse = successOrThrow(await app.publicKey(path), 'ledger public key')
6363
accounts.push({ path, publicKey: new Uint8Array(publicKeyResponse.pk as Buffer) })
6464
}

src/app/pages/OpenWalletPage/Features/FromLedger/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export function FromLedgerModal(props: FromLedgerModalProps) {
120120
const cancelDisabled = ledger.step === LedgerStep.Done || error ? false : true
121121
const confirmDisabled = ledger.step !== LedgerStep.Done || selectedAccounts.length === 0
122122
// TODO
123-
const [value, setValue] = useState('');
123+
const [value, setValue] = useState('')
124124

125125
return (
126126
<ResponsiveLayer position="center" modal>
@@ -129,8 +129,8 @@ export function FromLedgerModal(props: FromLedgerModalProps) {
129129
{t('openWallet.ledger.selectWallets', 'Select the wallets to open')}
130130
</Heading>
131131
<Select
132-
id='DerivationPathSelect'
133-
options={[ DerivationPathAdr8, DerivationPathLegacy ]}
132+
id="DerivationPathSelect"
133+
options={[DerivationPathAdr8, DerivationPathLegacy]}
134134
value={DerivationPathAdr8}
135135
onChange={({ value: nextValue }) => setValue(nextValue)}
136136
/>

src/app/state/ledger/saga.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { expectSaga } from 'redux-saga-test-plan'
33
import { ledgerActions } from '.'
44
import { ledgerSaga, sign } from './saga'
55
import * as matchers from 'redux-saga-test-plan/matchers'
6-
import {DerivationPathAdr8, DerivationPathLegacy, Ledger, LedgerSigner} from 'app/lib/ledger'
6+
import { DerivationPathAdr8, DerivationPathLegacy, Ledger, LedgerSigner } from 'app/lib/ledger'
77
import { getBalance } from '../wallet/saga'
88
import { addressToPublicKey } from 'app/lib/helpers'
99
import { LedgerStep } from './types'

src/app/state/ledger/saga.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import TransportWebUSB from '@ledgerhq/hw-transport-webusb'
33
import * as oasis from '@oasisprotocol/client'
44
import { publicKeyToAddress, uint2hex } from 'app/lib/helpers'
5-
import {DerivationPathAdr8, Ledger, LedgerSigner} from 'app/lib/ledger'
5+
import { DerivationPathAdr8, Ledger, LedgerSigner } from 'app/lib/ledger'
66
import { OasisTransaction } from 'app/lib/transaction'
77
import { all, call, put, select, takeEvery } from 'typed-redux-saga'
88
import { ErrorPayload, WalletError, WalletErrors } from 'types/errors'

0 commit comments

Comments
 (0)