ton-connect / sdk

SDK for TON Connect 2.0 — a comprehensive communication protocol between wallets and apps in TON ecosystem
Apache License 2.0
326 stars 92 forks source link

skipRedirectToWallet #234

Open Alnevis opened 3 months ago

Alnevis commented 3 months ago

Your Question

Why skipRedirectToWallet doesnt skip redirect?

Context

Skip redirect to wallet

What have you tried so far?

No response

Relevant Code or Commands

tonConnectUI.uiOptions = { actionsConfiguration: {
      skipRedirectToWallet: 'always'   } }; export async function launchSmartContract(amount) {
const transaction = { messages: [ { address: "**", // destination address amount: toNano(String(amount)).toString() // Toncoin in nanotons },

    ],

};

try {

    const result = await tonConnectUI.sendTransaction(transaction);

} catch (error) {
    console.error("Error sending transaction:", error);
}

}

document.getElementById('ton-connect').onclick = connectToWallet; window.launchSmartContract = launchSmartContract;

Documentation Check