diff --git a/packages/connect-explorer/src/actions/trezorConnectActions.ts b/packages/connect-explorer/src/actions/trezorConnectActions.ts index c8ba3c357cd..1970493b42d 100644 --- a/packages/connect-explorer/src/actions/trezorConnectActions.ts +++ b/packages/connect-explorer/src/actions/trezorConnectActions.ts @@ -204,7 +204,7 @@ export const init = export const onSubmitInit = () => async (dispatch: Dispatch, getState: GetState) => { const { connect } = getState(); // Disposing TrezorConnect to init it again. - await TrezorConnect.dispose(); + TrezorConnect.dispose(); await TrezorConnectMobile.dispose(); return dispatch(init(connect.options)); diff --git a/packages/connect/e2e/tests/device/authenticateDevice.test.ts b/packages/connect/e2e/tests/device/authenticateDevice.test.ts index 8bc7c083ed0..919f56ef520 100644 --- a/packages/connect/e2e/tests/device/authenticateDevice.test.ts +++ b/packages/connect/e2e/tests/device/authenticateDevice.test.ts @@ -13,9 +13,9 @@ describe('TrezorConnect.authenticateDevice', () => { await initTrezorConnect(controller); }); - afterAll(async () => { + afterAll(() => { controller.dispose(); - await TrezorConnect.dispose(); + TrezorConnect.dispose(); }); // NOTE: emulator uses different provisioning keys than production FW (different than ./data/deviceAuthenticityConfig) diff --git a/packages/connect/e2e/tests/device/authorizeCoinjoin.test.ts b/packages/connect/e2e/tests/device/authorizeCoinjoin.test.ts index 32485a4fde6..28ce206111e 100644 --- a/packages/connect/e2e/tests/device/authorizeCoinjoin.test.ts +++ b/packages/connect/e2e/tests/device/authorizeCoinjoin.test.ts @@ -16,7 +16,7 @@ describe('TrezorConnect.authorizeCoinjoin', () => { beforeEach(async () => { // restart connect for each test (working with event listeners) - await TrezorConnect.dispose(); + TrezorConnect.dispose(); await initTrezorConnect(controller, { debug: false }); @@ -27,9 +27,9 @@ describe('TrezorConnect.authorizeCoinjoin', () => { }); }); - afterAll(async () => { + afterAll(() => { controller.dispose(); - await TrezorConnect.dispose(); + TrezorConnect.dispose(); }); conditionalTest(['1', '<2.5.4'], 'Coinjoin success', async () => { diff --git a/packages/connect/e2e/tests/device/cancel.test.ts b/packages/connect/e2e/tests/device/cancel.test.ts index cc7dc7d329f..869404c5138 100644 --- a/packages/connect/e2e/tests/device/cancel.test.ts +++ b/packages/connect/e2e/tests/device/cancel.test.ts @@ -61,13 +61,13 @@ describe('TrezorConnect.cancel', () => { await controller.connect(); }); - afterAll(async () => { - await TrezorConnect.dispose(); + afterAll(() => { + TrezorConnect.dispose(); controller.dispose(); }); afterEach(async () => { - await TrezorConnect.dispose(); + TrezorConnect.dispose(); await controller.stopEmu(); await controller.stopBridge(); }); diff --git a/packages/connect/e2e/tests/device/cancelCoinjoinAuthorization.test.ts b/packages/connect/e2e/tests/device/cancelCoinjoinAuthorization.test.ts index 6f1e2d3114f..9f47ed26eee 100644 --- a/packages/connect/e2e/tests/device/cancelCoinjoinAuthorization.test.ts +++ b/packages/connect/e2e/tests/device/cancelCoinjoinAuthorization.test.ts @@ -12,13 +12,13 @@ describe('TrezorConnect.cancelCoinjoinAuthorization', () => { beforeEach(async () => { // restart connect for each test (working with event listeners) - await TrezorConnect.dispose(); + TrezorConnect.dispose(); await initTrezorConnect(controller, { debug: false }); }); - afterAll(async () => { + afterAll(() => { controller.dispose(); - await TrezorConnect.dispose(); + TrezorConnect.dispose(); }); conditionalTest(['1', '<2.5.4'], 'Cancel authorization works', async () => { diff --git a/packages/connect/e2e/tests/device/info.test.ts b/packages/connect/e2e/tests/device/info.test.ts index 4f68d1a6376..14a13667f30 100644 --- a/packages/connect/e2e/tests/device/info.test.ts +++ b/packages/connect/e2e/tests/device/info.test.ts @@ -3,13 +3,13 @@ import { getController, initTrezorConnect } from '../../common.setup'; describe('__info common param', () => { beforeAll(async () => { - await TrezorConnect.dispose(); + TrezorConnect.dispose(); await initTrezorConnect(getController()); }); - afterAll(async () => { - await TrezorConnect.dispose(); + afterAll(() => { + TrezorConnect.dispose(); }); it('common param __info - only method info is returned', async () => { diff --git a/packages/connect/e2e/tests/device/keepSession.test.ts b/packages/connect/e2e/tests/device/keepSession.test.ts index a6c6f20e644..cebc2b45d0b 100644 --- a/packages/connect/e2e/tests/device/keepSession.test.ts +++ b/packages/connect/e2e/tests/device/keepSession.test.ts @@ -5,7 +5,7 @@ const controller = getController(); describe('keepSession common param', () => { beforeAll(async () => { - await TrezorConnect.dispose(); + TrezorConnect.dispose(); await setup(controller, { mnemonic: 'mnemonic_all', passphrase_protection: true, @@ -13,9 +13,9 @@ describe('keepSession common param', () => { await initTrezorConnect(controller); }); - afterAll(async () => { + afterAll(() => { controller.dispose(); - await TrezorConnect.dispose(); + TrezorConnect.dispose(); }); conditionalTest(['1', '<2.3.2'], 'keepSession with changing useCardanoDerivation', async () => { diff --git a/packages/connect/e2e/tests/device/methods.test.ts b/packages/connect/e2e/tests/device/methods.test.ts index f03352a8b21..6cb2504aa78 100644 --- a/packages/connect/e2e/tests/device/methods.test.ts +++ b/packages/connect/e2e/tests/device/methods.test.ts @@ -74,7 +74,7 @@ describe(`TrezorConnect methods`, () => { getFixtures().forEach((testCase: TestCase) => { describe(`TrezorConnect.${testCase.method}`, () => { beforeAll(async () => { - await TrezorConnect.dispose(); + TrezorConnect.dispose(); try { if (!controller) { diff --git a/packages/connect/e2e/tests/device/override.test.ts b/packages/connect/e2e/tests/device/override.test.ts index 1e21737c221..b682d63f821 100644 --- a/packages/connect/e2e/tests/device/override.test.ts +++ b/packages/connect/e2e/tests/device/override.test.ts @@ -11,9 +11,9 @@ describe('TrezorConnect override param', () => { await initTrezorConnect(controller); }); - afterAll(async () => { + afterAll(() => { controller.dispose(); - await TrezorConnect.dispose(); + TrezorConnect.dispose(); }); [1, 10, 100, 300, 500, 1000, 1500].forEach(delay => { diff --git a/packages/connect/e2e/tests/device/passphrase.test.ts b/packages/connect/e2e/tests/device/passphrase.test.ts index 02a0786bf32..4729f42e90d 100644 --- a/packages/connect/e2e/tests/device/passphrase.test.ts +++ b/packages/connect/e2e/tests/device/passphrase.test.ts @@ -24,9 +24,9 @@ describe('TrezorConnect passphrase', () => { await initTrezorConnect(controller, { debug: false }); }); - afterAll(async () => { + afterAll(() => { controller.dispose(); - await TrezorConnect.dispose(); + TrezorConnect.dispose(); }); it('Using multiple passphrases at the same time', async () => { diff --git a/packages/connect/e2e/tests/device/setBusy.test.ts b/packages/connect/e2e/tests/device/setBusy.test.ts index 0dc2f69077f..127823d0841 100644 --- a/packages/connect/e2e/tests/device/setBusy.test.ts +++ b/packages/connect/e2e/tests/device/setBusy.test.ts @@ -15,9 +15,9 @@ describe('TrezorConnect.setBusy', () => { await initTrezorConnect(controller); }); - afterAll(async () => { + afterAll(() => { controller.dispose(); - await TrezorConnect.dispose(); + TrezorConnect.dispose(); }); conditionalTest(['1', '<2.5.3'], 'setBusy timeout', async () => { diff --git a/packages/connect/e2e/tests/device/unlockPath.test.ts b/packages/connect/e2e/tests/device/unlockPath.test.ts index 4a7506401b7..9ac91203bb9 100644 --- a/packages/connect/e2e/tests/device/unlockPath.test.ts +++ b/packages/connect/e2e/tests/device/unlockPath.test.ts @@ -11,9 +11,9 @@ describe('TrezorConnect.unlockPath', () => { await initTrezorConnect(controller); }); - afterAll(async () => { + afterAll(() => { controller.dispose(); - await TrezorConnect.dispose(); + TrezorConnect.dispose(); }); conditionalTest(['1', '<2.5.3'], 'Unlock SLIP-25 + getAddress', async () => { diff --git a/packages/suite/src/hooks/wallet/__tests__/useRbfForm.test.tsx b/packages/suite/src/hooks/wallet/__tests__/useRbfForm.test.tsx index 9a30f66be8e..657595f8bb9 100644 --- a/packages/suite/src/hooks/wallet/__tests__/useRbfForm.test.tsx +++ b/packages/suite/src/hooks/wallet/__tests__/useRbfForm.test.tsx @@ -119,8 +119,8 @@ describe('useRbfForm hook', () => { }); jest.spyOn(window, 'scrollTo').mockImplementation(() => {}); }); - afterAll(async () => { - await TrezorConnect.dispose(); + afterAll(() => { + TrezorConnect.dispose(); }); afterEach(() => { jest.clearAllMocks();