1.0.3 • Published 5 years ago

forwadermetamask v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

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')
  }
}
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago