From 3bd1776d833c368deffed190dc3e624dbc3f84d2 Mon Sep 17 00:00:00 2001 From: "Fifo (Fabricius Zatti)" <62725221+fazzatti@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:38:41 -0300 Subject: [PATCH] Docs: Update snippets in gitbook (#36) * GITBOOK-16: No subject * GITBOOK-17: No subject * GITBOOK-19: No subject * GITBOOK-21: No subject * GITBOOK-22: No subject --- docs/tutorials/bulk-payments.md | 24 +++++++++++----------- docs/tutorials/issuing-your-first-asset.md | 16 +++++++-------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/tutorials/bulk-payments.md b/docs/tutorials/bulk-payments.md index 7859acb..19ff204 100644 --- a/docs/tutorials/bulk-payments.md +++ b/docs/tutorials/bulk-payments.md @@ -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: { @@ -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({ diff --git a/docs/tutorials/issuing-your-first-asset.md b/docs/tutorials/issuing-your-first-asset.md index bfa317d..83d632d 100644 --- a/docs/tutorials/issuing-your-first-asset.md +++ b/docs/tutorials/issuing-your-first-asset.md @@ -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. @@ -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: {