mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-13 21:52:36 +03:00
fix schemas
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.20.86",
|
||||
"version": "0.20.88-rc2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.20.86",
|
||||
"version": "0.20.88-rc2",
|
||||
"hasInstallScript": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.20.88-rc1",
|
||||
"version": "0.20.88-rc2",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -52,13 +52,11 @@ const swapInfoBase = z.object({
|
||||
autoSlippage: z.number().optional(),
|
||||
});
|
||||
|
||||
const swapInfoByAmountIn = swapInfoBase.extend({
|
||||
const swapInfoSchema = swapInfoBase.extend({
|
||||
availableAmountOut: z.null(),
|
||||
availableAmountIn: z.number(),
|
||||
marketAmountOut: z.number().nullable(),
|
||||
marketAmountIn: z.null(),
|
||||
});
|
||||
|
||||
const swapInfoSchema = swapInfoByAmountIn;
|
||||
|
||||
export default swapInfoSchema;
|
||||
|
||||
@@ -51,12 +51,9 @@ const swapInfoSchemaBase = baseMessageSchema.extend({
|
||||
sl: z.number().optional(),
|
||||
});
|
||||
|
||||
const swapInfoSchemaByAmountIn = swapInfoSchemaBase.extend({
|
||||
const swapInfoSchema = swapInfoSchemaBase.extend({
|
||||
mo: z.number().optional(), // market amount out
|
||||
aa: z.number(), // available amount in
|
||||
});
|
||||
|
||||
|
||||
const swapInfoSchema = swapInfoSchemaByAmountIn;
|
||||
|
||||
export default swapInfoSchema;
|
||||
|
||||
@@ -213,13 +213,11 @@ export type SwapInfoBase = {
|
||||
autoSlippage: number | undefined
|
||||
}
|
||||
|
||||
export type SwapInfoByAmountIn = SwapInfoBase & {
|
||||
export type SwapInfo = SwapInfoBase & {
|
||||
availableAmountIn?: number | undefined
|
||||
marketAmountOut?: number | undefined
|
||||
}
|
||||
|
||||
export type SwapInfo = SwapInfoByAmountIn;
|
||||
|
||||
export enum HistoryTransactionStatus {
|
||||
PENDING = 'Pending',
|
||||
DONE = 'Done',
|
||||
|
||||
Reference in New Issue
Block a user