Skip to content

Instantly share code, notes, and snippets.

@pedrouid
Last active July 7, 2019 21:58
Show Gist options
  • Select an option

  • Save pedrouid/762f11dd009f6dfee3704ae5efd4f30c to your computer and use it in GitHub Desktop.

Select an option

Save pedrouid/762f11dd009f6dfee3704ae5efd4f30c to your computer and use it in GitHub Desktop.
Integrating Web3Connect with React button
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