bigint umpdate
This commit is contained in:
@@ -101,10 +101,9 @@ export const useWalletStoreV2 = defineStore("walletV2", {
|
||||
});
|
||||
for (let index = 0; index < tokenStore.token.length; index++) {
|
||||
const token = tokenStore.token[index];
|
||||
const balanceOfDecimal = data[index].result / BigInt(Math.pow(10, token.decimals));
|
||||
this.token.push({
|
||||
contractAddress: token.contractAddress,
|
||||
balanceOf: Number(balanceOfDecimal),
|
||||
balanceOf: data[index].result
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -118,11 +117,10 @@ export const useWalletStoreV2 = defineStore("walletV2", {
|
||||
await this.getTokenBalances();
|
||||
//MemeToken Staked
|
||||
const tokenStore = useTokenStore();
|
||||
const staked = await rewardlockerStore.getStaked(this.address);
|
||||
this.memeToken.staked = Number(staked) / Math.pow(10, tokenStore.memeToken.decimals);
|
||||
this.memeToken.staked = await rewardlockerStore.getStaked(this.address);
|
||||
const unclaimedRewardsArray = await rewardlockerStore.getTotalRewards(this.address);
|
||||
const unclaimedRewards = unclaimedRewardsArray[0] + unclaimedRewardsArray[1];
|
||||
this.memeToken.unclaimedRewards = Number(unclaimedRewards) / Math.pow(10, tokenStore.memeToken.decimals)
|
||||
this.memeToken.unclaimedRewards = unclaimedRewards
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user