paulmillr/noble-hashes

Conversion from "BigInt" to "number" is not allowed (not the exponential issue)

khoanguyen-yang opened this issue · 2 comments

I got this error inside @noble/hashes. Got to know the same error message but for the exponential operator but I do not think it has anything relevant to mine.

Really appreciate any advice.

image

You need to provide a code that would reproduce the issue.

I did not directly use your lib. It is used by another one which is @solana/web3.js. sha512 is used specifically

This is what I got from the stacktrace.

Image 1: Inside sha512.js , the method split method of u64 is called
Image 2: The split method then uses fromBig which has the BigInt conversion to Number which throws the above error.

I am using this on React Native so I think this error might not relevant to your repo. But if you have any advice, I would really appreciate.

image

image