Fluent will deprecate most legacy Conflux Portal provider API. Below is a brief summary of what will change.
⚠️ These changes will be made in Fluent v1.x. There's also Breaking changes between Fluent v1.0 and ConfluxPortal
Events
accountsChanged
event will not trigger on page loadnetworkChanged
andchainIdChanged
event will be removed, usechainChanged
insteadconnect
event will trigger on page load, indicating it's possible to send RPC request to wallet
Methods
conflux.send
andconflux.sendAsync
will be removed, useconflux.request
insteadconflux.enable
will be removed, useconflux.request({method: "cfx_requestAccounts"})
instead
Properties
conflux.selectedAddress
will be removed, useconflux.request({method: "cfx_accounts"})
insteadconflux.chainId
will be removed, useconflux.request({method: 'cfx_chainId'})
insteadconflux.networkVersion
will be removed, useconlfux.request({method: 'cfx_netVersion'})
insteadconflux.autoRefreshOnNetworkChange
will be removed, you can usechainChanged
event along withlocation.reload
instead
Others
- builtin
js-conflux-sdk
related field will be removed, including:window.confluxJS
window.ConfluxJSSDK
window.confluxJS.provider
will not be same aswindow.conflux
- install
js-conflux-sdk
(v2.0 or later) in dapp and use the provider from Fluent
Comments
0 comments
Article is closed for comments.