OP-2818 [Swap] Show order route path and benefits in Swap UI

Updated SwapInfo schemas for WS and REST.
Small type updates.
This commit is contained in:
Mikhail Gladchenko
2022-12-14 08:24:05 +00:00
parent ab59310645
commit b4634b98f0
2 changed files with 5 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.15.22-rc.0",
"version": "0.15.22-rc.1",
"description": "Orion Protocol SDK",
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",

View File

@@ -25,11 +25,11 @@ const swapInfoSchemaBase = baseMessageSchema.extend({
as: z.object({ // execution alternatives
e: z.string().array(), // exchanges
ps: z.string().array(), // path
mo: z.number().nullable(), // market amount out
mi: z.number().nullable(), // market amount in
mo: z.number().optional(), // market amount out
mi: z.number().optional(), // market amount in
mp: z.number(), // market price
aa: z.number().nullable(), // available amount in
aao: z.number().nullable(), // available amount out
aa: z.number().optional(), // available amount in
aao: z.number().optional(), // available amount out
}).array(),
});