This commit is contained in:
TheJuze
2024-05-28 19:46:37 +03:00
parent 3cb95bb8df
commit 677f99a2ff
3 changed files with 12 additions and 5 deletions

4
package-lock.json generated
View File

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

View File

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

View File

@@ -37,7 +37,7 @@ export const signOrder = async ({
targetChainId,
chainId,
price
}: SignOrderProps) => {
}: SignOrderProps): Promise<SignedOrder> => {
const nonce = Date.now();
const expiration = nonce + DEFAULT_EXPIRATION;
@@ -131,7 +131,14 @@ export const signOrder = async ({
...order,
id: limitOrderHash, // TODO: change to orderHash
signature: fixedSignature,
...(isCrossChain ? { secret, secretHash, targetChainId: Number(targetChainId), lockOrderExpiration: expiration } : {})
...(isCrossChain
? {
secret,
secretHash,
targetChainId: Number(targetChainId),
lockOrderExpiration: expiration
}
: {})
};
return signedOrder;
};