From 643a2c846981f705b8d826684c6d3eec71e966a3 Mon Sep 17 00:00:00 2001 From: Kirill Litvinov Date: Tue, 28 Nov 2023 06:47:32 +0500 Subject: [PATCH] fix: types --- package.json | 2 +- src/services/Aggregator/schemas/swapInfoSchema.ts | 2 +- src/services/Aggregator/ws/schemas/swapInfoSchema.ts | 2 +- src/types.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 04d614d..3d5ece1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.20.24-rc1", + "version": "0.20.24-rc2", "description": "Orion Protocol SDK", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/services/Aggregator/schemas/swapInfoSchema.ts b/src/services/Aggregator/schemas/swapInfoSchema.ts index d29c82a..85a85a9 100644 --- a/src/services/Aggregator/schemas/swapInfoSchema.ts +++ b/src/services/Aggregator/schemas/swapInfoSchema.ts @@ -45,7 +45,7 @@ const swapInfoBase = z.object({ aao: z.number().optional(), // available amount out, USD mo: z.number(), // market amount out, USD mi: z.number().optional(), // market amount in, USD - d: z.number().optional(), // difference in available amount in/out (USD) and market amount out/in (USD) in percentage + d: z.string().optional(), // difference in available amount in/out (USD) and market amount out/in (USD) in percentage }).optional(), }); diff --git a/src/services/Aggregator/ws/schemas/swapInfoSchema.ts b/src/services/Aggregator/ws/schemas/swapInfoSchema.ts index a38e783..44d1bd5 100644 --- a/src/services/Aggregator/ws/schemas/swapInfoSchema.ts +++ b/src/services/Aggregator/ws/schemas/swapInfoSchema.ts @@ -46,7 +46,7 @@ const swapInfoSchemaBase = baseMessageSchema.extend({ aao: z.number().optional(), // available amount out, USD mo: z.number(), // market amount out, USD mi: z.number().optional(), // market amount in, USD - d: z.number().optional(), // difference in available amount in/out (USD) and market amount out/in (USD) in percentage + d: z.string().optional(), // difference in available amount in/out (USD) and market amount out/in (USD) in percentage }).optional(), }); diff --git a/src/types.ts b/src/types.ts index 39ab935..5882e9a 100644 --- a/src/types.ts +++ b/src/types.ts @@ -202,7 +202,7 @@ export type SwapInfoBase = { availableAmountOut?: number marketAmountIn: number marketAmountOut?: number - difference: number + difference: string } }