mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-25 07:07:39 +03:00
fix: zod
This commit is contained in:
@@ -41,9 +41,9 @@ const swapInfoBase = z.object({
|
||||
}).array(),
|
||||
assetNameMapping: z.record(z.string()).optional(), // address to ERC20 names
|
||||
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
|
||||
mo: z.number(), // market amount out, USD
|
||||
mo: z.number().optional(), // market amount out, 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
|
||||
}).optional(),
|
||||
|
||||
@@ -42,9 +42,9 @@ const swapInfoSchemaBase = baseMessageSchema.extend({
|
||||
f: factorySchema, // factory
|
||||
})),
|
||||
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
|
||||
mo: z.number(), // market amount out, USD
|
||||
mo: z.number().optional(), // market amount out, 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
|
||||
}).optional(),
|
||||
|
||||
@@ -198,9 +198,9 @@ export type SwapInfoBase = {
|
||||
alternatives: SwapInfoAlternative[]
|
||||
assetsNameMapping?: Partial<Record<string, string>> | undefined
|
||||
usdInfo: {
|
||||
availableAmountIn: number
|
||||
availableAmountIn: number | undefined
|
||||
availableAmountOut: number | undefined
|
||||
marketAmountOut: number
|
||||
marketAmountOut: number | undefined
|
||||
marketAmountIn: number | undefined
|
||||
difference: string | undefined
|
||||
} | undefined
|
||||
|
||||
Reference in New Issue
Block a user