mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-15 03:41:03 +00:00
337f377ee9
* Ledger transports arrays for node vs web vs rn * Flatten requires
25 lines
648 B
TypeScript
25 lines
648 B
TypeScript
// Copyright 2017-2019 @polkadot/ui-keyring authors & contributors
|
|
// This software may be modified and distributed under the terms
|
|
// of the Apache-2.0 license. See the LICENSE file for details.
|
|
|
|
import { TransportDef } from './types';
|
|
|
|
import Transport from '@ledgerhq/hw-transport';
|
|
import LedgerU2F from '@ledgerhq/hw-transport-u2f';
|
|
import LedgerWebUSB from '@ledgerhq/hw-transport-webusb';
|
|
|
|
const transports: TransportDef[] = [
|
|
{
|
|
create: (): Promise<Transport> =>
|
|
LedgerU2F.create(),
|
|
type: 'u2f'
|
|
},
|
|
{
|
|
create: (): Promise<Transport> =>
|
|
LedgerWebUSB.create(),
|
|
type: 'webusb'
|
|
}
|
|
];
|
|
|
|
export default transports;
|