From 4d90470907059add287ec60f2d441453ed15b7ad Mon Sep 17 00:00:00 2001 From: Nicholas Smith Date: Thu, 31 Oct 2024 00:49:58 -0500 Subject: [PATCH] chore: merge 41.0.0 and update for version --- .../assets-controllers/src/AssetsContractController.test.ts | 6 +++--- packages/assets-controllers/src/AssetsContractController.ts | 4 ++-- .../src/AssetsContractControllerWithNetworkClientId.test.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/assets-controllers/src/AssetsContractController.test.ts b/packages/assets-controllers/src/AssetsContractController.test.ts index 73ab03a4a11..8df5743c3ef 100644 --- a/packages/assets-controllers/src/AssetsContractController.test.ts +++ b/packages/assets-controllers/src/AssetsContractController.test.ts @@ -1278,7 +1278,7 @@ describe('AssetsContractController', () => { it('should get the staked ethereum balance for an address', async () => { const { assetsContract, messenger, provider, networkClientConfiguration } = await setupAssetContractControllers(); - assetsContract.configure({ provider }); + assetsContract.setProvider(provider); mockNetworkWithDefaultChainId({ networkClientConfiguration, @@ -1340,7 +1340,7 @@ describe('AssetsContractController', () => { const errorSpy = jest.spyOn(console, 'error'); const { assetsContract, messenger, provider, networkClientConfiguration } = await setupAssetContractControllers(); - assetsContract.configure({ provider }); + assetsContract.setProvider(provider); mockNetworkWithDefaultChainId({ networkClientConfiguration, @@ -1387,7 +1387,7 @@ describe('AssetsContractController', () => { }); const { assetsContract, messenger, provider } = await setupAssetContractControllers(); - assetsContract.configure({ provider }); + assetsContract.setProvider(provider); const balance = await assetsContract.getStakedBalanceForChain( TEST_ACCOUNT_PUBLIC_ADDRESS, diff --git a/packages/assets-controllers/src/AssetsContractController.ts b/packages/assets-controllers/src/AssetsContractController.ts index be45ce34012..ed2532c120d 100644 --- a/packages/assets-controllers/src/AssetsContractController.ts +++ b/packages/assets-controllers/src/AssetsContractController.ts @@ -707,8 +707,8 @@ export class AssetsContractController { address: string, networkClientId?: NetworkClientId, ): Promise { - const chainId = this.getChainId(networkClientId); - const provider = this.getProvider(networkClientId); + const chainId = this.#getCorrectChainId(networkClientId); + const provider = this.#getCorrectProvider(networkClientId); // balance defaults to zero let balance: BigNumber = BigNumber.from(0); diff --git a/packages/assets-controllers/src/AssetsContractControllerWithNetworkClientId.test.ts b/packages/assets-controllers/src/AssetsContractControllerWithNetworkClientId.test.ts index 4b40dccb99a..c8395a0d642 100644 --- a/packages/assets-controllers/src/AssetsContractControllerWithNetworkClientId.test.ts +++ b/packages/assets-controllers/src/AssetsContractControllerWithNetworkClientId.test.ts @@ -905,7 +905,7 @@ describe('AssetsContractController with NetworkClientId', () => { it('should get the staked ethereum balance for an address', async () => { const { assetsContract, messenger, provider, networkClientConfiguration } = await setupAssetContractControllers(); - assetsContract.configure({ provider }); + assetsContract.setProvider(provider); mockNetworkWithDefaultChainId({ networkClientConfiguration, @@ -966,7 +966,7 @@ describe('AssetsContractController with NetworkClientId', () => { it('should default staked ethereum balance to undefined if network is not supported', async () => { const { assetsContract, provider } = await setupAssetContractControllers(); - assetsContract.configure({ provider }); + assetsContract.setProvider(provider); const balance = await assetsContract.getStakedBalanceForChain( TEST_ACCOUNT_PUBLIC_ADDRESS,