From 9439d2a5a949c11e8f8675afa579e32e62f596a3 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 15 May 2023 12:23:50 -0400 Subject: [PATCH] Fixing bigint serialization. (#120) --- src/http.ts | 2 +- src/websocket.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http.ts b/src/http.ts index 7f46f70..ef1c917 100644 --- a/src/http.ts +++ b/src/http.ts @@ -132,7 +132,7 @@ import { UploadImage, UploadImageResponse, VERSION } from "./types/others"; // @ts-ignore BigInt.prototype["toJSON"] = function () { - return this.toString(); + return parseInt(this.toString()); }; enum HttpType { diff --git a/src/websocket.ts b/src/websocket.ts index d661776..cbb3779 100644 --- a/src/websocket.ts +++ b/src/websocket.ts @@ -89,7 +89,7 @@ import { VerifyEmail } from "./types/VerifyEmail"; // @ts-ignore BigInt.prototype["toJSON"] = function () { - return this.toString(); + return parseInt(this.toString()); }; /**