diff --git a/.env.example b/.env.example index e1d4be1..ab3fd7f 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ VITE_ENV="development" VITE_TELEGRAM_BOT_URL="" VITE_TELEGRAM_MANIFEST_URL="" -VITE_TON_CONTRACT_ADDRESS="" \ No newline at end of file +VITE_TON_CONTRACT_ADDRESS="" +VITE_GTAG_ID="" \ No newline at end of file diff --git a/.env.production b/.env.production index 47bba6e..d9a6a73 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,5 @@ VITE_ENV="production" -VITE_TELEGRAM_BOT_URL="https://t.me/x2lotterybot" +VITE_TELEGRAM_BOT_URL="t.me/x2lotterybot/play" VITE_TELEGRAM_MANIFEST_URL="https://gradoally.github.io/x2lottery/tonconnect-manifest.json" VITE_TON_CONTRACT_ADDRESS="EQCnuaUFX1fxduNk5QvUMlexRmwHM08jfO5_zpQpkXjeWbL7" +VITE_GTAG_ID="G-0R6KDGMBJS" diff --git a/index.html b/index.html index 9612e01..f7cda8c 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,22 @@ name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> + + + + +
{{ modalDescription }}
diff --git a/src/main.ts b/src/main.ts index b5bcb2f..f50ebb7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,5 @@ import { createApp } from "vue"; -import { createWebHistory, createRouter } from "vue-router"; +import { createWebHashHistory, createRouter } from "vue-router"; import WebApp from "@twa-dev/sdk"; import Vue3TouchEvents, { type Vue3TouchEventsOptions, @@ -25,7 +25,7 @@ const routes = [ ]; const router = createRouter({ - history: createWebHistory(getBasePath()), + history: createWebHashHistory(getBasePath()), routes, }); diff --git a/src/wrappers/TonConnectSender.ts b/src/wrappers/TonConnectSender.ts index 0601c66..539e0c8 100644 --- a/src/wrappers/TonConnectSender.ts +++ b/src/wrappers/TonConnectSender.ts @@ -1,10 +1,12 @@ import { Address, beginCell, Sender, SenderArguments, SendMode, storeStateInit } from "@ton/ton"; -import { TonConnectUI } from "@tonconnect/ui"; +import { SendTransactionResponse, TonConnectUI } from "@tonconnect/ui"; export class TonConnectSender implements Sender { #provider: TonConnectUI; readonly address?: Address; + lastTransactionResponse?: SendTransactionResponse; + constructor(provider: TonConnectUI) { this.#provider = provider; if (provider.wallet) this.address = Address.parseRaw(provider.wallet?.account.address); @@ -16,7 +18,7 @@ export class TonConnectSender implements Sender { throw new Error("Deployer sender does not support `sendMode` other than `PAY_GAS_SEPARATELY`"); } - await this.#provider.sendTransaction({ + this.lastTransactionResponse = await this.#provider.sendTransaction({ validUntil: Date.now() + 5 * 60 * 1000, messages: [ {