Skip to content

Commit

Permalink
fix: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccoSordo committed May 7, 2024
1 parent 1a7cb91 commit 661e0d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
13 changes: 5 additions & 8 deletions src/docs/getting-started/first-dapp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import { DAppClient } from "@airgap/beacon-sdk";
const dAppClient = new DAppClient({ name: "Beacon Docs" });

// Listen for all the active account changes
dAppClient.subscribeToEvent(BeaconEvent.ACTIVE_ACCOUNT_SET, async (account) => {
dAppClient.subscribeToEvent(BeaconEvent.ACTIVE_ACCOUNT_SET, (account) => {
// An active account has been set, update the dApp UI
console.log(`${BeaconEvent.ACTIVE_ACCOUNT_SET} triggered: `, account);
});
Expand Down Expand Up @@ -84,13 +84,10 @@ const wallet = new BeaconWallet({ name: "Beacon Docs Taquito" });
Tezos.setWalletProvider(wallet);

// 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);
},
);
wallet.client.subscribeToEvent(BeaconEvent.ACTIVE_ACCOUNT_SET, (account) => {
// An active account has been set, update the dApp UI
console.log(`${BeaconEvent.ACTIVE_ACCOUNT_SET} triggered: `, account);
});

try {
console.log("Requesting permissions...");
Expand Down
8 changes: 4 additions & 4 deletions src/docs/guides/migration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ Next, implement an event listener for BeaconEvent.ACTIVE_ACCOUNT_SET. This event
</TabItem>
<TabItem value="taquito">
```typescript
await wallet.client.subscribeToEvent(BeaconEvent.ACTIVE_ACCOUNT_SET, (data) => {
// New method
wallet.client.subscribeToEvent(BeaconEvent.ACTIVE_ACCOUNT_SET, (data) => {
// An active account has been set, update the dApp UI
console.log(`${BeaconEvent.ACTIVE_ACCOUNT_SET} triggered: `, account);
});
await wallet.requestPermissions();
```
</TabItem>
</Tabs>
Expand Down Expand Up @@ -104,12 +104,12 @@ import { BeaconEvent, DAppClient } from "@airgap/beacon-sdk";
const dAppClient = new DAppClient({ name: "Beacon Docs" });

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

dAppClient.requestPermissions();
const permissions = await dAppClient.requestPermissions();
```

</TabItem>
Expand Down

0 comments on commit 661e0d0

Please sign in to comment.