update loading cycle + potential staking rewards

This commit is contained in:
EmberSpirit
2023-10-12 23:04:35 +02:00
parent 2b4405579e
commit a34de54d60
10 changed files with 182 additions and 107 deletions
+4 -1
View File
@@ -64,10 +64,13 @@ export const useCycleStore = defineStore("cycles", {
console.log("updateCurrentCycle");
const tokenStore = useTokenStore();
const memeBurnerStore = useMemeburnerStore();
var data = await memeBurnerStore.getSacrificedCycle(this.currentCycle);
var data = await memeBurnerStore.getSacrificedCycle(this.currentCycle);
console.log("this.currentCycle", this.currentCycle);
console.log("this.cycles", this.cycles);
var tokenIndex = this.cycles[this.currentCycle]?.token.findIndex(
(tokenData) => tokenData.contractAddress === sacrificedToken
);
console.log("tokenIndex", tokenIndex);
const token = tokenStore.getToken(sacrificedToken);
this.cycles[this.currentCycle].token[tokenIndex].amount =
Number(data[tokenIndex].result[1]) / Math.pow(10, token.decimals)