stepper badge update + injected wallet + smaller fixes

This commit is contained in:
EmberSpirit
2023-10-16 12:07:07 +02:00
parent 301c569edc
commit 35f2f0782f
10 changed files with 133 additions and 37 deletions
+10 -7
View File
@@ -67,13 +67,16 @@ export const useCycleStore = defineStore("cycles", {
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)
if (this.cycles[this.currentCycle]) {
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);
}
},
/**
* main function to fill a round, will not be filled when already loaded