Hello EthersJS!
This component is designed to display the account ID of the connected Ethereum wallet. In case the user is not signed in, the component will show a message instead.
Source code
const sender = Ethers.send("eth_requestAccounts", [])[0];
if (!sender) return "Please login first";
return <p>Account: {sender}</p>;
Fork the component
- Navigate to the component
- Click on the menu icon in the top-right corner
- Select
Fork
- Feel free to make any changes
- Click on "Save" to deploy the component
Please note that to deploy the component, you'll need to sign in with a NEAR account and to make a deposit of a small amount of NEAR for the storage cost. This is because BOS uses the NEAR blockchain as its underneath.