diff --git a/src/utils/JSONUtils.ts b/src/utils/JSONUtils.ts index 407d582e..7b45b4f6 100644 --- a/src/utils/JSONUtils.ts +++ b/src/utils/JSONUtils.ts @@ -53,7 +53,7 @@ export function jsonReplacerWithBigNumbers(_key: string, value: unknown): unknow // We need to check if this is a big number, because the JSON parser // is not aware of BigNumbers and will convert them to the string representation // of the object itself which is not what we want. - if (BigNumber.isBigNumber(value)) { + if (BigNumber.isBigNumber(value) || typeof value === "bigint") { return value.toString(); } // There's a legacy issues that returns BigNumbers as { type: "BigNumber", hex: "0x..." }