diff --git a/v4-client-js/__native__/__ios__/v4-native-client.js b/v4-client-js/__native__/__ios__/v4-native-client.js index b7d36c80..82eb65b1 100644 --- a/v4-client-js/__native__/__ios__/v4-native-client.js +++ b/v4-client-js/__native__/__ios__/v4-native-client.js @@ -202360,7 +202360,7 @@ function encodeJson(object, byteArrayEncoding = ByteArrayEncoding.HEX) { if (value instanceof bignumber_js_1.default) { return value.toString(); } - if (value instanceof BigInt) { + if (typeof value === 'bigint') { return value.toString(); } if (value instanceof long_1.default) { @@ -202386,7 +202386,7 @@ function encodeJson(object, byteArrayEncoding = ByteArrayEncoding.HEX) { }); } exports.encodeJson = encodeJson; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9saWIvaGVscGVycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSwrQ0FBeUM7QUFDekMsZ0VBQXFDO0FBQ3JDLGdEQUF3QjtBQUd4QiwyQ0FBK0M7QUFFL0M7Ozs7O0dBS0c7QUFDSCxTQUFnQixzQ0FBc0MsQ0FDcEQseUJBQXFEO0lBRXJELElBQUkseUJBQXlCLEtBQUssU0FBUyxFQUFFO1FBQzNDLE9BQU8sU0FBUyxDQUFDO0tBQ2xCO0lBRUQsT0FBTztRQUNMLFFBQVEsRUFBRSw0QkFBZ0I7UUFDMUIsR0FBRyx5QkFBeUI7S0FDN0IsQ0FBQztBQUNKLENBQUM7QUFYRCx3RkFXQztBQUVEOzs7OztHQUtHO0FBQ0gsU0FBZ0IsY0FBYyxDQUFDLEtBQWE7SUFDMUMsSUFBSSxLQUFLLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsRUFBRTtRQUM3QixPQUFPLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUM7S0FDdkI7SUFFR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FBSyxFQUFDLEtBQUssQ0FBQyxNQUFNLENBQUMsQ0FBQzthQUM1QjtpQkFBTTtnQkFDTCxPQUFPLFFBQVEsQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUMsUUFBUSxFQUFFLENBQUM7YUFDMUM7U0FDRjthQUFNLElBQUksS0FBSyxZQUFZLFVBQVUsRUFBRTtZQUN0QyxJQUFJLGlCQUFpQixLQUFLLGlCQUFpQixDQUFDLEdBQUcsRUFBRTtnQkFDL0MsT0FBTyxJQUFBLGdCQUFLLEVBQUMsS0FBSyxDQUFDLENBQUM7YUFDckI7aUJBQU07Z0JBQ0wsT0FBTyxRQUFRLENBQUMsS0FBSyxDQUFDLENBQUMsUUFBUSxFQUFFLENBQUM7YUFDbkM7U0FDRjtRQUNELE9BQU8sS0FBSyxDQUFDO0lBQ2YsQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDO0FBaENELGdDQWdDQyJ9 /***/ }), diff --git a/v4-client-js/package-lock.json b/v4-client-js/package-lock.json index aec7c397..3352e963 100644 --- a/v4-client-js/package-lock.json +++ b/v4-client-js/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dydxprotocol/v4-client-js", - "version": "1.0.14", + "version": "1.0.15", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@dydxprotocol/v4-client-js", - "version": "1.0.14", + "version": "1.0.15", "license": "AGPL-3.0", "dependencies": { "@cosmjs/amino": "^0.32.1", diff --git a/v4-client-js/package.json b/v4-client-js/package.json index a1dbb6fc..2678c380 100644 --- a/v4-client-js/package.json +++ b/v4-client-js/package.json @@ -1,6 +1,6 @@ { "name": "@dydxprotocol/v4-client-js", - "version": "1.0.14", + "version": "1.0.15", "description": "General client library for the new dYdX system (v4 decentralized)", "main": "build/src/index.js", "scripts": { diff --git a/v4-client-js/src/clients/native.ts b/v4-client-js/src/clients/native.ts index a5721755..0f2ba014 100644 --- a/v4-client-js/src/clients/native.ts +++ b/v4-client-js/src/clients/native.ts @@ -1112,7 +1112,7 @@ export async function withdrawToNobleIBC(payload: string): Promise { ...parsedIbcPayload.msg, // Squid returns timeoutTimestamp as Long, but the signer expects BigInt timeoutTimestamp: parsedIbcPayload.msg.timeoutTimestamp - ? BigInt(Long.fromValue(json.msg.timeoutTimestamp).toString()) + ? BigInt(Long.fromValue(parsedIbcPayload.msg.timeoutTimestamp).toString()) : undefined, }, }; diff --git a/v4-client-js/src/lib/helpers.ts b/v4-client-js/src/lib/helpers.ts index 942616da..fd7ea0b6 100644 --- a/v4-client-js/src/lib/helpers.ts +++ b/v4-client-js/src/lib/helpers.ts @@ -65,7 +65,7 @@ export function encodeJson( if (value instanceof BigNumber) { return value.toString(); } - if (value instanceof BigInt) { + if (typeof value === 'bigint') { return value.toString(); } if (value instanceof Long) {