1.0.1 • Published 5 months ago

@okwallet/wagmi-okx-connector v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

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>
}
1.0.1

5 months ago

1.0.0

5 months ago