Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

toHex is not supporting passing Uint8Array #6957

@mpetrunic

Description

@mpetrunic

Expected behavior

toHex(new Uint8Array([
221, 128, 128, 128, 148, 186, 248,
242, 159, 130, 231, 84, 254, 199,
252, 69, 21, 58, 104, 102, 201,
137, 255, 3, 196, 10, 128, 128,
128, 128
])) = 0xdd80808094baf8f29f82e754fec7fc45153a6866c989ff03c40a80808080

Actual behavior

It gets Json.stringified first and results in:
0x7b2230223a3232312c2231223a3132382c2232223a3132382c2233223a3132382c2234223a3134382c2235223a3138362c2236223a3234382c2237223a3234322c2238223a3135392c2239223a3133302c223130223a3233312c223131223a38342c223132223a3235342c223133223a3139392c223134223a3235322c223135223a36392c223136223a32312c223137223a35382c223138223a3130342c223139223a3130322c223230223a3230312c223231223a3133372c223232223a3235352c223233223a332c223234223a3139362c223235223a31302c223236223a3132382c223237223a3132382c223238223a3132382c223239223a3132387d

Steps to reproduce the behavior

  1. [First step]
  2. [Second step]
  3. [and so on...]

Logs

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions