Skip to content

Commit 6864e8e

Browse files
Merge main into release
2 parents 278c165 + a56058a commit 6864e8e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/common/utils.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,18 @@ function objectToMapRecursive(obj: any): any {
9090
}
9191

9292
return new Map(
93-
Object.entries(obj).map(([key, value]) => [
94-
key,
95-
objectToMapRecursive(value),
96-
]),
93+
Object.entries(obj).map(([key, value]) => {
94+
let processedValue = value;
95+
96+
// Convert string to bigint if key is "uint" and value is a numeric string
97+
if (key === 'uint' && typeof value === 'string' && /^\d+$/.test(value)) {
98+
processedValue = BigInt(value);
99+
} else {
100+
processedValue = objectToMapRecursive(value);
101+
}
102+
103+
return [key, processedValue];
104+
}),
97105
);
98106
}
99107

0 commit comments

Comments
 (0)