You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return {
sender: {
send: async (args: SenderArguments) => {
tonConnectUI.sendTransaction({
messages: [
{
address: args.to.toString(),
amount: args.value.toString(),
payload: args.body?.toBoc().toString('base64'),
},
],
validUntil: Date.now() + 5 * 60 * 1000, // 5 minutes for user to approve
});
},
},
connected: tonConnectUI.connected,
};
}`
tonConnectUI.sendTransaction has a return value,
It seems that it cannot be returned if written like this
How should I modify
The text was updated successfully, but these errors were encountered:
`import { useTonConnectUI } from '@tonconnect/ui-react';
import { Sender, SenderArguments } from '@ton/core';
export function useTonConnect(): { sender: Sender; connected: boolean } {
const [tonConnectUI] = useTonConnectUI();
return {
sender: {
send: async (args: SenderArguments) => {
tonConnectUI.sendTransaction({
messages: [
{
address: args.to.toString(),
amount: args.value.toString(),
payload: args.body?.toBoc().toString('base64'),
},
],
validUntil: Date.now() + 5 * 60 * 1000, // 5 minutes for user to approve
});
},
},
connected: tonConnectUI.connected,
};
}`
tonConnectUI.sendTransaction has a return value,
It seems that it cannot be returned if written like this
How should I modify
The text was updated successfully, but these errors were encountered: