Last active
July 7, 2019 21:58
-
-
Save pedrouid/762f11dd009f6dfee3704ae5efd4f30c to your computer and use it in GitHub Desktop.
Integrating Web3Connect with React button
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Web3Connect from "web3connect"; | |
| <Web3Connect.Button | |
| providerOptions={{ | |
| portis: { | |
| id: "PORTIS_ID", // required | |
| network: "mainnet" // optional | |
| }, | |
| fortmatic: { | |
| key: "FORTMATIC_KEY", // required | |
| network: "mainnet" // optional | |
| } | |
| }} | |
| onConnect={(provider) => { | |
| const web3 = new Web3(provider); // add provider to web3 | |
| }} | |
| onClose={() => { | |
| console.log("Web3Connect Modal Closed"); // modal has closed | |
| }} | |
| /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment