This commit is contained in:
Kirill Litvinov
2023-11-28 07:31:20 +05:00
parent 5e932276e7
commit 6c770f41f0
4 changed files with 7 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@orionprotocol/sdk", "name": "@orionprotocol/sdk",
"version": "0.20.24-rc3", "version": "0.20.24-rc4",
"description": "Orion Protocol SDK", "description": "Orion Protocol SDK",
"main": "./lib/index.cjs", "main": "./lib/index.cjs",
"module": "./lib/index.js", "module": "./lib/index.js",

View File

@@ -41,9 +41,9 @@ const swapInfoBase = z.object({
}).array(), }).array(),
assetNameMapping: z.record(z.string()).optional(), // address to ERC20 names assetNameMapping: z.record(z.string()).optional(), // address to ERC20 names
usd: z.object({ // USD info of this swap, nullable usd: z.object({ // USD info of this swap, nullable
aa: z.number(), // available amount in, USD aa: z.number().optional(), // available amount in, USD
aao: z.number().optional(), // available amount out, USD aao: z.number().optional(), // available amount out, USD
mo: z.number(), // market amount out, USD mo: z.number().optional(), // market amount out, USD
mi: z.number().optional(), // market amount in, USD mi: z.number().optional(), // market amount in, USD
d: z.string().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(), }).optional(),

View File

@@ -42,9 +42,9 @@ const swapInfoSchemaBase = baseMessageSchema.extend({
f: factorySchema, // factory f: factorySchema, // factory
})), })),
usd: z.object({ // USD info of this swap, nullable usd: z.object({ // USD info of this swap, nullable
aa: z.number(), // available amount in, USD aa: z.number().optional(), // available amount in, USD
aao: z.number().optional(), // available amount out, USD aao: z.number().optional(), // available amount out, USD
mo: z.number(), // market amount out, USD mo: z.number().optional(), // market amount out, USD
mi: z.number().optional(), // market amount in, USD mi: z.number().optional(), // market amount in, USD
d: z.string().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(), }).optional(),

View File

@@ -198,9 +198,9 @@ export type SwapInfoBase = {
alternatives: SwapInfoAlternative[] alternatives: SwapInfoAlternative[]
assetsNameMapping?: Partial<Record<string, string>> | undefined assetsNameMapping?: Partial<Record<string, string>> | undefined
usdInfo: { usdInfo: {
availableAmountIn: number availableAmountIn: number | undefined
availableAmountOut: number | undefined availableAmountOut: number | undefined
marketAmountOut: number marketAmountOut: number | undefined
marketAmountIn: number | undefined marketAmountIn: number | undefined
difference: string | undefined difference: string | undefined
} | undefined } | undefined