Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nitpick chore - remove unused await #15505

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions packages/connect/e2e/tests/device/authorizeCoinjoin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand All @@ -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 () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/connect/e2e/tests/device/cancel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/connect/e2e/tests/device/info.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/connect/e2e/tests/device/keepSession.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ const controller = getController();

describe('keepSession common param', () => {
beforeAll(async () => {
await TrezorConnect.dispose();
TrezorConnect.dispose();
await setup(controller, {
mnemonic: 'mnemonic_all',
passphrase_protection: true,
});
await initTrezorConnect(controller);
});

afterAll(async () => {
afterAll(() => {
controller.dispose();
await TrezorConnect.dispose();
TrezorConnect.dispose();
});

conditionalTest(['1', '<2.3.2'], 'keepSession with changing useCardanoDerivation', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/connect/e2e/tests/device/methods.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions packages/connect/e2e/tests/device/override.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
4 changes: 2 additions & 2 deletions packages/connect/e2e/tests/device/passphrase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/connect/e2e/tests/device/setBusy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/connect/e2e/tests/device/unlockPath.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/suite/src/hooks/wallet/__tests__/useRbfForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ describe('useRbfForm hook', () => {
});
jest.spyOn(window, 'scrollTo').mockImplementation(() => {});
});
afterAll(async () => {
await TrezorConnect.dispose();
afterAll(() => {
TrezorConnect.dispose();
});
afterEach(() => {
jest.clearAllMocks();
Expand Down
Loading