Disconnecting a Wallet
- Beacon
- Taquito
import { DAppClient } from "@airgap/beacon-sdk";
const dAppClient = new DAppClient({ name: "Beacon Docs" });
// TODO: Remove temporary workaround in sandbox
await new Promise((resolve) => setTimeout(resolve, 1000));
dAppClient.clearActiveAccount().then(async () => {
const account = await dAppClient.getActiveAccount();
console.log("Active Account", account);
});
https://example.com
import { TezosToolkit } from "@taquito/taquito";
import { BeaconWallet } from "@taquito/beacon-wallet";
const Tezos = new TezosToolkit("https://mainnet-tezos.giganode.io");
const wallet = new BeaconWallet({ name: "Beacon Docs Taquito" });
Tezos.setWalletProvider(wallet);
// TODO: Remove temporary workaround in sandbox
await new Promise((resolve) => setTimeout(resolve, 1000));
await wallet.clearActiveAccount();
try {
const account = await wallet.getPKH();
console.log("Active Account", account);
} catch {
console.log("No wallet connected");
}
https://example.com