@okwallet/wagmi-okx-connector
v1.0.1
Published
wagmi connector for okx wallet
Downloads
66
Readme
okx wagmi connector
import { useAccount, useConnect, useDisconnect } from 'wagmi'
import { OKXConnector } from '@okwallet/wagmi-okx-connector'
function Profile() {
const { address, isConnected } = useAccount()
const { connect } = useConnect({
connector: new OKXConnector(),
})
const { disconnect } = useDisconnect()
if (isConnected)
return (
<div>
Connected to {address}
<button onClick={() => disconnect()}>Disconnect</button>
</div>
)
return <button onClick={() => connect()}>Connect Wallet</button>
}