This commit is contained in:
Aleksandr Kraiz
2023-04-12 15:26:44 +04:00
3 changed files with 4 additions and 1 deletions

View File

@@ -26,6 +26,7 @@ export const signCFDOrder = async (
signer: ethers.Signer,
chainId: SupportedChainId,
stopPrice: BigNumber.Value | undefined,
isFromDelegate?: boolean,
) => {
const nonce = Date.now();
const expiration = nonce + DEFAULT_EXPIRATION;
@@ -56,6 +57,7 @@ export const signCFDOrder = async (
? new BigNumber(stopPrice).toNumber()
: undefined,
isPersonalSign: usePersonalSign,
isFromDelegate,
};
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions

View File

@@ -85,6 +85,7 @@ export type CFDOrder = {
buySide: 0 | 1 // uint8, 1=buy, 0=sell
stopPrice?: number | undefined // uint64
isPersonalSign: boolean // bool
isFromDelegate?: boolean | undefined // bool
}
export type SignedCFDOrder = {