From 7fc00b4f291b979d2a641b12a33bcb33c5131136 Mon Sep 17 00:00:00 2001 From: Claudio La Barbera Date: Wed, 18 Sep 2024 15:29:38 +0200 Subject: [PATCH] fix(incr/decr): open wallet connect if user click on increment/decrement without wallet connected --- src/components/views/Home.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/views/Home.vue b/src/components/views/Home.vue index 9a850f8..5b46a8f 100644 --- a/src/components/views/Home.vue +++ b/src/components/views/Home.vue @@ -60,12 +60,20 @@ const viewTransaction = () => { } const incrementAmount = () => { + if(!store.telegram.walletAccount) { + store.telegram.tonConnectUI.openModal(); + } + if (amount.value + 0.1 <= (max_bet.value)) { amount.value = parseFloat((amount.value + 0.1).toFixed(1)) } } const decrementAmount = () => { + if(!store.telegram.walletAccount) { + store.telegram.tonConnectUI.openModal(); + } + if (amount.value - 0.1 >= (min_bet.value)) { amount.value = parseFloat((amount.value - 0.1).toFixed(1)) } @@ -98,7 +106,7 @@ onMounted(async () => {