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
{{ message }}
This repository was archived by the owner on Jul 29, 2026. It is now read-only.
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
`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