ecadlabs/taquito

[beacon-wallet] Update the README file (and documentation) to include an ACTIVE_ACCOUNT_SET listener

Closed this issue · 0 comments

The latest versions of @airgap/beacon-sdk require an additional listener (ACTIVE_ACCOUNT_SET) that emits events when users switch accounts or disconnect their address on the wallet side.

The README.md file (in packages/taquito-beacon-wallet/README.md) needs to match Beacon's documentation (see taquito tab) which includes the following:

// Listen for all the active account changes
wallet.client.subscribeToEvent(
  BeaconEvent.ACTIVE_ACCOUNT_SET,
  async (account) => {
    // An active account has been set, update the dApp UI
    console.log(`${BeaconEvent.ACTIVE_ACCOUNT_SET} triggered: `, account);
  },
);