Skip to content

Commit

Permalink
Docs: Update snippets in gitbook (#36)
Browse files Browse the repository at this point in the history
* GITBOOK-16: No subject

* GITBOOK-17: No subject

* GITBOOK-19: No subject

* GITBOOK-21: No subject

* GITBOOK-22: No subject
  • Loading branch information
fazzatti authored Dec 13, 2023
1 parent 21de395 commit 3bd1776
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
24 changes: 12 additions & 12 deletions docs/tutorials/bulk-payments.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ These steps ensure that both the issuer of the asset and the recipient of the pa
After initializing the necessary accounts, the next step involves creating the asset and setting up the transaction configuration.

```javascript
const cakeToken = new StellarPlus.Asset.ClassicAssetHandler(
"CAKE",
issuerAccount.getPublicKey(),
network,
issuerAccount,
transactionSubmitter
);
const cakeToken = new StellarPlus.Asset.ClassicAssetHandler({
code: 'CAKE',
issuerPublicKey: issuerAccount.getPublicKey(),
network,
issuerAccount,
transactionSubmitter,
});

const txInvocationConfig = {
header: {
Expand Down Expand Up @@ -264,13 +264,13 @@ const run = async () => {
});
await issuerAccount.friendbot?.initialize();

const cakeToken = new StellarPlus.Asset.ClassicAssetHandler(
"CAKE",
issuerAccount.getPublicKey(),
const cakeToken = new StellarPlus.Asset.ClassicAssetHandler({
code: 'CAKE',
issuerPublicKey: issuerAccount.getPublicKey(),
network,
issuerAccount,
transactionSubmitter
);
transactionSubmitter,
});

console.log("Initializing userAccount account");
const userAccount = new StellarPlus.Account.DefaultAccountHandler({
Expand Down
16 changes: 8 additions & 8 deletions docs/tutorials/issuing-your-first-asset.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ await distributionAccount.friendbot?.initialize();
Create an instance of your asset, specifying the asset code(here named 'CAKE '), issuing account's public key, network, and the issuer account handler. 

```typescript
const cakeToken = new StellarPlus.Asset.ClassicAssetHandler(
"CAKE",
issuerAccount.getPublicKey(),
const cakeToken = new StellarPlus.Asset.ClassicAssetHandler({
code: 'CAKE',
issuerPublicKey: issuerAccount.getPublicKey(),
network,
issuerAccount
);
});
```

The issuer account handler is an optional parameter when instancing assets but in this use case, it is necessary because it enables the management functionalities of the asset that require the issuer's approval.
Expand Down Expand Up @@ -118,12 +118,12 @@ const run = async () => {
const distributionAccount = new StellarPlus.Account.DefaultAccountHandler({network});
await distributionAccount.friendbot?.initialize();

const cakeToken = new StellarPlus.Asset.ClassicAssetHandler(
"CAKE",
issuerAccount.getPublicKey(),
const cakeToken = new StellarPlus.Asset.ClassicAssetHandler({
code: 'CAKE',
issuerPublicKey: issuerAccount.getPublicKey(),
network,
issuerAccount
);
});

const txInvocationConfig = {
header: {
Expand Down

0 comments on commit 3bd1776

Please sign in to comment.