Hey,
I am using @ton/ton package for preparing body for NFT transfer.
There is buffer required.
So i add require buffer into top of using import library of ton.
Then eslint give me error that i can not put require before any import. So i disable eslint for src folder.
But still getting error. Buffer is not defined.


I am using react js and also @tonconnect/ui-react and @ton/ton

Aug 22, 2023, 8:30 AM
React js with typescript template
Is there other way to prepare payload body for NFT transfer?
Because @ton/ton giving me buffer error even if i add required buffer.
Invalid address. Got "0:6bd8533e023bbb96a3ac9eb26f4c6c9eed7dae619a0bdc69fe3868317c2947d5";
This address i am using from useTonWallet but what i am missing?
beginCell()
.storeUint(0x5fcc3d14, 32)
.storeUint(0, 64)
.storeAddress("EQAkWqG9_sfywsxi9nVuxMyiji-JYO3RKi8N2krqOQlxxXoc")
.storeAddress(wallet.account.address)
.storeUint(0, 1)
.storeCoins(toNano('0.000000001'))
.storeUint(0,1)
.endCell();
Invalid address. Got kQBr2FM-Aju7lqOsnrJvTGye7X2uYZoL3Gn-OGgxfClH1Yqp
Can anyone tell me please which type of address we have to send here.. its rejecting. I am using both testnet tonkeeper wallet
Someone help me please 😢
Aug 22, 2023, 10:57 AM
.storeAddress(new Address('EQA...Xoc'))
.storeAddress(new Address(wallet.account.address))
Aug 22, 2023, 11:00 AM
Thanks 🥹
Not working

.storeAddress(new Address(process.env.REACT_APP_WALLET))
.storeAddress(new Address(wallet.account.address))

Cannot convert kQBr2FM-Aju7lqOsnrJvTGye7X2uYZoL3Gn-OGgxfClH1Yqp to a BigInt
Aug 22, 2023, 11:04 AM
Address.parse(''), not new Address('')
Aug 22, 2023, 11:05 AM
Thanks working
Can i get this docs link.. i mean where can i get all this stuff?
I am doing the same thing which is mention in Ton docs to transfer nft but its keep getting error like this..

Now another error....

[TON_CONNECT_SDK_ERROR] TonConnectUIError
Unhandled error:TypeError: Do not know how to serialize a BigInt


tonConnectUI.sendTransaction({
validUntil: Math.floor(Date.now() / 1000) + 360,
messages: [
{
address: Address.parse(address), // NFT Item address
amount: toNano("0.05"),
payload: body.toBoc().toString("base64")
}
]
});
Its payload error i think but why... this is how mention in docs
Is there any advance docs for this?
Hey do you know this error? My app launch today and i am stuck into this.
Aug 22, 2023, 11:58 AM

© 2024 Draquery.com All rights reserved.