mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-15 06:32:37 +03:00
add to signOrder secretHash only if targetChainId exist
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.20.42-rc4",
|
||||
"version": "0.20.42-rc5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.20.42-rc4",
|
||||
"version": "0.20.42-rc5",
|
||||
"hasInstallScript": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.20.42-rc4",
|
||||
"version": "0.20.42-rc5",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/index.cjs",
|
||||
"module": "./lib/index.js",
|
||||
|
||||
@@ -55,8 +55,12 @@ export const signOrder = async (
|
||||
)),
|
||||
nonce,
|
||||
expiration,
|
||||
secretHash,
|
||||
targetChainId,
|
||||
...(targetChainId !== undefined
|
||||
? {
|
||||
secretHash,
|
||||
targetChainId
|
||||
}
|
||||
: {}),
|
||||
buySide: side === 'BUY' ? 1 : 0,
|
||||
};
|
||||
|
||||
|
||||
@@ -49,9 +49,9 @@ export type Order = {
|
||||
matcherFee: number // uint64
|
||||
nonce: number // uint64
|
||||
expiration: number // uint64
|
||||
secretHash: string // uint64
|
||||
buySide: 0 | 1 // uint8, 1=buy, 0=sell
|
||||
targetChainId: ethers.BigNumberish | undefined // uint64
|
||||
secretHash?: string // uint64
|
||||
targetChainId?: ethers.BigNumberish // uint64
|
||||
}
|
||||
|
||||
export type LockOrder = {
|
||||
|
||||
Reference in New Issue
Block a user