update swapinfo schema

This commit is contained in:
TheJuze
2024-05-16 18:26:50 +03:00
parent ef099f3f63
commit 14c2f3bb5f
3 changed files with 6 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import { z } from 'zod';
import uppercasedNetworkCodes from '../../../constants/uppercasedNetworkCodes';
const orderInfoSchema = z.object({
assetPair: z.string().toUpperCase(),
@@ -50,6 +51,8 @@ const swapInfoBase = z.object({
d: z.string().optional(), // difference in available amount in/out (USD) and market amount out/in (USD) in percentage
}).optional(),
autoSlippage: z.number().optional(),
sourceChain: z.enum(uppercasedNetworkCodes).optional(),
targetChain: z.enum(uppercasedNetworkCodes).optional(),
});
const swapInfoByAmountIn = swapInfoBase.extend({