Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TONCONNECT-UI]: TonConnect works in the browser, but does not work inside of Telegram MiniApp. #230

Open
KernelPanic0 opened this issue Aug 10, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@KernelPanic0
Copy link

Describe the bug

I have a telegram mini app that opens a tonconnect application. Whenever I connect my wallet through the regular browser (Firefox) using the Tonkeeper wallet, Tonkeeper immediately opens up and I get prompted to accept the connection. However when I do the same in the telegram mini app, the tonkeeper wallet does not automatically open. Instead, tonconnect simply infinitely loads. I have added some remotejs code into my webapp which allows for me to remotely view the console of the app running in the miniapp, however there are no errors that point out any obvious flaws... Even when opening the link in the browser externally, it does not immediately invoke the opening of Tonkeeper.

Here is the code (Vue.js framework)
`const tonConnectUI = new TON_CONNECT_UI.TonConnectUI({
manifestUrl: 'url',
buttonRootId: 'connect-div'
});

    const acceptOfferButton = document.getElementById('accept-offer');
    // eslint-disable-next-line

    async function showTonConnectPopup() {
        try {
            // Initialize the connection to the TonConnect wallet
            await tonConnectUI.openModal();

        } catch(e) { console.log(e) }
    }
	
    acceptOfferButton.addEventListener('click', showTonConnectPopup)

    tonConnectUI.onStatusChange(async walletInfo => {
    if (walletInfo) {...`

Expected behavior

Tonconnect opens the Tonkeeper wallet after clicking connect, just like it would in the browser.

Current behavior

Tonconnect infinitely loads.

Steps to Reproduce

Unsure

Environment

Telegram MiniApp

Additional context

No response

@KernelPanic0 KernelPanic0 added the bug Something isn't working label Aug 10, 2024
@KernelPanic0
Copy link
Author

Still having this problem...

@AvetikNersisyan
Copy link

Did you find the solution? I still have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants