Fix uifee
This commit is contained in:
@@ -15,17 +15,16 @@ import {getOrderInfo, isOrderForPositionByData, isVisibleOrder} from "../../util
|
|||||||
import {createDecreaseOrderTxn} from "./transactions/createDecreaseOrderTxn.js";
|
import {createDecreaseOrderTxn} from "./transactions/createDecreaseOrderTxn.js";
|
||||||
import {createIncreaseOrderTxn} from "./transactions/createIncreaseOrderTxn.js";
|
import {createIncreaseOrderTxn} from "./transactions/createIncreaseOrderTxn.js";
|
||||||
import {
|
import {
|
||||||
buildGetOrdersMulticall,
|
buildGetOrdersMulticall,
|
||||||
getExecutionFeeAmountForEntry,
|
getExecutionFeeAmountForEntry,
|
||||||
matchByMarket,
|
matchByMarket,
|
||||||
parseGetOrdersResponse
|
parseGetOrdersResponse
|
||||||
} from "./utils.js";
|
} from "./utils.js";
|
||||||
import {Module} from "../base.js";
|
import {Module} from "../base.js";
|
||||||
import {createSwapOrderTxn} from "./transactions/createSwapOrderTxn.js";
|
import {createSwapOrderTxn} from "./transactions/createSwapOrderTxn.js";
|
||||||
import {createWrapOrUnwrapTxn, WrapOrUnwrapParams} from "./transactions/createWrapOrUnwrapTxn.js";
|
import {createWrapOrUnwrapTxn, WrapOrUnwrapParams} from "./transactions/createWrapOrUnwrapTxn.js";
|
||||||
import {cancelOrdersTxn} from "./transactions/cancelOrdersTxn.js";
|
import {cancelOrdersTxn} from "./transactions/cancelOrdersTxn.js";
|
||||||
import {increaseOrderHelper, PositionIncreaseParams, swap, SwapParams} from "./helpers.js";
|
import {increaseOrderHelper, PositionIncreaseParams, swap, SwapParams} from "./helpers.js";
|
||||||
import {DEFAULT_UI_FEE_RECEIVER_ACCOUNT} from "../utils/utils.js";
|
|
||||||
|
|
||||||
export class Orders extends Module {
|
export class Orders extends Module {
|
||||||
async getOrders({
|
async getOrders({
|
||||||
@@ -243,7 +242,6 @@ export class Orders extends Module {
|
|||||||
indexToken: marketInfo.indexToken,
|
indexToken: marketInfo.indexToken,
|
||||||
tokensData,
|
tokensData,
|
||||||
skipSimulation: skipSimulation || isLimit,
|
skipSimulation: skipSimulation || isLimit,
|
||||||
uiFeeReceiver: DEFAULT_UI_FEE_RECEIVER_ACCOUNT,
|
|
||||||
},
|
},
|
||||||
createDecreaseOrderParams: createSltpEntries?.map((entry, i) => {
|
createDecreaseOrderParams: createSltpEntries?.map((entry, i) => {
|
||||||
return {
|
return {
|
||||||
@@ -262,7 +260,6 @@ export class Orders extends Module {
|
|||||||
txnType: entry.txnType!,
|
txnType: entry.txnType!,
|
||||||
skipSimulation: isLimit,
|
skipSimulation: isLimit,
|
||||||
autoCancel: i < autoCancelOrdersLimit,
|
autoCancel: i < autoCancelOrdersLimit,
|
||||||
uiFeeReceiver: DEFAULT_UI_FEE_RECEIVER_ACCOUNT,
|
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
cancelOrderParams: cancelSltpEntries?.map((entry) => ({
|
cancelOrderParams: cancelSltpEntries?.map((entry) => ({
|
||||||
@@ -273,7 +270,6 @@ export class Orders extends Module {
|
|||||||
sizeDeltaUsd: entry.order!.sizeDeltaUsd,
|
sizeDeltaUsd: entry.order!.sizeDeltaUsd,
|
||||||
txnType: entry.txnType!,
|
txnType: entry.txnType!,
|
||||||
initialCollateralDeltaAmount: entry.order?.initialCollateralDeltaAmount ?? 0n,
|
initialCollateralDeltaAmount: entry.order?.initialCollateralDeltaAmount ?? 0n,
|
||||||
uiFeeReceiver: DEFAULT_UI_FEE_RECEIVER_ACCOUNT,
|
|
||||||
})),
|
})),
|
||||||
updateOrderParams: updateSltpEntries?.map((entry) => ({
|
updateOrderParams: updateSltpEntries?.map((entry) => ({
|
||||||
...commonSecondaryOrderParams,
|
...commonSecondaryOrderParams,
|
||||||
@@ -287,7 +283,6 @@ export class Orders extends Module {
|
|||||||
txnType: entry.txnType!,
|
txnType: entry.txnType!,
|
||||||
initialCollateralDeltaAmount: entry.order?.initialCollateralDeltaAmount ?? 0n,
|
initialCollateralDeltaAmount: entry.order?.initialCollateralDeltaAmount ?? 0n,
|
||||||
autoCancel: entry.order!.autoCancel,
|
autoCancel: entry.order!.autoCancel,
|
||||||
uiFeeReceiver: DEFAULT_UI_FEE_RECEIVER_ACCOUNT,
|
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ type IncreaseOrderParams = {
|
|||||||
referralCode: string | undefined;
|
referralCode: string | undefined;
|
||||||
indexToken: TokenData;
|
indexToken: TokenData;
|
||||||
tokensData: TokensData;
|
tokensData: TokensData;
|
||||||
uiFeeReceiver: string;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type SecondaryOrderCommonParams = {
|
type SecondaryOrderCommonParams = {
|
||||||
|
|||||||
Reference in New Issue
Block a user