Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function Web3ConnectionButtons(props) {
const context = useWeb3Context()
const size = props.size || 'large';
if (!context.active && !context.error) {
console.log('context loading', context);
} else if (context.error) {
console.log('context error', context);
} else {
console.log('context success', context);
}
const setConnector = async connectorName => {
if (localStorage && connectorName === 'Injected') {
localStorage.setItem('walletProvider', 'Injected');
}
return await context.setConnector(connectorName);
};
const unsetConnector = async () => {