forwadermetamask
v1.0.3
Published
## About - When you prompt the user to open the chrome store and install MetaMask calling this module along with it by passing the url of your dapp to this forwader ,opens up a forwader page for MetaMask which redirects the user to your dapp when the on
Downloads
5
Readme
MetaMask Forwader
About
- When you prompt the user to open the chrome store and install MetaMask calling this module along with it by passing the url of your dapp to this forwader ,opens up a forwader page for MetaMask which redirects the user to your dapp when the onboarding of the user on MetaMask gets completed
Working
- the forwader keeps refreshing till it detects web3 is injected
- After the user completes the onboarding ,MetaMask passes a postmessage to the forwader page indicating the onboarding has completed
- the forwader then redirects the user to your dapp
Installation
$ npm install forwadermetamask
or
$ yarn add forwadermetamask
Usage
import React,{Component} from 'react';
var forwader = require('forwadermetamask')
class App extends Component {
constructor() {
super();
}
render() {
let url = window.location.href //the url of your dapp
forwader(url)
window.open('https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en')
}
}