fix: bigInt (#472)

This commit is contained in:
Cas 2023-06-07 18:44:34 +02:00 committed by GitHub
parent a6bb919268
commit d7061f73b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,7 +323,7 @@ function toUInt64 (n) {
if (n > MAX_UINT || typeof n === 'string') {
const buf = new Uint8Array(8)
const view = new DataView(buf.buffer)
view.setBigUint64(0, n)
view.setBigUint64(0, BigInt(n))
return buf
}
return concat([new Uint8Array(4), common.toUInt32(n)])