Skip to content

Mutation bug in bytesToBigInt #4202

@gabrocheleau

Description

@gabrocheleau

Usage of reverse on the bytes mutates the input:

export const bytesToBigInt = (bytes: Uint8Array, littleEndian = false): bigint => {
  if (littleEndian) {
    bytes.reverse()
  }

Will address in a follow up PR

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions