update cycle
This commit is contained in:
@@ -15,7 +15,6 @@ export const useRoundsStore = defineStore("rounds", {
|
||||
getters: {
|
||||
getRoundWinner() {
|
||||
const goal = this.getCurrentRoundData?.goal;
|
||||
console.log("goal", goal);
|
||||
if (!goal) {
|
||||
return;
|
||||
}
|
||||
@@ -61,9 +60,10 @@ export const useRoundsStore = defineStore("rounds", {
|
||||
const element = data[index];
|
||||
if (!this.rounds[index]) {
|
||||
this.rounds[index] = {};
|
||||
}
|
||||
this.rounds[index].round = index + 1;
|
||||
this.rounds[index].rewards_total = element.result;
|
||||
}
|
||||
console.log("vor Fehler");
|
||||
// this.rounds[index].round = index + 1;
|
||||
// this.rounds[index].rewards_total = element.result;
|
||||
}
|
||||
},
|
||||
async updateCurrentRound(sacrificedToken) {
|
||||
@@ -97,7 +97,6 @@ export const useRoundsStore = defineStore("rounds", {
|
||||
}
|
||||
|
||||
var goal = await memeBurnerStore.getGoal(roundNumber);
|
||||
console.log("goal", goal);
|
||||
var tokenArray = [];
|
||||
var rewards_clan = 0;
|
||||
var rewards_sacrifice = 0;
|
||||
@@ -106,11 +105,11 @@ export const useRoundsStore = defineStore("rounds", {
|
||||
for (let index = 0; index < data.length; index++) {
|
||||
var tokenData = {};
|
||||
const token = tokenStore.token[index];
|
||||
var testcoef = await rewardLockerStore.getSacrificedTokenCoefficient(
|
||||
var coefficent = await rewardLockerStore.getSacrificedTokenCoefficient(
|
||||
roundNumber,
|
||||
token.contractAddress
|
||||
);
|
||||
console.log("testcoef", testcoef);
|
||||
console.log("coefficent", coefficent);
|
||||
|
||||
tokenData.name = token.name;
|
||||
tokenData.contractAddress = token.contractAddress;
|
||||
@@ -128,7 +127,7 @@ export const useRoundsStore = defineStore("rounds", {
|
||||
const sacrificeClanReward = Number(rewardData[index].result[1]);
|
||||
console.log("stakeReward", stakeReward);
|
||||
console.log("sacrificeClanReward", sacrificeClanReward);
|
||||
const clanwin = (Number(testcoef) / 10000 - 1) * sacrificeClanReward;
|
||||
const clanwin = (Number(coefficent) / 10000 - 1) * sacrificeClanReward;
|
||||
console.log("clanwin", clanwin);
|
||||
const sacrificeRewards = Number(sacrificeClanReward) - clanwin;
|
||||
console.log("sacrificeRewards", sacrificeRewards);
|
||||
|
||||
Reference in New Issue
Block a user