update OrderSource type

This commit is contained in:
Kirill Litvinov
2024-01-22 19:10:51 +03:00
parent 769719293f
commit a8a11184ef
4 changed files with 7 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ import errorSchema from './schemas/errorSchema.js';
import placeAtomicSwapSchema from './schemas/placeAtomicSwapSchema.js';
import { AggregatorWS } from './ws/index.js';
import { atomicSwapHistorySchema } from './schemas/atomicSwapHistorySchema.js';
import type { BasicAuthCredentials, SignedCancelOrderRequest, SignedOrder } from '../../types.js';
import type { BasicAuthCredentials, OrderSource, SignedCancelOrderRequest, SignedOrder } from '../../types.js';
import {
pairConfigSchema, aggregatedOrderbookSchema,
exchangeOrderbookSchema, poolReservesSchema,
@@ -196,8 +196,7 @@ class Aggregator {
isCreateInternalOrder: boolean,
isReversedOrder?: boolean,
partnerId?: string,
fromWidget?: boolean,
source?: 'TERMINAL_MARKET' | 'TERMINAL_LIMIT' | 'SWAP_UI',
source?: OrderSource,
rawExchangeRestrictions?: string | undefined,
) => {
const headers = {
@@ -207,7 +206,6 @@ class Aggregator {
'X-Reverse-Order': isReversedOrder ? 'true' : 'false',
},
...(partnerId !== undefined) && { 'X-Partner-Id': partnerId },
...(fromWidget !== undefined) && { 'X-From-Widget': fromWidget ? 'true' : 'false' },
...(source !== undefined) && { 'X-Source': source },
...this.basicAuthHeaders,
};

View File

@@ -452,3 +452,5 @@ export type AtomicSwap = Partial<
refundTx?: TransactionInfo | undefined
liquidityMigrationTx?: TransactionInfo | undefined
}
export type OrderSource = 'TERMINAL_MARKET' | 'TERMINAL_LIMIT' | 'SWAP_UI' | 'WIDGET';