diff --git a/docs/develop/dapps/asset-processing/jettons.md b/docs/develop/dapps/asset-processing/jettons.md index 1584e766dc..711cb52c91 100644 --- a/docs/develop/dapps/asset-processing/jettons.md +++ b/docs/develop/dapps/asset-processing/jettons.md @@ -122,20 +122,21 @@ the `Jetton master contract` provides the get method `get_wallet_address(slice o ```js -import TonWeb from "tonweb"; +import TonWeb from 'tonweb'; const tonweb = new TonWeb(); -const jettonMinter = new TonWeb.token.jetton.JettonMinter(tonweb.provider, {address: ""}); -const address = await jettonMinter.getJettonWalletAddress(new TonWeb.utils.Address("")); +const jettonMinter = new TonWeb.token.jetton.JettonMinter(tonweb.provider, { address: '' }); +const jettonWalletAddress = await jettonMinter.getJettonWalletAddress(new TonWeb.utils.Address('')); + // It is important to always check that wallet indeed is attributed to desired Jetton Master: const jettonWallet = new TonWeb.token.jetton.JettonWallet(tonweb.provider, { address: jettonWalletAddress }); const jettonData = await jettonWallet.getData(); -if (jettonData.jettonMinterAddress.toString(false) !== new TonWeb.utils.Address(info.address).toString(false)) { +if (jettonData.jettonMinterAddress.toString(false) !== jettonMinter.address.toString(false)) { throw new Error('jetton minter address from jetton wallet doesnt match config'); } -console.log('Jetton wallet address:', address.toString(true, true, true)); +console.log('Jetton wallet address:', jettonWalletAddress.toString(true, true, true)); ```