Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function connectWalletLink(store) {
const walletLink = new WalletLink({
appName: process.env.REACT_APP_NAME || 'AirSwap',
appLogoUrl: AIRSWAP_LOGO_URL,
})
const provider = walletLink.makeWeb3Provider(NODESMITH_GETH_NODE, NETWORK)
provider.enable().then(() => {
signer = getSigner({ web3Provider: provider }, walletActions)
const addressPromise = signer.getAddress()
addressPromise
.then(address => {
store.dispatch(connectedWallet('walletLink', address.toLowerCase()))
})
.catch(e => store.dispatch(errorConnectingWallet(e)))
})
}