Closed matthewmaclay closed 9 months ago
Thanks @thekiba! This happened because I didn't form the payload correctly
sendTransaction({
messages: [
{
address: process.env.NEXT_PUBLIC_WALLET_ADDRESS as string,
amount: toNanoTon(0.1),
payload: btoa(`ID:${order.id}`), // error is here
},
],
validUntil: Math.floor(Date.now() / 1000) + 120, // 60 sec
});
And right way is:
const transactionComment = (text: string) => {
const cell = beginCell()
.storeUint(0x00000000, 32)
.storeStringTail(text)
.endCell();
const boc = cell.toBoc();
return boc.toString("base64");
};
tonConnect.sendTransaction({
messages: [
{
address: process.env.NEXT_PUBLIC_WALLET_ADDRESS as string,
amount: toNanoTon(order.amount),
payload: transactionComment(`ID:${order.id}`),
},
],
validUntil: Math.floor(Date.now() / 1000) + 120, // 60 sec
});
Describe the bug
Successfully connected wallet via ton connect to TMA, but on confirm transaction see this screens in ton keeper and tg wallet
Expected behavior
Transcation will approve successfully.
Current behavior
Wallet see transaction, but i cant approve it
Steps to Reproduce
-
Environment
└─┬ @tonconnect/ui@2.0.0 └─┬ @tonconnect/sdk@3.0.0 ├── @tonconnect/isomorphic-eventsource@0.0.2 ├── @tonconnect/isomorphic-fetch@0.0.3 └── @tonconnect/protocol@2.2.6
Additional context
No response