mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-30 01:27:57 +03:00
update signLockOrder
This commit is contained in:
@@ -6,5 +6,6 @@ export const LOCK_ORDER_TYPES = {
|
||||
{ name: 'asset', type: 'string' },
|
||||
{ name: 'amount', type: 'uint64' },
|
||||
{ name: 'targetChainId', type: 'uint64' },
|
||||
{ name: 'secretHash', type: 'bytes32' },
|
||||
],
|
||||
};
|
||||
|
||||
@@ -44,6 +44,7 @@ export const signLockOrder = async ({
|
||||
BigNumber.ROUND_FLOOR,
|
||||
)),
|
||||
targetChainId,
|
||||
secretHash
|
||||
};
|
||||
|
||||
const signature = await signer.signTypedData(
|
||||
|
||||
@@ -69,11 +69,11 @@ export const signOrder = async ({
|
||||
)),
|
||||
nonce,
|
||||
expiration,
|
||||
// ...(isCrossChain
|
||||
// ? {
|
||||
// targetChainId
|
||||
// }
|
||||
// : {}),
|
||||
...(isCrossChain
|
||||
? {
|
||||
targetChainId
|
||||
}
|
||||
: {}),
|
||||
buySide: side === 'BUY' ? 1 : 0,
|
||||
};
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ export type LockOrder = {
|
||||
asset: string // address(?)
|
||||
amount: number // uint64
|
||||
targetChainId: SupportedChainId // uint64
|
||||
secretHash: string // bytes32
|
||||
}
|
||||
|
||||
type SignedOrderAdditionalProps = {
|
||||
|
||||
Reference in New Issue
Block a user