yearn / yearn-sdk

🦧 SDK for the yearn.finance platform. WIP
https://npm.im/@yfi/sdk
MIT License
53 stars 56 forks source link

Handle different formats of timestamps for earnings #244

Closed jstashh closed 2 years ago

jstashh commented 2 years ago

https://github.com/yearn/yearn-sdk/blob/master/src/interfaces/earnings.ts#L260

The arbitrum subgraph has been deployed with timestamps for VaultDayData that are in formats like: 1642723200000000

They should be normalized to ms timestamps i.e. 1641948793000, so we should correct it when necessary, if the timestamp's length is too long