This PR tackles two separate but somewhat related issues:
The website doesn't correctly count USDC in the Mento Reserve Multisig
The website doesn't account for Celo or stCelo held directly by the Reserve Multisig
(1) The USDC issue is actually a decimal one. The balance of the ERC20 token was flowing through a formatNumber function that assumed 18 decimals for all values, therefore it was counting the USDC but the value was scaled wrongly so didn't seam to be in the total. Extending the function to support optional number of decimals fixes the issue.
(2) I have manually added the reserve multisig content to the custody calculation logic. To be clear this won't account for Celo/stCelo included in Uniswap pools, just held directly by the address.
Closes: #31
Overview
This PR tackles two separate but somewhat related issues:
(1) The USDC issue is actually a decimal one. The balance of the ERC20 token was flowing through a
formatNumber
function that assumed 18 decimals for all values, therefore it was counting the USDC but the value was scaled wrongly so didn't seam to be in the total. Extending the function to support optional number of decimals fixes the issue.(2) I have manually added the reserve multisig content to the
custody
calculation logic. To be clear this won't account for Celo/stCelo included in Uniswap pools, just held directly by the address.Other changes