@edgeandnode/wallet
v11.52.0
Published
Wallet utils and related components
Downloads
2,416
Maintainers
Keywords
Readme
E&N Wallet
Reusable React component for connecting to web3 wallets
Test coverage
Usage
SigninModal and Context
import { SigninModal, useWallet } from '@edgeandnode/wallet'
const App = () => {
const { address, setIsModalOpen } = useWallet()
return (
<div>
Wallet address: { address }
<button onClick={() => { setIsModalOpen(true) }}>
Connect
</button>
<SigninModal headerImage="link/to/image.png" />
</div>
)
}
Context Provider
<WalletContextProvider infuraId={process.env.INFURA_KEY}>
<App />
</WalletContextProvider>