Skip to content

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Jun 9, 2022

Bumps @metamask/controllers from 26.0.0 to 30.0.0.

Release notes

Sourced from @​metamask/controllers's releases.

30.0.0

Added

  • BREAKING: Introduce getNetworkState, getPreferencesState, and onTokenListStateChange to the TokenDetectionController constructor options object (#808)
    • getPreferencesState provides the default value for useTokenDetection from the PreferencesController state.
    • getNetworkState provides the default value for chainId from the NetworkController state.
    • onTokenListStateChange listener triggers a detect action whenever the TokenListController finishes fetching a token list.
  • BREAKING: Update AssetsContractController to keep track of the current network (accessible via config.chainId) as well as whether the network supports token detection (#809)
    • Consumers will need to pass listener method onNetworkStateChange in AssetsContractController constructor options object. This method should be called with network/provider details when network changes occur.
  • Add onCollectibleAdded event handler to the CollectiblesController constructor (#814)
    • This event handler was added to allow us to capture metrics.

Changed

  • BREAKING: Rename addTokens on the TokenDetectionController constructor options object to addDetectedTokens (#808)
    • We are no longer automatically adding detected tokens to the wallet. This will provide users with the ability to manually import or ignore detected tokens.
  • BREAKING: Rename useStaticTokenList to useTokenDetection on the PreferencesController constructor options object and set the value to be true by default (#808)
    • Token detection will now be enabled by default.
  • BREAKING: Append phishfort blocklist to list used by PhishingController (#715)
    • The test method on PhishingController no longer returns a boolean, it now returns an object matching the EthPhishingDetectResult interface (defined in PhishingController.ts).
    • Designs may need to be updated to account for the fact that sites may now be blocked by Phishfort. We should ensure users are not directed to the eth-phishing-detect repository to dispute Phishfort blocks, because we will not be able to help them.
  • BREAKING: Rename convertPriceToDecimal function name to convertHexToDecimal (#808)
  • Rename fetchFromDynamicTokenList to fetchTokenList (#806)
    • No need to mention dynamic in the naming since there is only one way to fetch the token list.
  • Update fetchFromCache in TokenListController to return TokenListMap | null instead of TokenListToken[] | null (#806)
    • This allows us to remove some unnecessary mapping when working with cached tokens and token list.
  • Update TokenListToken in TokenListController to include aggregators property (#806)
    • This allows us to show the aggregator names for a token.
  • Update TokensController to support detected tokens (#808)
    • Introduce detectedTokens to the config object to track detected tokens, which is updated by calling addDetectedTokens whenever TokenDetectionController detects new tokens.
    • Added fetchTokenMetadata private method to fetch token metadata whenever adding individual tokens. This is currently used to populate aggregator information.
  • Append detectedTokens to both TokenBalancesController & TokenRatesController tokens config object within their onTokensStateChange listener methods (#808)
    • This change ensures that we are populating both balances and rates for detected tokens.
  • Update CollectibleDetectionController to place a proxy API (provided by Codefi) in front of OpenSea requests (#805)
    • All NFT related queries that were routed to OpenSea will now first route to a proxy server owened by Codefi. If this first request fails, and an OpenSea API key has been set, the query will re-route to OpenSea as a fallback.
  • Update CurrencyRateController to use ETH exchange rate for preloaded testnets native currency (Rinkeby, Ropsten, Goerli, Kovan) (#816)
  • Update ERC721Standard to query for name and symbol values on ERC721 contracts even when the contract does not support the metadata interface (#834)
  • Increase polling interval for TokenListController and require minimum of 3 occurrences across our aggregated public token lists for use in the dynamic token list (#836)

Removed

  • BREAKING: Remove removeAndIgnoreToken from TokensController (#808)
    • The logic for removing token(s) is now consolidated in a new method named ignoredTokens. Consumers will need to update instances of removeAndIgnoreToken to use ignoredTokens instead.
  • BREAKING: Remove onTokensStateChange from the TokenDetectionController constructor options object (#808)
    • This was previously used to update the tokens property in the controller's configuration object. This is not needed since those tokens are managed by the TokensController.
  • BREAKING: Remove useStaticTokenList and onPreferencesStateChange from TokenListController constructor options object (#806)
    • useStaticTokenList was previously used to determined if this controller fetched against a static vs dynamic token list and onPreferencesStateChange was used to update useStaticTokenList.
    • The controller now always fetches from a dynamic token list.
  • BREAKING: Remove snap-specific network-access endowment (#820)
    • Consumers who still require this endowment should import from @metamask/snap-controllers minimum version 0.13.0.

Fixed

  • Update AssetsContractController to fix issues parsing non-standard ERC-20 responses (#830)

... (truncated)

Changelog

Sourced from @​metamask/controllers's changelog.

[30.0.0]

Added

  • BREAKING: Introduce getNetworkState, getPreferencesState, and onTokenListStateChange to the TokenDetectionController constructor options object (#808)
    • getPreferencesState provides the default value for useTokenDetection from the PreferencesController state.
    • getNetworkState provides the default value for chainId from the NetworkController state.
    • onTokenListStateChange listener triggers a detect action whenever the TokenListController finishes fetching a token list.
  • BREAKING: Update AssetsContractController to keep track of the current network (accessible via config.chainId) as well as whether the network supports token detection (#809)
    • Consumers will need to pass listener method onNetworkStateChange in AssetsContractController constructor options object. This method should be called with network/provider details when network changes occur.
  • Add onCollectibleAdded event handler to the CollectiblesController constructor (#814)
    • This event handler was added to allow us to capture metrics.

Changed

  • BREAKING: Rename addTokens on the TokenDetectionController constructor options object to addDetectedTokens (#808)
    • We are no longer automatically adding detected tokens to the wallet. This will provide users with the ability to manually import or ignore detected tokens.
  • BREAKING: Rename useStaticTokenList to useTokenDetection on the PreferencesController constructor options object and set the value to be true by default (#808)
    • Token detection will now be enabled by default.
  • BREAKING: Append phishfort blocklist to list used by PhishingController (#715)
    • The test method on PhishingController no longer returns a boolean, it now returns an object matching the EthPhishingDetectResult interface (defined in PhishingController.ts).
    • Designs may need to be updated to account for the fact that sites may now be blocked by Phishfort. We should ensure users are not directed to the eth-phishing-detect repository to dispute Phishfort blocks, because we will not be able to help them.
  • BREAKING: Rename convertPriceToDecimal function name to convertHexToDecimal (#808)
  • Rename fetchFromDynamicTokenList to fetchTokenList (#806)
    • No need to mention dynamic in the naming since there is only one way to fetch the token list.
  • Update fetchFromCache in TokenListController to return TokenListMap | null instead of TokenListToken[] | null (#806)
    • This allows us to remove some unnecessary mapping when working with cached tokens and token list.
  • Update TokenListToken in TokenListController to include aggregators property (#806)
    • This allows us to show the aggregator names for a token.
  • Update TokensController to support detected tokens (#808)
    • Introduce detectedTokens to the config object to track detected tokens, which is updated by calling addDetectedTokens whenever TokenDetectionController detects new tokens.
    • Added fetchTokenMetadata private method to fetch token metadata whenever adding individual tokens. This is currently used to populate aggregator information.
  • Append detectedTokens to both TokenBalancesController & TokenRatesController tokens config object within their onTokensStateChange listener methods (#808)
    • This change ensures that we are populating both balances and rates for detected tokens.
  • Update CollectibleDetectionController to place a proxy API (provided by Codefi) in front of OpenSea requests (#805)
    • All NFT related queries that were routed to OpenSea will now first route to a proxy server owened by Codefi. If this first request fails, and an OpenSea API key has been set, the query will re-route to OpenSea as a fallback.
  • Update CurrencyRateController to use ETH exchange rate for preloaded testnets native currency (Rinkeby, Ropsten, Goerli, Kovan) (#816)
  • Update ERC721Standard to query for name and symbol values on ERC721 contracts even when the contract does not support the metadata interface (#834)
  • Increase polling interval for TokenListController and require minimum of 3 occurrences across our aggregated public token lists for use in the dynamic token list (#836)

Removed

  • BREAKING: Remove removeAndIgnoreToken from TokensController (#808)
    • The logic for removing token(s) is now consolidated in a new method named ignoredTokens. Consumers will need to update instances of removeAndIgnoreToken to use ignoredTokens instead.
  • BREAKING: Remove onTokensStateChange from the TokenDetectionController constructor options object (#808)
    • This was previously used to update the tokens property in the controller's configuration object. This is not needed since those tokens are managed by the TokensController.
  • BREAKING: Remove useStaticTokenList and onPreferencesStateChange from TokenListController constructor options object (#806)
    • useStaticTokenList was previously used to determined if this controller fetched against a static vs dynamic token list and onPreferencesStateChange was used to update useStaticTokenList.
    • The controller now always fetches from a dynamic token list.
  • BREAKING: Remove snap-specific network-access endowment (#820)
    • Consumers who still require this endowment should import from @metamask/snap-controllers minimum version 0.13.0.

Fixed

  • Update AssetsContractController to fix issues parsing non-standard ERC-20 responses (#830)

... (truncated)

Commits
  • e40fe73 30.0.0 (#848)
  • 2ea1a63 Make onCollectibleAdded parameter optional (#850)
  • bb0019a Refactor CollectibleController tests (#849)
  • 4c1df4f [Token Detection V2] 6 of 7 - Introduce Detected Tokens (#808)
  • 90f2090 BREAKING: Remove snap-specific endowments (#820)
  • bac877b Re-point OS API calls to Codefi proxy (#805)
  • 807ba1f Append phishfort blocklist (#715)
  • 87a0140 Bump @​metamask/contract-metadata from 1.34.0 to 1.35.0 (#839)
  • 5f6bdba Add dry run publish just before actual publish (#842)
  • db34740 [Token Detection V2] Refining the polling interval and the occurrences limit ...
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by metamaskbot, a new releaser for @​metamask/controllers since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@metamask/controllers](https://github.com/MetaMask/controllers) from 26.0.0 to 30.0.0.
- [Release notes](https://github.com/MetaMask/controllers/releases)
- [Changelog](https://github.com/MetaMask/controllers/blob/main/CHANGELOG.md)
- [Commits](MetaMask/core@v26.0.0...v30.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested review from a team and meppsilon as code owners June 9, 2022 06:09
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jun 9, 2022
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Jun 15, 2022

Superseded by #126.

@dependabot dependabot bot closed this Jun 15, 2022
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/main/metamask/controllers-30.0.0 branch June 15, 2022 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant