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 cc1ba75 commit b40db40
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ton-connect-ui/demo-ton-ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
</body>
<script src="https://unpkg.com/@tonconnect/ui@latest/dist/tonconnect-ui.min.js"></script>
<script>

function log(msg) {
console.log(msg)
const t = document.createTextNode(msg + "\n")
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,
Expand All @@ -43,12 +50,6 @@
log("onStatusChange: "+wallet?.account.address)
})

function log(msg) {
console.log(msg)
const t = document.createTextNode(msg + "\n")
document.getElementById('log').appendChild(t);
}

async function connectWallet() {
const connectedWallet = await tonConnectUI.connectWallet();
log("connected after connectWallet");
Expand Down

0 comments on commit b40db40

Please sign in to comment.