Skip to content

Commit

Permalink
86du95ng8 - NEON3 - MAC - Onboarding - Application locked for 30 seco…
Browse files Browse the repository at this point in the history
…nds before showing onboarding
  • Loading branch information
ricardoak25 committed Aug 2, 2024
1 parent 7bc90a4 commit 14e15be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ export function registerLedgerHandler() {
return transporters.map(({ address, publicKey, blockchain }) => ({ address, publicKey, blockchain }))
})

mainApi.listenSync('startLedger', () => {
mainApi.listenAsync('startLedger', () => {
if (started) return
started = true

NodeHidTransportFixed.listen({
complete: () => {},
error: () => {},
complete: () => { },
error: () => { },
next: async event => {
if (event.type === 'add') {
const transport = await NodeHidTransportFixed.open(event.descriptor)
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/hooks/useBeforeLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const useRegisterLedgerListeners = () => {
ToastHelper.dismiss('ledger-request-permission')
})

window.api.sendSync('startLedger')
window.api.sendAsync('startLedger')

return () => {
removeLedgerConnectedListener()
Expand Down
2 changes: 1 addition & 1 deletion src/shared/@types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { TGetStoreFromWCSession, TIpcMainAsyncListener, TIpcMainSyncListener, TL
export type TMainApiListenersSync = {
restore: TIpcMainSyncListener<undefined, void>
sendStoreFromWC: TIpcMainSyncListener<TGetStoreFromWCSession>
startLedger: TIpcMainSyncListener<undefined, void>
encryptBasedEncryptedSecretSync: TIpcMainSyncListener<{ value: string; encryptedSecret?: string }, string>
decryptBasedEncryptedSecretSync: TIpcMainSyncListener<{ value: string; encryptedSecret?: string }, string>
}
Expand All @@ -17,6 +16,7 @@ export type TMainApiListenersAsync = {
saveFile: TIpcMainAsyncListener<{ path: string; content: string }, void>
setTitleBarOverlay: TIpcMainAsyncListener<Electron.TitleBarOverlay, void>
setWindowButtonPosition: TIpcMainAsyncListener<Electron.Point, void>
startLedger: TIpcMainAsyncListener<undefined, void>
checkForUpdates: TIpcMainAsyncListener<undefined, void>
quitAndInstall: TIpcMainAsyncListener<undefined, void>
getConnectedLedgers: TIpcMainAsyncListener<undefined, TLedgerInfo[]>
Expand Down

0 comments on commit 14e15be

Please sign in to comment.