Nit, use as LedgerTypes casting (#4425)

* as LedgerType

* import type
This commit is contained in:
Thibaut Sardan 2021-01-15 14:07:55 +01:00 committed by GitHub
parent 2442a00c08
commit 96c5e785e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { ApiPromise } from '@polkadot/api';
import type { LedgerTypes } from '@polkadot/hw-ledger/types';
import { useCallback, useMemo } from 'react';
@ -37,7 +38,7 @@ function retrieveLedger (api: ApiPromise): Ledger {
assert(def, `Unable to find supported chain for ${genesisHex}`);
ledger = new Ledger(uiSettings.ledgerConn as 'u2f', def.network);
ledger = new Ledger(uiSettings.ledgerConn as LedgerTypes, def.network);
}
return ledger;