Skip to content

Commit d2a61cb

Browse files
author
Marcin Mazurek
committed
[DDW-1102] Add retry to Trezor calls - cleanup
1 parent b6e8033 commit d2a61cb

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

source/main/ipc/getHardwareWalletChannel.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@ class EventObserver {
154154
}
155155
}
156156

157-
const wait = (ms: number): Promise<void> =>
158-
new Promise((resolve) => setTimeout(resolve, ms));
159-
160157
export const handleHardwareWalletRequests = async (
161158
mainWindow: BrowserWindow,
162159
{
@@ -282,13 +279,11 @@ export const handleHardwareWalletRequests = async (
282279
logger.info('[HW-DEBUG] getHardwareWalletTransportChannel', {
283280
devicePath,
284281
});
285-
// Connected Trezor device info
286-
let deviceFeatures: Unsuccessful | Success<Features>;
287282

288283
if (isTrezor) {
289284
logger.info('[HW-DEBUG] getHardwareWalletTransportChannel::TREZOR ');
290285

291-
deviceFeatures = await getTrezorDeviceFeatures();
286+
const deviceFeatures = await getTrezorDeviceFeatures();
292287

293288
try {
294289
logger.info('[TREZOR-CONNECT] Called TrezorConnect.getFeatures()');
@@ -883,13 +878,6 @@ export const handleHardwareWalletRequests = async (
883878

884879
resetTrezorActionChannel.onRequest(async () => {
885880
logger.info('[TREZOR-CONNECT] Called TrezorConnect.cancel()');
886-
887-
try {
888-
TrezorConnect.cancel();
889-
} catch (error) {
890-
logger.warn(
891-
'[TREZOR-CONNECT] Failed to cancel the operation:' + error.error
892-
);
893-
}
881+
TrezorConnect.cancel();
894882
});
895883
};

0 commit comments

Comments
 (0)