From b6ff8b36371c4b6f3671e61f5571d083c0fa15b3 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 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/views/Home.vue b/src/components/views/Home.vue index 9a850f8..f5c08fe 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 () => {