mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-18 03:45:02 +03:00
update orderTypes.ts
This commit is contained in:
@@ -1,10 +1,23 @@
|
||||
const ORDER_TYPES = {
|
||||
export const ORDER_TYPES = {
|
||||
CrossChainOrder: [
|
||||
{ name: 'limitOrder', type: 'bytes32' },
|
||||
{ name: 'limitOrder', type: 'Order' },
|
||||
{ name: 'chainId', type: 'uint24' },
|
||||
{ name: 'secretHash', type: 'bytes32' },
|
||||
{ name: 'lockOrderExpiration', type: 'uint64' },
|
||||
],
|
||||
};
|
||||
Order: [
|
||||
{ name: 'senderAddress', type: 'address' },
|
||||
{ name: 'matcherAddress', type: 'address' },
|
||||
{ name: 'baseAsset', type: 'address' },
|
||||
{ name: 'quoteAsset', type: 'address' },
|
||||
{ name: 'matcherFeeAsset', type: 'address' },
|
||||
{ name: 'amount', type: 'uint64' },
|
||||
{ name: 'price', type: 'uint64' },
|
||||
{ name: 'matcherFee', type: 'uint64' },
|
||||
{ name: 'nonce', type: 'uint64' },
|
||||
{ name: 'expiration', type: 'uint64' },
|
||||
{ name: 'buySide', type: 'uint8' },
|
||||
]
|
||||
}
|
||||
|
||||
export default ORDER_TYPES;
|
||||
|
||||
@@ -98,7 +98,7 @@ export const signOrder = async ({
|
||||
)));
|
||||
|
||||
const crossChainOrder = {
|
||||
limitOrder: limitOrderHash,
|
||||
limitOrder: order,
|
||||
chainId: Number(chainId),
|
||||
secretHash,
|
||||
lockOrderExpiration: expiration // TODO: change to fillAndLockAtomic data
|
||||
@@ -115,8 +115,7 @@ export const signOrder = async ({
|
||||
getDomainData(chainId),
|
||||
ORDER_TYPES,
|
||||
{
|
||||
order,
|
||||
...crossChainOrder,
|
||||
crossChainOrder,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user