Skip to content

Commit cc8ab93

Browse files
committed
chore: make networkClientId mandatory field in assetsContractController
1 parent d913b90 commit cc8ab93

6 files changed

+141
-188
lines changed

eslint-warning-thresholds.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"jsdoc/check-tag-names": 5
2222
},
2323
"packages/assets-controllers/src/AssetsContractController.test.ts": {
24-
"import-x/order": 3
24+
"import-x/order": 2
2525
},
2626
"packages/assets-controllers/src/AssetsContractController.ts": {
2727
"jsdoc/check-tag-names": 2,

packages/assets-controllers/src/AccountTrackerController.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -672,10 +672,10 @@ describe('AccountTrackerController', () => {
672672
mockedQuery
673673
.mockReturnValueOnce(Promise.resolve('0x10'))
674674
.mockReturnValueOnce(Promise.resolve('0x20'));
675-
const result = await controller.syncBalanceWithAddresses([
676-
ADDRESS_1,
677-
ADDRESS_2,
678-
]);
675+
const result = await controller.syncBalanceWithAddresses(
676+
[ADDRESS_1, ADDRESS_2],
677+
'mainnet',
678+
);
679679
expect(result[ADDRESS_1].balance).toBe('0x10');
680680
expect(result[ADDRESS_2].balance).toBe('0x20');
681681
},
@@ -697,10 +697,10 @@ describe('AccountTrackerController', () => {
697697
mockedQuery
698698
.mockReturnValueOnce(Promise.resolve('0x10'))
699699
.mockReturnValueOnce(Promise.resolve('0x20'));
700-
const result = await controller.syncBalanceWithAddresses([
701-
ADDRESS_1,
702-
ADDRESS_2,
703-
]);
700+
const result = await controller.syncBalanceWithAddresses(
701+
[ADDRESS_1, ADDRESS_2],
702+
'mainnet',
703+
);
704704
expect(result[ADDRESS_1].balance).toBe('0x10');
705705
expect(result[ADDRESS_2].balance).toBe('0x20');
706706
expect(result[ADDRESS_1].stakedBalance).toBe('0x1');

packages/assets-controllers/src/AccountTrackerController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,12 +429,12 @@ export class AccountTrackerController extends StaticIntervalPollingController<Ac
429429
* Sync accounts balances with some additional addresses.
430430
*
431431
* @param addresses - the additional addresses, may be hardware wallet addresses.
432-
* @param networkClientId - Optional networkClientId to fetch a network client with.
432+
* @param networkClientId - networkClientId to fetch a network client with.
433433
* @returns accounts - addresses with synced balance
434434
*/
435435
async syncBalanceWithAddresses(
436436
addresses: string[],
437-
networkClientId?: NetworkClientId,
437+
networkClientId: NetworkClientId,
438438
): Promise<
439439
Record<string, { balance: string; stakedBalance?: StakedBalance }>
440440
> {

0 commit comments

Comments
 (0)