init functions for the storage

This commit is contained in:
EmberSpirit
2023-07-16 15:11:39 +02:00
parent 56454bef89
commit cb85a47a94
21 changed files with 7823 additions and 368 deletions
+18 -5
View File
@@ -1,11 +1,21 @@
<template>
<div class="claim bloodline-border">
<div class="rewards-wrapper" v-if="!isMobile">
<rewards-wrapper title="Sacrafice Reward" coin="$BLOOD" amount="0" image="/src/assets/img/vampir.png" />
<rewards-wrapper
title="Sacrafice Reward"
coin="$BLOOD"
:amount="getCurrentRoundData?.rewards_sacrifice"
image="/src/assets/img/vampir.png"
/>
<div class="rewards-divider bloodline-devider">
<font-awesome-icon icon="fa-solid fa-plus" />
</div>
<rewards-wrapper title="Clan Reward" coin="$BLOOD" amount="0" image="/src/assets/img/vampir.png" />
<rewards-wrapper
title="Clan Reward"
coin="$BLOOD"
:amount="getCurrentRoundData?.rewards_clan"
image="/src/assets/img/vampir.png"
/>
</div>
<div class="rewards-list" v-else>
<rewards-wrapper
@@ -37,7 +47,7 @@ import { inject, ref, onMounted } from "vue";
import { useRewardLockerStore } from "@/stores/rewardlocker";
import { useWalletStore } from "@/stores/wallet";
import { useRoundsStore } from "@/stores/rounds";
const clanRewards = ref(0);
const rewards = ref(0);
const isMobile = inject("isMobile");
const rewardLockerStore = useRewardLockerStore();
@@ -48,8 +58,11 @@ const { activeRound, getCurrentRoundData } = storeToRefs(roundStore);
onMounted(async () => {});
function claimRewards() {
//todo
async function claimRewards() {
console.log("getCurrentRoundData", getCurrentRoundData);
console.log("activeRound.value", activeRound.value);
var result = await rewardLockerStore.claim([activeRound.value]);
console.log("result", result);
}
</script>