mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-22 21:59:44 +03:00
Added isReversedOrder param
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@orionprotocol/sdk",
|
"name": "@orionprotocol/sdk",
|
||||||
"version": "0.19.19",
|
"version": "0.19.20",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@orionprotocol/sdk",
|
"name": "@orionprotocol/sdk",
|
||||||
"version": "0.19.19",
|
"version": "0.19.20",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.21.0",
|
"@babel/runtime": "^7.21.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@orionprotocol/sdk",
|
"name": "@orionprotocol/sdk",
|
||||||
"version": "0.19.19",
|
"version": "0.19.20",
|
||||||
"description": "Orion Protocol SDK",
|
"description": "Orion Protocol SDK",
|
||||||
"main": "./lib/index.cjs",
|
"main": "./lib/index.cjs",
|
||||||
"module": "./lib/index.js",
|
"module": "./lib/index.js",
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ export const signOrder = async (
|
|||||||
usePersonalSign: boolean,
|
usePersonalSign: boolean,
|
||||||
signer: ethers.Signer,
|
signer: ethers.Signer,
|
||||||
chainId: SupportedChainId,
|
chainId: SupportedChainId,
|
||||||
|
isReversedOrder = false
|
||||||
) => {
|
) => {
|
||||||
const nonce = Date.now();
|
const nonce = Date.now();
|
||||||
const expiration = nonce + DEFAULT_EXPIRATION;
|
const expiration = nonce + DEFAULT_EXPIRATION;
|
||||||
@@ -56,6 +57,7 @@ export const signOrder = async (
|
|||||||
expiration,
|
expiration,
|
||||||
buySide: side === 'BUY' ? 1 : 0,
|
buySide: side === 'BUY' ? 1 : 0,
|
||||||
isPersonalSign: usePersonalSign,
|
isPersonalSign: usePersonalSign,
|
||||||
|
isReversedOrder
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ export type Order = {
|
|||||||
expiration: number // uint64
|
expiration: number // uint64
|
||||||
buySide: 0 | 1 // uint8, 1=buy, 0=sell
|
buySide: 0 | 1 // uint8, 1=buy, 0=sell
|
||||||
isPersonalSign: boolean // bool
|
isPersonalSign: boolean // bool
|
||||||
|
isReversedOrder?: boolean | undefined // bool
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CFDOrder = {
|
export type CFDOrder = {
|
||||||
|
|||||||
Reference in New Issue
Block a user