serum-ts
serum-ts copied to clipboard
fix: bn overflow error
most of the time calling toNumber()
would result in Number can only safely store up to 53 bits
, workaround is to just call toString()
into Number()
I've seen it as well, would be great to have it fixed in the lib directly, could be someone setting orders with very large prices that causes that? not sure.
@armaniferrante, can help take a look with this? Some serum orderbook break when fetching l2 because of large number, this would mitigate it
@ZhengYuTay I think this fix is incorrect in away not preserving decimal places, I think https://github.com/MikeMcl/big.js/ should be used instead for making division?
@armaniferrante I think order ids like 340282366920938463463374607431743501208
for example can trigger this issue.