Skip to content

Commit ef6cd73

Browse files
committed
Serialize byte[] as hex string by default for WebGL
1 parent c1e5c5e commit ef6cd73

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Assets/Thirdweb/Core/Scripts/Utils.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@ public static string[] ToJsonStringArray(params object[] args)
3232
{
3333
continue;
3434
}
35+
// if bytes, make hex
36+
if (args[i] is byte[])
37+
{
38+
stringArgs.Add(ByteArrayToHexString(args[i] as byte[]));
39+
}
3540
// if value type, convert to string otherwise serialize to json
36-
if (args[i].GetType().IsPrimitive || args[i] is string)
41+
else if (args[i].GetType().IsPrimitive || args[i] is string)
3742
{
3843
stringArgs.Add(args[i].ToString());
3944
}

0 commit comments

Comments
 (0)