Skip to content

Commit

Permalink
Update demo-ton-ui.html
Browse files Browse the repository at this point in the history
  • Loading branch information
stels-cs authored Oct 25, 2023
1 parent b40db40 commit 815137d
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions ton-connect-ui/demo-ton-ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</head>
<body>
<div class="center">
<button onclick="connectWallet()">Connect Wallet.</button>
<button onclick="connectWallet()">Connect TON</button>
<pre id="log"></pre>
</div>
</body>
Expand All @@ -37,22 +37,20 @@
document.getElementById('log').appendChild(t);
}

const tonConnectUI = new TON_CONNECT_UI.TonConnectUI({
manifestUrl: 'https://stels-cs.github.io/ton-connect-ui/tcm.json',
restoreConnection: false,
actionsConfiguration:{
twaReturnUrl:'https://t.me/local_presale_bot/tcui'
}

});
const tonConnectUI = new TON_CONNECT_UI.TonConnectUI({
manifestUrl: 'https://stels-cs.github.io/ton-connect-ui/tcm.json',
actionsConfiguration:{
twaReturnUrl:'https://t.me/local_presale_bot/tcui'
}
});

tonConnectUI.onStatusChange(wallet => {
log("onStatusChange: "+wallet?.account.address)
})

async function connectWallet() {
const connectedWallet = await tonConnectUI.connectWallet();
log("connected after connectWallet");
}
async function connectWallet() {
const connectedWallet = await tonConnectUI.connectWallet();
log("connected after connectWallet");
}
</script>
</html>

0 comments on commit 815137d

Please sign in to comment.