Skip to content

Commit

Permalink
feat: add transaction on icon click
Browse files Browse the repository at this point in the history
  • Loading branch information
thebatclaudio committed Sep 12, 2024
1 parent f1d3e29 commit efa0821
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { HeadsOrTails } from '../../wrappers/HeadsOrTails';
import Modal from '../modals/Modal.vue';
import Button from '../common/Button.vue';
import { store } from '../../common/store';
import { initHapticFeedback } from '@telegram-apps/sdk';
const jettonSymbol = ref(import.meta.env.VITE_JETTON_SYMBOL);
Expand Down Expand Up @@ -35,6 +36,12 @@ let currentDegrees = 0;
const playGame = async () => {
if (isFlipping) return;
try {
const hapticFeedback = initHapticFeedback();
hapticFeedback.impactOccurred('heavy');
} catch {}
lastTransactionId = await store.telegram.playGame(amount.value);
modalOpen.value = true;
Expand Down

0 comments on commit efa0821

Please sign in to comment.