aave-js icon indicating copy to clipboard operation
aave-js copied to clipboard

RFC: less strict types & flattened props

Open sakulstra opened this issue 3 years ago • 0 comments

Currently aave-js is super coupled to our graphql types & the aave user interface, but our users aren't necessarily. This introduces usage problems when data comes from other sources.

In the example of formatReserves we expect:

  • a full ReserveData item, although we only need a very small subset
  • the price to be nested for no reason
  • the reference reserve to be an array of reserves containing an array of paramsHistory where the first item is expected to contain the 30dagoData.

I think the 30dago should not be part of that function, the input type should be as narrow as possible and the price should be flat. This would allow us much easier usage of the function even when data comes from the blockchain or other sources instead of thegraph.


Related to #116

sakulstra avatar Mar 15 '21 22:03 sakulstra