Added isReversedOrder param

This commit is contained in:
Aleksandr Kraiz
2023-06-02 16:31:37 +04:00
parent db7b9abbe4
commit f2d225a415
4 changed files with 6 additions and 3 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@orionprotocol/sdk",
"version": "0.19.19",
"version": "0.19.20",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@orionprotocol/sdk",
"version": "0.19.19",
"version": "0.19.20",
"license": "ISC",
"dependencies": {
"@babel/runtime": "^7.21.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.19.19",
"version": "0.19.20",
"description": "Orion Protocol SDK",
"main": "./lib/index.cjs",
"module": "./lib/index.js",

View File

@@ -27,6 +27,7 @@ export const signOrder = async (
usePersonalSign: boolean,
signer: ethers.Signer,
chainId: SupportedChainId,
isReversedOrder = false
) => {
const nonce = Date.now();
const expiration = nonce + DEFAULT_EXPIRATION;
@@ -56,6 +57,7 @@ export const signOrder = async (
expiration,
buySide: side === 'BUY' ? 1 : 0,
isPersonalSign: usePersonalSign,
isReversedOrder
};
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions

View File

@@ -71,6 +71,7 @@ export type Order = {
expiration: number // uint64
buySide: 0 | 1 // uint8, 1=buy, 0=sell
isPersonalSign: boolean // bool
isReversedOrder?: boolean | undefined // bool
}
export type CFDOrder = {