update signLockOrder

This commit is contained in:
TheJuze
2024-05-22 12:02:16 +03:00
parent 132399c422
commit cc928e47eb
6 changed files with 11 additions and 8 deletions

View File

@@ -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' },
],
};

View File

@@ -44,6 +44,7 @@ export const signLockOrder = async ({
BigNumber.ROUND_FLOOR,
)),
targetChainId,
secretHash
};
const signature = await signer.signTypedData(

View File

@@ -69,11 +69,11 @@ export const signOrder = async ({
)),
nonce,
expiration,
// ...(isCrossChain
// ? {
// targetChainId
// }
// : {}),
...(isCrossChain
? {
targetChainId
}
: {}),
buySide: side === 'BUY' ? 1 : 0,
};

View File

@@ -62,6 +62,7 @@ export type LockOrder = {
asset: string // address(?)
amount: number // uint64
targetChainId: SupportedChainId // uint64
secretHash: string // bytes32
}
type SignedOrderAdditionalProps = {