Skip to content

Commit

Permalink
chore(deps): bump @metamask/network-controller from 1.0.0 to 2.0.0 (#113
Browse files Browse the repository at this point in the history
)

* chore(deps): bump @metamask/network-controller from 1.0.0 to 2.0.0

Bumps [@metamask/network-controller](https://github.com/MetaMask/controllers) from 1.0.0 to 2.0.0.
- [Release notes](https://github.com/MetaMask/controllers/releases)
- [Changelog](https://github.com/MetaMask/controllers/blob/main/CHANGELOG.old.md)
- [Commits](https://github.com/MetaMask/controllers/compare/@metamask/[email protected]...@metamask/[email protected])

---
updated-dependencies:
- dependency-name: "@metamask/network-controller"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* adapt breaking changes

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex <[email protected]>
  • Loading branch information
dependabot[bot] and adonesky1 authored Jan 10, 2023
1 parent 60e771a commit 4fc195b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@ethersproject/providers": "^5.7.0",
"@metamask/base-controller": "^1.0.0",
"@metamask/controller-utils": "^1.0.0",
"@metamask/network-controller": "^1.0.0",
"@metamask/network-controller": "^2.0.0",
"@types/lodash": "^4.14.176",
"bignumber.js": "^9.0.1",
"fast-json-patch": "^3.1.0",
Expand Down
6 changes: 3 additions & 3 deletions src/SmartTransactionsController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,13 @@ describe('SmartTransactionsController', () => {

describe('onNetworkChange', () => {
it('is triggered', () => {
networkListener({ provider: { chainId: '52' } } as NetworkState);
networkListener({ providerConfig: { chainId: '52' } } as NetworkState);
expect(smartTransactionsController.config.chainId).toBe('52');
});

it('calls poll', () => {
const checkPollSpy = jest.spyOn(smartTransactionsController, 'checkPoll');
networkListener({ provider: { chainId: '2' } } as NetworkState);
networkListener({ providerConfig: { chainId: '2' } } as NetworkState);
expect(checkPollSpy).toHaveBeenCalled();
});
});
Expand Down Expand Up @@ -355,7 +355,7 @@ describe('SmartTransactionsController', () => {
'updateSmartTransactions',
);
expect(updateSmartTransactionsSpy).not.toHaveBeenCalled();
networkListener({ provider: { chainId: '56' } } as NetworkState);
networkListener({ providerConfig: { chainId: '56' } } as NetworkState);
expect(updateSmartTransactionsSpy).not.toHaveBeenCalled();
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/SmartTransactionsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default class SmartTransactionsController extends BaseController<
this.initialize();
this.initializeSmartTransactionsForChainId();

onNetworkStateChange(({ provider: newProvider }) => {
onNetworkStateChange(({ providerConfig: newProvider }) => {
const { chainId } = newProvider;
this.configure({ chainId });
this.initializeSmartTransactionsForChainId();
Expand Down
24 changes: 8 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -831,23 +831,15 @@
semver "^7.3.5"
yargs "^17.0.1"

"@metamask/base-controller@^1.0.0":
"@metamask/base-controller@^1.0.0", "@metamask/base-controller@^1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@metamask/base-controller/-/base-controller-1.1.1.tgz#34c2db471328b92a3a46f9c2547bbb9d37803258"
integrity sha512-erDfd+OcHnixSZObPNHuDn2G3rRT2B9J/JaOmjjQN64o9RqDYid87Zb0z03wK8cbJ/pEHhhDIBn6t2gMWcdwrQ==
dependencies:
"@metamask/controller-utils" "^1.0.0"
immer "^9.0.6"

"@metamask/base-controller@~1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@metamask/base-controller/-/base-controller-1.0.0.tgz#9de86efafdf88b46f6d3710f8708a9515fd8ecf6"
integrity sha512-bZnv/P3Zb247vVS4HT3lvlNdi0JNT5mt3dWBtWj6c9C/AVR9LDeTUz7nIPxzvm9lwDZktYgp+GXDDr/LfDKkAQ==
dependencies:
"@metamask/controller-utils" "~1.0.0"
immer "^9.0.6"

"@metamask/controller-utils@^1.0.0", "@metamask/controller-utils@~1.0.0":
"@metamask/controller-utils@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@metamask/controller-utils/-/controller-utils-1.0.0.tgz#2e2261b65c3f38ba0c5b893743fca8cce764339c"
integrity sha512-LXIpnmF/C5/vCBX0u2DiUWA55utZy54guUV+A8qUYmz8PvZrXfK7mdq1zlk8z0aq+aO0rHHfSVbTNacEE3TlAQ==
Expand Down Expand Up @@ -879,13 +871,13 @@
resolved "https://registry.yarnpkg.com/@metamask/eslint-config/-/eslint-config-8.0.0.tgz#f4e3bcd6b37ec135b5a72902b0526cba2a6b5a4d"
integrity sha512-ZO9B3ohNhjomrufNAkxnDXV46Kut7NKzri7itDxUzHJncNtI1of7ewWh6fKPl/hr6Al6Gd7WgjPdJZGFpzKPQw==

"@metamask/network-controller@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@metamask/network-controller/-/network-controller-1.0.0.tgz#35180bdc56c918719eaa1e00455faa55ecf87824"
integrity sha512-i/7IMqFqbnfZZY8jVs/ptG0aaU8Po01/7kQ5aZgWR+sk7FxdOzs6rYD78qm5f6bU2PNBDSTN3TyN29n50ksmIA==
"@metamask/network-controller@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@metamask/network-controller/-/network-controller-2.0.0.tgz#ccc90b42c298e93ef42995e16b3e0d5858cffdeb"
integrity sha512-R5fWgDpitCJqyqXEno1d9fl4CpxQZdATORxk+VBoQk88IfmMqKRY/4fPlD3VP9uZl+UnHVqKCZfJEbski3VuMw==
dependencies:
"@metamask/base-controller" "~1.0.0"
"@metamask/controller-utils" "~1.0.0"
"@metamask/base-controller" "^1.1.1"
"@metamask/controller-utils" "^1.0.0"
async-mutex "^0.2.6"
babel-runtime "^6.26.0"
eth-json-rpc-infura "^5.1.0"
Expand Down

0 comments on commit 4fc195b

Please sign in to comment.