Use web3Api / useWeb3ExecuteFunction unauthenticated?

You may need to put this onto a repo so we can test. I can’t immediately see where the issue is if you’re getting valid state values on disconnect yet they’re disappearing. You are doing a lot of transformations to supply for instance, see what happens if you just render it as is in your component.

well that’s definitely the problem, and now I remember how hard it was to get that number to display properly it didn’t like parseInt(JSON.parse(JSON.stringify(supply)).hex, 16) / Math.pow(10, 18) but it also doesn’t like the standalone variable , console fills with bignumber errors. the parsing for the price isn’t much different than the supply but it always displays.

Code to display Circ Supply:

{
                supply && (
                  <div>
                    {(
                      parseInt(JSON.parse(JSON.stringify(supply)).hex, 16) /
                        Math.pow(10, 18) 
                      
                    )
                      .toFixed()
                      .replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,")}{" "}
                    
                  </div>
                )
              }

Code to display Price:

{
                token && (
                  <div>
                    $
                    {parseFloat(
                      JSON.parse(JSON.stringify(token?.data?.price))
                    ).toFixed(6)}
                  </div>
                )
              }

I’m getting the supply with

const { data: supply, fetch: fetchsupply } = useWeb3ExecuteFunction();

and in my main async function

let res1 = await fetchsupply({ params: optionsSupply });

and displayed in the return like the above post.
now looking at it I realize I shouldn’t have to do / Math.pow(10, 18) must have copied that without thinking , should just be an int. Can’t seem to get it to work.

Can you not use the Moralis’s formatting functions? Moralis Units - Moralis

Otherwise what is the original format/example of supply and what are you trying to render it as?