mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-17 08:41:38 +03:00
Add new stop limit schemas
This commit is contained in:
@@ -25,6 +25,7 @@ export const signCFDOrder = async (
|
||||
usePersonalSign: boolean,
|
||||
signer: ethers.Signer,
|
||||
chainId: SupportedChainId,
|
||||
stopPrice: BigNumber.Value | undefined,
|
||||
) => {
|
||||
const nonce = Date.now();
|
||||
const expiration = nonce + DEFAULT_EXPIRATION;
|
||||
@@ -51,6 +52,13 @@ export const signCFDOrder = async (
|
||||
nonce,
|
||||
expiration,
|
||||
buySide: side === 'BUY' ? 1 : 0,
|
||||
stopPrice: stopPrice !== undefined
|
||||
? normalizeNumber(
|
||||
stopPrice,
|
||||
INTERNAL_ORION_PRECISION,
|
||||
BigNumber.ROUND_FLOOR,
|
||||
).toNumber()
|
||||
: undefined,
|
||||
isPersonalSign: usePersonalSign,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user