Skip to content

Commit

Permalink
Merge 5174c91 into ffdfb2e
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig authored Dec 20, 2024
2 parents ffdfb2e + 5174c91 commit f1001f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/beacon-node/src/util/graffiti.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export function toGraffitiBuffer(graffiti: string): Buffer {
* Converts a graffiti from 32 bytes buffer back to a UTF-8 string
*/
export function fromGraffitiBuffer(graffiti: Uint8Array): string {
return Buffer.from(graffiti.buffer, graffiti.byteOffset, graffiti.byteLength).toString("utf8");
return Buffer.from(graffiti.buffer, graffiti.byteOffset, graffiti.byteLength)
.toString("utf8")
.replaceAll("\u0000", "");
}

export function getDefaultGraffiti(
Expand Down

0 comments on commit f1001f9

Please sign in to comment.