sdk icon indicating copy to clipboard operation
sdk copied to clipboard

[<SDK or UI>]:Get boc by "tonConnectUI?.sendTransaction(transaction)" can not parser

Open longqingzhao opened this issue 6 months ago • 2 comments

Describe the bug

const payload = payId ? beginCell().storeUint(0, 32).storeStringTail(payId).endCell().toBoc().toString('base64') : void 0
const transaction = {
    validUntil: Math.floor(Date.now() / 1000) + 360,
    messages: [{ address: toAddress, amount: toNano(amount).toString(), payload }]
 }
 const {boc} = await tonConnectUI?.sendTransaction(transaction)
 const code_cell = Cell.fromBoc(Buffer.from(boc, 'base64'))?.[0]
 const tx = loadTransaction(code_cell.beginParse())

1、boc=te6cckEBAgEAugAB4YgBJQyqFYFV1pJllWcOr4hDOUcr/rXd7trBiXL3Gr4IqqYFyUp5ETJgSMVb31frYvnpMY97xOEel2mGU9ApV0PCVMl7uJt/yQuulYRKsGJApBRyvkv2uTBB0Mm+w2Y3ELX4EU1NGLs1T0owAAAAQAAcAQCIQgAo2iWwzvU7s+j6H3IAOqFeOXmE3PCYafNAdHisno3N1xzEtAAAAAAAAAAAAAAAAAAAAAAAADE3MjI0MTEwMDU3MDMOJnpP loadTransaction report an error: Invalid data

Expected behavior

loadTransaction can return normal data.

Current behavior

loadTransaction report an error: Invalid data

Steps to Reproduce

1、run sendTransaction and get a boc 2、parse boc by loadTransaction

Environment

1、``` +-- @orbs-network/[email protected] -> .\node_modules.pnpm@[email protected]\node_modules@orbs-network\ton-access +-- @ton/[email protected] -> .\node_modules.pnpm@[email protected]_@[email protected]\node_modules@ton\core +-- @ton/[email protected] -> .\node_modules.pnpm@[email protected]_@[email protected]_@[email protected]__@[email protected]\node_modules@ton\ton +-- @tonconnect/[email protected] -> .\node_modules.pnpm@[email protected]\node_modules@tonconnect\ui +-- [email protected] -> .\node_modules.pnpm\[email protected]\node_modules\buffer +-- [email protected] -> .\node_modules.pnpm\[email protected][email protected][email protected]\node_modules\vite-plugin-node-polyfills `-- [email protected] -> .\node_modules.pnpm\[email protected]\node_modules\vite

2、windows11
3、Chrome 127.0.6533.74


### Additional context

_No response_

longqingzhao avatar Jul 31 '24 08:07 longqingzhao