helium / blockchain-etl

Blockchain follower that follows and stores the Helium blockchain
Apache License 2.0
64 stars 37 forks source link

large integers in JSON should be strings #163

Closed allenan closed 3 years ago

allenan commented 3 years ago

JS doesn't have a native way to handle large integers.

Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers

for timestamps with ms precision such as in the witness_info object, the convention is to return them as strings and let the client decide how to turn those into big integers using a library such as biginteger.js for example.

madninja commented 3 years ago

Note that in the fix above this will only happen for newly inserted witnesses @allenan