Skip to content

Commit

Permalink
Merge pull request #98 from hashgreen/feature/bytes-string
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender authored Nov 22, 2023
2 parents 784a281 + 1ba22d6 commit 8a6d1af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/types/bytes.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ type Bytes []byte

// String Converts to hex string
func (b Bytes) String() string {
if len(b) == 0 {
return ""
}

return fmt.Sprintf("0x%s", hex.EncodeToString(b))
}

Expand Down

0 comments on commit 8a6d1af

Please sign in to comment.