Skip to content

Commit

Permalink
fix: unused exports
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarkhanzadian committed Jan 10, 2024
1 parent 35c2ff1 commit 3fff31d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/features/ledger/utils/generic-ledger-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,23 @@ export function prepareLedgerDeviceForAppFn<T extends () => Promise<unknown>>(co
type TransportInstance = Awaited<ReturnType<typeof TransportWebUSB.create>>;

// Reference: https://github.com/LedgerHQ/ledger-live/blob/v22.0.1/src/hw/quitApp.ts
export async function quitApp(transport: TransportInstance): Promise<void> {
async function quitApp(transport: TransportInstance): Promise<void> {
await transport.send(0xb0, 0xa7, 0x00, 0x00);
}

// Reference: https://github.com/LedgerHQ/ledger-live/blob/v22.0.1/src/hw/openApp.ts
export async function openApp(transport: TransportInstance, name: string): Promise<void> {
async function openApp(transport: TransportInstance, name: string): Promise<void> {
await transport.send(0xe0, 0xd8, 0x00, 0x00, Buffer.from(name, 'ascii'));
}

export async function getAppAndVersion() {
async function getAppAndVersion() {
const tmpTransport = await TransportWebUSB.create();
const tmpBitcoinApp = new BitcoinApp(tmpTransport);
const appAndVersion = await tmpBitcoinApp.getAppAndVersion();
return appAndVersion;
}

export async function quitAppOnDevice() {
async function quitAppOnDevice() {
const tmpTransport = await TransportWebUSB.create();
await quitApp(tmpTransport);
// for some reason sending quit app buffer to ledger will close the connection afterwards.
Expand Down

0 comments on commit 3fff31d

Please sign in to comment.