Skip to content

Commit

Permalink
chore: merge 41.0.0 and update for version
Browse files Browse the repository at this point in the history
  • Loading branch information
nickewansmith committed Oct 31, 2024
1 parent 3174da0 commit 4d90470
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions packages/assets-controllers/src/AssetsContractController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,8 @@ export class AssetsContractController {
address: string,
networkClientId?: NetworkClientId,
): Promise<StakedBalance> {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4d90470

Please sign in to comment.