ferrumnet / tokenSupply

MIT License
1 stars 1 forks source link

Make nonCiculatingTokenSupplyAddressConfig dynamically readable from gateway DB #20

Closed taha-abbasi closed 1 year ago

taha-abbasi commented 1 year ago

This will enable easily adding tokenSupply functionality to additional tokens without having to redeploy the app with a new config.

taha-abbasi commented 1 year ago
  1. Updated getTotalSupplyAcrossNetworks function to return JSON objects and fixed the issue with supply numbers not being accurate up to 18 decimals.
  2. Modified the getNetworkConfigurations function to return the currencyId alongside the network configurations.
  3. Updated the /nonCirculatingSupplyAddresses route to remove the jsonRpcUrl value from the response without affecting the getNonCirculatingSupplyAddressConfigurations function.
  4. Moved the database collection name to an environment variable and updated the getNonCirculatingSupplyAddressesConfigInput function to use the new variable.
  5. Fixed the TypeScript error related to the potential undefined value of the environment variable by providing a fallback value.