Skip to content

Commit

Permalink
Updated wrong order on tutorial docs (#2913)
Browse files Browse the repository at this point in the history
* updated taquito/beacon-wallet readme to match current beacon implementation

* addressed PR comments

* updated originate.md

* remove eventHandlers property

* updated wrong order on wallet initialization docs
  • Loading branch information
dsawali authored Apr 11, 2024
1 parent 4360f9c commit 12996df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/originate.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ import { TezosToolkit } from '@taquito/taquito';
const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com');
const option = { name: "nameOfWallet", network: { type: 'ghostnet' }, enableMetrics: true};
const wallet = new BeaconWallet(option);
await wallet.requestPermissions();
Tezos.setWalletProvider(wallet);
await wallet.client.subscribeToEvent(
BeaconEvent.ACTIVE_ACCOUNT_SET,
Expand All @@ -58,6 +56,8 @@ await wallet.client.subscribeToEvent(
console.log(`${BeaconEvent.ACTIVE_ACCOUNT_SET} triggered: `, account);
},
await wallet.requestPermissions();
Tezos.setWalletProvider(wallet);
```

</TabItem>
Expand Down
3 changes: 1 addition & 2 deletions packages/taquito-beacon-wallet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ const options = {
};
const wallet = new BeaconWallet(options);

await wallet.requestPermissions();

await 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);
},
);
await wallet.requestPermissions();

const Tezos = new TezosToolkit('https://YOUR_PREFERRED_RPC_URL');
Tezos.setWalletProvider(wallet);
Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-19.2.0/originate.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ import { TezosToolkit } from '@taquito/taquito';
const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com');
const option = { name: "nameOfWallet", network: { type: 'ghostnet' }, enableMetrics: true};
const wallet = new BeaconWallet(option);
await wallet.requestPermissions();
await 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);
},
await wallet.requestPermissions();
Tezos.setWalletProvider(wallet)
```

Expand Down

0 comments on commit 12996df

Please sign in to comment.