Skip to content

Commit

Permalink
add to signOrder secretHash only if targetChainId exist
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJuze committed Jan 19, 2024
1 parent 72e1e94 commit 330fc51
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 6 additions & 2 deletions src/crypt/signOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ export const signOrder = async (
)),
nonce,
expiration,
secretHash,
targetChainId,
...(targetChainId !== undefined
? {
secretHash,
targetChainId
}
: {}),
buySide: side === 'BUY' ? 1 : 0,
};

Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 330fc51

Please sign in to comment.