Skip to content

Commit

Permalink
Merge branch 'fix-bigint-fields' into 'dev'
Browse files Browse the repository at this point in the history
fix a bug in bigint

See merge request ergo/rosen-bridge/network-client!21
  • Loading branch information
vorujack committed Nov 6, 2023
2 parents 6e2fa56 + 027f661 commit 3a37b3c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion clients/cardano-koios/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rosen-clients/cardano-koios",
"version": "2.0.0",
"version": "2.0.1",
"description": "A client library for Cardano Koios",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions clients/cardano-koios/src/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Axios, { AxiosRequestConfig } from 'axios';
import JsonBigintFactory from 'json-bigint';

const JsonBigInt = JsonBigintFactory({
alwaysParseAsBig: true,
alwaysParseAsBig: false,
useNativeBigInt: true,
});

Expand Down Expand Up @@ -32,7 +32,7 @@ const transformBigInt = (obj: any, bigIntObj: any, field: string): any => {
),
};
}
return { ...obj, [field]: bigIntObj[field] };
return { ...obj, [field]: BigInt(bigIntObj[field]) };
};
export const JsonFieldBigintFactory = (fields: Array<string>) => {
return (data: any) => {
Expand Down
2 changes: 1 addition & 1 deletion clients/ergo-explorer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rosen-clients/ergo-explorer",
"version": "1.0.2",
"version": "1.0.3",
"description": "A client library for Ergo Explorer",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions clients/ergo-explorer/src/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Axios, { AxiosRequestConfig } from 'axios';
import JsonBigintFactory from 'json-bigint';

const JsonBigInt = JsonBigintFactory({
alwaysParseAsBig: true,
alwaysParseAsBig: false,
useNativeBigInt: true,
});

Expand Down Expand Up @@ -32,7 +32,7 @@ const transformBigInt = (obj: any, bigIntObj: any, field: string): any => {
),
};
}
return { ...obj, [field]: bigIntObj[field] };
return { ...obj, [field]: BigInt(bigIntObj[field]) };
};
export const JsonFieldBigintFactory = (fields: Array<string>) => {
return (data: any) => {
Expand Down
2 changes: 1 addition & 1 deletion clients/ergo-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rosen-clients/ergo-node",
"version": "1.0.3",
"version": "1.0.4",
"description": "A client library for Ergo Node",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions clients/ergo-node/src/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Axios, { AxiosRequestConfig } from 'axios';
import JsonBigintFactory from 'json-bigint';

const JsonBigInt = JsonBigintFactory({
alwaysParseAsBig: true,
alwaysParseAsBig: false,
useNativeBigInt: true,
});

Expand Down Expand Up @@ -32,7 +32,7 @@ const transformBigInt = (obj: any, bigIntObj: any, field: string): any => {
),
};
}
return { ...obj, [field]: bigIntObj[field] };
return { ...obj, [field]: BigInt(bigIntObj[field]) };
};
export const JsonFieldBigintFactory = (fields: Array<string>) => {
return (data: any) => {
Expand Down

0 comments on commit 3a37b3c

Please sign in to comment.