Hey guys,
I’m currently trying to convert a value in Wei to a MATIC value in my front end. I get the numbers from my database, so they are undefined at first. This stops me from using .toString
. If I were able to use .toString
, I would use:
const tokenValue = Moralis.Units.FromWei(balance.toString)
However, I’m not able to use this.
How can I represent a number in MATIC on my front end, assuming my database stores values in wei?
Thanks!