Skip to content

Commit b6ff8b3

Browse files
committed
fix(incr/decr): open wallet connect if user click on increment/decrement without wallet connected
1 parent 8b39dd5 commit b6ff8b3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/components/views/Home.vue

+10-2
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,20 @@ const viewTransaction = () => {
6060
}
6161
6262
const incrementAmount = () => {
63+
if(!store.telegram.walletAccount) {
64+
store.telegram.tonConnectUI.openModal();
65+
}
66+
6367
if (amount.value + 0.1 <= (max_bet.value)) {
6468
amount.value = parseFloat((amount.value + 0.1).toFixed(1))
6569
}
6670
}
6771
6872
const decrementAmount = () => {
73+
if(!store.telegram.walletAccount) {
74+
store.telegram.tonConnectUI.openModal();
75+
}
76+
6977
if (amount.value - 0.1 >= (min_bet.value)) {
7078
amount.value = parseFloat((amount.value - 0.1).toFixed(1))
7179
}
@@ -98,7 +106,7 @@ onMounted(async () => {
98106
<template>
99107
<div class="text-center flex flex-col h-full">
100108
<div class="flex-1">
101-
<div class="text-center text-3xl uppercase p-5">
109+
<div class="text-center text-3xl uppercase p-1">
102110
<button id="ton-connect-button" type="button"></button>
103111
</div>
104112
<div class="flex flex-col justify-center content-center">
@@ -107,7 +115,7 @@ onMounted(async () => {
107115
<div id="front" @click="playGame()"><img src="/icon.png" class="pulse h-[30vh]"></div>
108116
</div>
109117
</div>
110-
<div class="mt-6">
118+
<div class="mt-1">
111119
<form class="max-w-xs mx-auto">
112120
<label for="quantity-input" class="block mb-2 text-sm font-medium uppercase text-white">Your bet</label>
113121
<div class="flex justify-center">

0 commit comments

Comments
 (0)