Skip to content

Commit

Permalink
fix(ts-sdk): get rid of spread operator for Uint8Array (aptos-labs#3806)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Porteous (dport) <[email protected]>
  • Loading branch information
jjleng and banool authored Sep 2, 2022
1 parent 7cc52b4 commit ddff6a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ecosystem/typescript/sdk/src/bytes_to_hex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* @returns
*/
export const bytesToHex = (buffer: Uint8Array): string =>
[...buffer].map((x) => x.toString(16).padStart(2, "0")).join("");
Array.from(buffer)
.map((x) => x.toString(16).padStart(2, "0"))
.join("");

/**
* Checks if a string is a valid string of hex characters.
Expand Down

0 comments on commit ddff6a0

Please sign in to comment.