Skip to content

Commit

Permalink
fix: fix NFTs totalSupply value to show available supply
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolastmaia committed Nov 13, 2024
1 parent a3febc9 commit dd133d2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/localServer/workers/utilities/web3Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ const getProfileAssets_CONET_Balance = async (profile: profile) => {
if (CONETianData !== false) {
if (current.ConetianPlan) {
current.ConetianPlan.Conetian.balance = CONETianData.balanceGuardian.toString()
current.ConetianPlan.Conetian.totalSupply = (maxConetianNft - parseInt(CONETianData.availableBalance.toString())).toFixed(0)
current.ConetianPlan.Conetian.totalSupply = parseInt(CONETianData.availableBalance.toString()).toFixed(0)
current.ConetianPlan.Conetian_referrer.balance = CONETianData.balanceReferrer.toString()
} else {
current.ConetianPlan = {
Expand All @@ -504,7 +504,7 @@ const getProfileAssets_CONET_Balance = async (profile: profile) => {
contract: CONETianPlanAddr,
name: 'Guardian',
supplyMaximum: maxConetianNft.toString(),
totalSupply: (maxConetianNft - parseInt(CONETianData.availableBalance.toString())).toFixed(0)
totalSupply: parseInt(CONETianData.availableBalance.toString()).toFixed(0)
},
Conetian_referrer: {
balance: CONETianData.balanceReferrer.toString(),
Expand All @@ -522,7 +522,6 @@ const getProfileAssets_CONET_Balance = async (profile: profile) => {
if (GuardianData !== false) {
if (current.GuardianPlan) {
current.GuardianPlan.Guardian.balance = GuardianData.balanceGuardian.toString()
current.GuardianPlan.Guardian.totalSupply = maxGuardianNft.toFixed(0)
current.GuardianPlan.Guardian_referrer.balance = GuardianData.balanceReferrer.toString()
current.GuardianPlan.Node_NFT_ID = GuardianData.nodeNftId.toString()
} else {
Expand Down

0 comments on commit dd133d2

Please sign in to comment.