change lockOrderExpiration

This commit is contained in:
TheJuze
2024-05-30 16:10:09 +03:00
parent c76597e40f
commit afb8049589
3 changed files with 6 additions and 5 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@orionprotocol/sdk",
"version": "0.22.0-rc11",
"version": "0.22.0-rc12",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@orionprotocol/sdk",
"version": "0.22.0-rc11",
"version": "0.22.0-rc12",
"hasInstallScript": true,
"license": "ISC",
"dependencies": {

View File

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

View File

@@ -43,6 +43,7 @@ export const signOrder = async ({
}: SignOrderProps): Promise<SignedOrder> => {
const nonce = Date.now();
const expiration = nonce + DEFAULT_EXPIRATION;
const lockOrderExpiration = nonce + LOCK_ORDER_EXPIRATION;
const isCrossChain = targetChainId === undefined || targetChainId !== chainId;
@@ -84,7 +85,7 @@ export const signOrder = async ({
limitOrder: order,
chainId: Number(chainId),
secretHash,
lockOrderExpiration: LOCK_ORDER_EXPIRATION
lockOrderExpiration
}
// TODO: change what to show
@@ -109,7 +110,7 @@ export const signOrder = async ({
targetChainId: Number(targetChainId)
}
: {}),
lockOrderExpiration: LOCK_ORDER_EXPIRATION
lockOrderExpiration
}
const orderHash = getOrderHash(signedOrderWithoutId, chainId);