mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-04-11 13:38:38 +03:00
add secret hash field
This commit is contained in:
@@ -3,7 +3,8 @@ import subOrderStatuses from './subOrderStatuses.js';
|
||||
const orderStatuses = [
|
||||
...subOrderStatuses,
|
||||
'ROUTING', // order got sub orders, but not all of them have status ACCEPTED
|
||||
'TRANSFER' // TX_PENDING > TRANSFER > SETTLED
|
||||
'TRANSFER', // TX_PENDING > TRANSFER > SETTLED
|
||||
'REFUNDED' // TX_PENDING > TRANSFER > CANCELED > REFUNDED
|
||||
] as const;
|
||||
|
||||
export default orderStatuses;
|
||||
|
||||
@@ -86,6 +86,8 @@ export const fullOrderSchema = z.object({
|
||||
ro: z.boolean().optional(), // is reversed order
|
||||
sc: z.string().optional(), // source chain
|
||||
tc: z.string().optional(), // target chain
|
||||
ir: z.string().optional(), // is refundable
|
||||
sh: z.string().optional(), // secret hash
|
||||
}).transform((val) => ({
|
||||
...val,
|
||||
k: 'full' as const,
|
||||
@@ -109,6 +111,7 @@ export const fullOrderSchema = z.object({
|
||||
isReversedOrder: o.ro,
|
||||
sourceChain: o.sc,
|
||||
targetChain: o.tc,
|
||||
isRefundable: o.ir,
|
||||
subOrders: o.c.map((so) => ({
|
||||
pair: so.P,
|
||||
exchange: so.e,
|
||||
|
||||
Reference in New Issue
Block a user