update loading cycle + potential staking rewards
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user