You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Therefore, the external component can utilize the wallet connection instance from JavaScript as follows:
constconnection=document.getElementById("USER_DEFINED_ID");connection.signer.subscribe(console.log);// Signer instance of Ethers.jsconnection.provider.subscribe(console.log);// Provider instance of Ethers.jsconnection.accounts.subscribe(console.log);// the connected accountsconnection.chain.subscribe(console.log);// the connected chain id
Context
This element is needed to keep a common wallet connection from multiple Web Components declared in HTML.
Activity