Open shapeshed opened 1 year ago
This can be avoided by removing seconds from the date object so if this is intentional this issue can be closed.
let d = new Date();
d.setSeconds(0, 0);
@Zetazzz is this a telescope issue?
Hi, Yes, I just fixed this by this PR: https://github.com/osmosis-labs/osmojs/issues/68#issuecomment-1744223400
When the
osmojs
library parses a date object to a timestamp on theaccountLockedPastTimeDenom
rpc method, an error is generated within a osmojs helper function due to a floating point number being passed to aBigInt()
.Test case
Here is a simple testcase equating to the following
osmoisd
callI think the issue is in this function
The argument to the
numberToLong
function dividesdate.getTime()
by1_000
and eventually passing this to BigInt() causes an error. This can also be seen in the consoleI think the helpers file is generated by https://github.com/cosmology-tech/telescope but I am unfamiliar with this project. If you can suggest where to find the generated function I can draft a PR if this is a valid issue.