Skip to content

Commit

Permalink
disconnect with both wagmi and w3o hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamj1232 committed Jun 13, 2024
1 parent b881934 commit 8950937
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,13 +539,18 @@ const App = () => {
<button
className="bn-demo-button"
onClick={async () => {
// const walletsConnected = await disconnect(wallet)
const disconnectThisWallet = getConnectors(
wagmiConfig
).find(connector => connector.name === wallet.label)
wagmiDisconnect(wagmiConfig, {
connector: disconnectThisWallet
})
// Disconnect using web3-onboard hook
await disconnect(wallet)


// Disconnect using WAGMI

// const disconnectThisWallet = getConnectors(
// wagmiConfig
// ).find(connector => connector.name === wallet.label)
// wagmiDisconnect(wagmiConfig, {
// connector: disconnectThisWallet
// })
}}
>
Reset Wallet State
Expand Down

0 comments on commit 8950937

Please sign in to comment.