From 68ea3e5095a65cfbd3318f6ff20487bd599b9afc Mon Sep 17 00:00:00 2001 From: matevz Date: Mon, 21 Mar 2022 15:35:51 +0000 Subject: [PATCH] [Mega-Linter] Apply linters fixes --- src/app/lib/ledger.ts | 12 ++++++------ .../OpenWalletPage/Features/FromLedger/index.tsx | 6 +++--- src/app/state/ledger/saga.test.ts | 2 +- src/app/state/ledger/saga.ts | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app/lib/ledger.ts b/src/app/lib/ledger.ts index a5c0252cc9..bda698c3b1 100644 --- a/src/app/lib/ledger.ts +++ b/src/app/lib/ledger.ts @@ -5,8 +5,8 @@ import { WalletError, WalletErrors } from 'types/errors' import { hex2uint } from './helpers' import type Transport from '@ledgerhq/hw-transport' -export const DerivationPathAdr8 = 'adr8'; -export const DerivationPathLegacy = 'legacy'; +export const DerivationPathAdr8 = 'adr8' +export const DerivationPathLegacy = 'legacy' interface Response { return_code: number @@ -40,12 +40,12 @@ export class Ledger { public static mustGetPath(pathType: string, i: number) { switch (pathType) { case DerivationPathAdr8: - return [44, 474, i]; + return [44, 474, i] case DerivationPathLegacy: - return [44, 474, 0, 0, i]; + return [44, 474, 0, 0, i] } - throw new TypeError("invalid pathType: "+pathType); + throw new TypeError('invalid pathType: ' + pathType) } public static async enumerateAccounts(transport: Transport, pathType: string, count = 5) { @@ -58,7 +58,7 @@ export class Ledger { throw new WalletError(WalletErrors.LedgerOasisAppIsNotOpen, 'Oasis App is not open') } for (let i = 0; i < count; i++) { - const path = Ledger.mustGetPath(pathType, i); + const path = Ledger.mustGetPath(pathType, i) const publicKeyResponse = successOrThrow(await app.publicKey(path), 'ledger public key') accounts.push({ path, publicKey: new Uint8Array(publicKeyResponse.pk as Buffer) }) } diff --git a/src/app/pages/OpenWalletPage/Features/FromLedger/index.tsx b/src/app/pages/OpenWalletPage/Features/FromLedger/index.tsx index 726b5b007f..ccff76152b 100644 --- a/src/app/pages/OpenWalletPage/Features/FromLedger/index.tsx +++ b/src/app/pages/OpenWalletPage/Features/FromLedger/index.tsx @@ -120,7 +120,7 @@ export function FromLedgerModal(props: FromLedgerModalProps) { const cancelDisabled = ledger.step === LedgerStep.Done || error ? false : true const confirmDisabled = ledger.step !== LedgerStep.Done || selectedAccounts.length === 0 // TODO - const [value, setValue] = useState(''); + const [value, setValue] = useState('') return ( @@ -129,8 +129,8 @@ export function FromLedgerModal(props: FromLedgerModalProps) { {t('openWallet.ledger.selectWallets', 'Select the wallets to open')}