mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 06:02:36 +03:00
add lock order expiration = 4 days
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.22.0-rc9",
|
||||
"version": "0.22.0-rc10",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.22.0-rc9",
|
||||
"version": "0.22.0-rc10",
|
||||
"hasInstallScript": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.22.0-rc9",
|
||||
"version": "0.22.0-rc10",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -8,7 +8,9 @@ import getDomainData from './getDomainData.js';
|
||||
import generateSecret from '../utils/generateSecret';
|
||||
import { getOrderHash } from './hashOrder';
|
||||
|
||||
const DEFAULT_EXPIRATION = 29 * 24 * 60 * 60 * 1000; // 29 days
|
||||
const DAY = 24 * 60 * 60 * 1000;
|
||||
const LOCK_ORDER_EXPIRATION = 4 * DAY;
|
||||
const DEFAULT_EXPIRATION = 29 * DAY;
|
||||
|
||||
export type SignOrderProps = {
|
||||
baseAssetAddress: string
|
||||
@@ -82,7 +84,7 @@ export const signOrder = async ({
|
||||
limitOrder: order,
|
||||
chainId: Number(chainId),
|
||||
secretHash,
|
||||
lockOrderExpiration: expiration // TODO: change to fillAndLockAtomic data
|
||||
lockOrderExpiration: LOCK_ORDER_EXPIRATION
|
||||
}
|
||||
|
||||
// TODO: change what to show
|
||||
@@ -107,7 +109,7 @@ export const signOrder = async ({
|
||||
targetChainId: Number(targetChainId)
|
||||
}
|
||||
: {}),
|
||||
lockOrderExpiration: expiration
|
||||
lockOrderExpiration: LOCK_ORDER_EXPIRATION
|
||||
}
|
||||
const orderHash = getOrderHash(signedOrderWithoutId, chainId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user