Skip to content

Commit 7aee973

Browse files
authored
Merge branch 'main' into deps-metamask-utils-8
2 parents 1b63bfa + 978ffa1 commit 7aee973

File tree

37 files changed

+252
-119
lines changed

37 files changed

+252
-119
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"rimraf": "^3.0.2",
6464
"simple-git-hooks": "^2.8.0",
6565
"ts-node": "^10.9.1",
66-
"typescript": "~4.6.3",
66+
"typescript": "~4.8.4",
6767
"which": "^3.0.0"
6868
},
6969
"packageManager": "[email protected]",

packages/accounts-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"ts-jest": "^27.1.4",
5151
"typedoc": "^0.23.15",
5252
"typedoc-plugin-missing-exports": "^0.23.0",
53-
"typescript": "~4.6.3"
53+
"typescript": "~4.8.4"
5454
},
5555
"peerDependencies": {
5656
"@metamask/keyring-controller": "^8.0.0"

packages/accounts-controller/src/AccountsController.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,10 @@ export class AccountsController extends BaseControllerV2<
252252
currentState.internalAccounts.selectedAccount = account.id;
253253
});
254254

255-
this.messagingSystem.publish(`${this.name}:selectedAccountChange`, account);
255+
this.messagingSystem.publish(
256+
'AccountsController:selectedAccountChange',
257+
account,
258+
);
256259
}
257260

258261
/**

packages/address-book-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"ts-jest": "^27.1.4",
4141
"typedoc": "^0.23.15",
4242
"typedoc-plugin-missing-exports": "^0.23.0",
43-
"typescript": "~4.6.3"
43+
"typescript": "~4.8.4"
4444
},
4545
"engines": {
4646
"node": ">=16.0.0"

packages/announcement-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"ts-jest": "^27.1.4",
4040
"typedoc": "^0.23.15",
4141
"typedoc-plugin-missing-exports": "^0.23.0",
42-
"typescript": "~4.6.3"
42+
"typescript": "~4.8.4"
4343
},
4444
"engines": {
4545
"node": ">=16.0.0"

packages/approval-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"ts-jest": "^27.1.4",
4444
"typedoc": "^0.23.15",
4545
"typedoc-plugin-missing-exports": "^0.23.0",
46-
"typescript": "~4.6.3"
46+
"typescript": "~4.8.4"
4747
},
4848
"engines": {
4949
"node": ">=16.0.0"

packages/approval-controller/src/ApprovalController.test.ts

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,8 @@ describe('approval controller', () => {
462462

463463
describe('get', () => {
464464
it('gets entry', () => {
465+
// We only want to test the stored entity in the controller state hence disabling floating promises here.
466+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
465467
approvalController.add({
466468
id: 'foo',
467469
origin: 'bar.baz',
@@ -481,7 +483,13 @@ describe('approval controller', () => {
481483
});
482484

483485
it('returns undefined for non-existing entry', () => {
484-
approvalController.add({ id: 'foo', origin: 'bar.baz', type: 'type' });
486+
// We only want to test the stored entity in the controller state hence disabling floating promises here.
487+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
488+
approvalController.add({
489+
id: 'foo',
490+
origin: 'bar.baz',
491+
type: 'type',
492+
});
485493

486494
expect(approvalController.get('fizz')).toBeUndefined();
487495

@@ -495,8 +503,9 @@ describe('approval controller', () => {
495503
let addWithCatch: (args: any) => void;
496504

497505
beforeEach(() => {
498-
addWithCatch = (args: any) =>
506+
addWithCatch = (args: any) => {
499507
approvalController.add(args).catch(() => undefined);
508+
};
500509
});
501510

502511
it('validates input', () => {
@@ -627,8 +636,9 @@ describe('approval controller', () => {
627636
it('gets the total approval count', () => {
628637
expect(approvalController.getTotalApprovalCount()).toBe(0);
629638

630-
const addWithCatch = (args: any) =>
639+
const addWithCatch = (args: any) => {
631640
approvalController.add(args).catch(() => undefined);
641+
};
632642

633643
addWithCatch({ id: '1', origin: 'origin1', type: 'type0' });
634644
expect(approvalController.getTotalApprovalCount()).toBe(1);
@@ -654,8 +664,9 @@ describe('approval controller', () => {
654664
});
655665
expect(approvalController.getTotalApprovalCount()).toBe(0);
656666

657-
const addWithCatch = (args: any) =>
667+
const addWithCatch = (args: any) => {
658668
approvalController.add(args).catch(() => undefined);
669+
};
659670

660671
addWithCatch({ id: '1', origin: 'origin1', type: 'type0' });
661672
expect(approvalController.getTotalApprovalCount()).toBe(1);
@@ -698,8 +709,14 @@ describe('approval controller', () => {
698709
).toThrow(getInvalidHasTypeError());
699710
});
700711

701-
it('returns true for existing entry by id', () => {
702-
approvalController.add({ id: 'foo', origin: 'bar.baz', type: TYPE });
712+
it('returns true for existing entry by id', async () => {
713+
// We only want to check the stored entity is exist in the state hence disabling floating promises here.
714+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
715+
approvalController.add({
716+
id: 'foo',
717+
origin: 'bar.baz',
718+
type: TYPE,
719+
});
703720

704721
expect(approvalController.has({ id: 'foo' })).toBe(true);
705722
});

packages/assets-controllers/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@metamask/metamask-eth-abis": "3.0.0",
4242
"@metamask/network-controller": "^13.0.0",
4343
"@metamask/preferences-controller": "^4.4.1",
44-
"@metamask/rpc-errors": "^5.1.1",
44+
"@metamask/rpc-errors": "^6.0.0",
4545
"@metamask/utils": "^8.1.0",
4646
"@types/uuid": "^8.3.0",
4747
"async-mutex": "^0.2.6",
@@ -64,7 +64,7 @@
6464
"ts-jest": "^27.1.4",
6565
"typedoc": "^0.23.15",
6666
"typedoc-plugin-missing-exports": "^0.23.0",
67-
"typescript": "~4.6.3"
67+
"typescript": "~4.8.4"
6868
},
6969
"peerDependencies": {
7070
"@metamask/approval-controller": "^3.5.1",

packages/base-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"ts-jest": "^27.1.4",
4242
"typedoc": "^0.23.15",
4343
"typedoc-plugin-missing-exports": "^0.23.0",
44-
"typescript": "~4.6.3"
44+
"typescript": "~4.8.4"
4545
},
4646
"engines": {
4747
"node": ">=16.0.0"

packages/composable-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"ts-jest": "^27.1.4",
4141
"typedoc": "^0.23.15",
4242
"typedoc-plugin-missing-exports": "^0.23.0",
43-
"typescript": "~4.6.3"
43+
"typescript": "~4.8.4"
4444
},
4545
"engines": {
4646
"node": ">=16.0.0"

0 commit comments

Comments
 (0)