This PR makes @purser/metamask compatible with the latest MetaMask Ethereum provider, which was shipped to production everywhere today.
Motivation
In MetaMask 8.0.x, ethereum.publicConfigStore is renamed ethereum._publicConfigStore, to better reflect its intended nature as an implementation detail and private property.
We've never, to my knowledge, publicized this property in our docs, but were made aware of its use in Colony, when a MetaMask user reported that colony.io had stopped working.
The public config store is slated for removal in an upcoming update to MetaMask, and should not be used by provider consumers for any reason. We recommend using the corresponding events detailed in our (new and improved) documentation.
Summary of Changes
Rename every instance of publicConfigStore to _publicConfigStore, where the provider appears to be the MetaMask provider.
This may break your handling of old forks of MetaMask, depending on how you detect them. Detecting the latest MetaMask Ethereum provider can be done via ethereum.isMetaMask && typeof ethereum.request === 'function'.
On review, publicConfigStore should only be accessed for legacy versions of the MetaMask provider (outdated forks), so the variable name should never be a problem.
This PR makes
@purser/metamask
compatible with the latest MetaMask Ethereum provider, which was shipped to production everywhere today.Motivation
In MetaMask 8.0.x,
ethereum.publicConfigStore
is renamedethereum._publicConfigStore
, to better reflect its intended nature as an implementation detail and private property.We've never, to my knowledge, publicized this property in our docs, but were made aware of its use in Colony, when a MetaMask user reported that colony.io had stopped working.
The public config store is slated for removal in an upcoming update to MetaMask, and should not be used by provider consumers for any reason. We recommend using the corresponding events detailed in our (new and improved) documentation.
Summary of Changes
publicConfigStore
to_publicConfigStore
, where the provider appears to be the MetaMask provider.ethereum.isMetaMask && typeof ethereum.request === 'function'
.