Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/hardware-trezor/src/TrezorKeyAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,20 @@ export class TrezorKeyAgent extends KeyAgentBase {
// Show Trezor Suite popup. Disabled for node based apps
popup: communicationType !== CommunicationType.Node && !silentMode
});

trezorConnect.on(Trezor.UI_EVENT, (event) => {
// React on ui-request_passphrase event
if (event.type === Trezor.UI.REQUEST_PASSPHRASE && event.payload.device) {
trezorConnect.uiResponse({
payload: {
passphraseOnDevice: true,
save: true,
value: ''
},
type: Trezor.UI.RECEIVE_PASSPHRASE
});
}
});
return true;
} catch (error: any) {
if (error.code === 'Init_AlreadyInitialized') return true;
Expand Down
Loading