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

v3 suggestions

Open sakulstra opened this issue 3 years ago • 0 comments

I thought it makes sense to collect some things we might wanna fix in a potential v3 so that we can batch some breaking changes.

Dedicated entry points

We currently got a single entry point exporting {...v2, ...common, v1, v2} we do that because the library has historically grown and tsdx doesn't support multiple entry points. In the future though it would be nice if we could offer entrypoints for v1/v2/common instead.

https://github.com/developit/microbundle

Flat input types

Our current functions are very much tied to the graphql types. While that makes sense in most occasions a lot of people have problems using this library as they don't necessarily use the graphql data.

Better comment & descriptions

We get a lot of issues reported via discord/telegram and so on, where people are confused about e.g. what format they have to provide for usdPriceEth. Would be nice if we would display examples for these things inside the editor.

Less type conversions

BigNumberValue sounds like a good idea ux wise but isn't necessarily one perf wise. We do a lot of unnecessary bignumber constructs. Might make sense to look into having explicit types. Or optimize our functions to reuse BigNumbers instead of recreating them.

drop axios

we should use sth like isomorphic fetch as axios is quite fat

sakulstra avatar Mar 08 '21 14:03 sakulstra