Skip to content

Commit

Permalink
chore(connect): improve types, replace any with PassphrasePromptResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
mroz22 committed Feb 7, 2024
1 parent 5b9e800 commit 9a95962
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/connect-ui/src/views/Passphrase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const Passphrase = (props: PassphraseProps) => {
payload: {
value,
passphraseOnDevice,
// todo: what is this param?
// see PassphrasePromptResponse type
save: true,
},
});
Expand Down
7 changes: 5 additions & 2 deletions packages/connect/src/device/Device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TypedEmitter } from '@trezor/utils/lib/typedEventEmitter';
import { createDeferred, Deferred } from '@trezor/utils/lib/createDeferred';
import * as versionUtils from '@trezor/utils/lib/versionUtils';
import { TransportProtocol, v1 as v1Protocol, bridge as bridgeProtocol } from '@trezor/protocol';
import { DeviceCommands } from './DeviceCommands';
import { DeviceCommands, PassphrasePromptResponse } from './DeviceCommands';
import { PROTO, ERRORS, NETWORK } from '../constants';
import { DEVICE, DeviceButtonRequestPayload, UI } from '../events';
import { getAllNetworks } from '../data/coinInfo';
Expand Down Expand Up @@ -67,7 +67,10 @@ export interface DeviceEvents {
b: PROTO.WordRequestType,
callback: (err: any, word: string) => void,
) => void;
[DEVICE.PASSPHRASE]: (device: Device, callback: (response: any) => void) => void;
[DEVICE.PASSPHRASE]: (
device: Device,
callback: (response: PassphrasePromptResponse) => void,
) => void;
[DEVICE.PASSPHRASE_ON_DEVICE]: () => void;
[DEVICE.BUTTON]: (device: Device, payload: DeviceButtonRequestPayload) => void;
[DEVICE.ACQUIRED]: () => void;
Expand Down

0 comments on commit 9a95962

Please sign in to comment.