Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
react-metamask-checker
Advanced tools
React component which uses Render Props approach for checking Web3 instance object injected by Metamask extension
React component which uses Render Props approach for checking Web3 instance object injected by Metamask extension.
Note: since v2.0.0 only new version of Metamask API is supported. Related links:
yarn add react-metamask-checker
yarn test:jest # Runs Jest with coverage collection
yarn test:coverage # Sends coverage to .coveralls.io
yarn test # yarn test:jest && yarn test:coverage
// ./containers/App.js
import React, { Component } from 'react'
import MetamaskChecker from 'react-metamask-checker'
import Loader from './components/Loader'
import Err from './components/Error'
import Content from './components/Content'
class App extends Component {
async initialize (provider, account, network) {
console.log(provider, account, network)
}
render () {
const props = {
/* Ethereum network_id (numeric) which should be selected in Metamask */
// network : null,
/* Ethereum account (address) which should be selected in Metamask */
// account : null,
/* Function which executes on checking error */
// onCheckError : async (error) => null,
/* Function which executes on checking success */
onCheckSuccess : async (provider, account, network) => await this.initialize(provider, account, network),
renderDefault : () => <Loader />,
renderErrored : error => <Err message={error.message || 'Unexpected error'} />,
renderChecked : (provider, account, network) => <Content />
}
return <MetamaskChecker {...props} />
}
}
FAQs
React component which uses Render Props approach for checking Web3 instance object injected by Metamask extension
The npm package react-metamask-checker receives a total of 6 weekly downloads. As such, react-metamask-checker popularity was classified as not popular.
We found that react-metamask-checker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.