i have an rpc call that returns an array of structs with multiple fields, one of which is balance of an asset for a user, balance type is u128. when the number is large i get this error createType(u128):: Number needs to be an integer <= Number.MAX_SAFE_INTEGER<= Number.MAX_SAFE_INTEGER
, i.e. 2 ^ 53 - 1. I have tried specifying different types to make it cast to u128 but rpc kept failing. CURL for the rpc works in terminal and returns large numbers. Seems like the problem on JS, what can i do to be able to be to parse the structs such that the value of balance is a valid number, possibly a BigInt? Thank you!
Became Hot Network Question