@@ -21,7 +21,7 @@ library RegisterIntentLib {
2121
2222 bytes32 constant STANDARD_ORDER_BATCH_COMPACT_TYPE_HASH = keccak256 (
2323 bytes (
24- "BatchCompact(address arbiter,address sponsor,uint256 nonce,uint256 expires,Lock[] commitments,Mandate mandate)Lock(bytes12 lockTag,address token,uint256 amount)Mandate(uint32 fillDeadline,address inputOracle,MandateOutput[] outputs)MandateOutput(bytes32 oracle,bytes32 settler,uint256 chainId,bytes32 token,uint256 amount,bytes32 recipient,bytes call ,bytes context) "
24+ "BatchCompact(address arbiter,address sponsor,uint256 nonce,uint256 expires,Lock[] commitments,Mandate mandate)Lock(bytes12 lockTag,address token,uint256 amount)Mandate(uint32 fillDeadline,address inputOracle,MandateOutput[] outputs)MandateOutput(bytes32 oracle,bytes32 settler,uint256 chainId,bytes32 token,uint256 amount,bytes32 recipient,bytes callbackData ,bytes context) "
2525 )
2626 );
2727
@@ -42,7 +42,7 @@ library RegisterIntentLib {
4242 output.token,
4343 output.amount,
4444 output.recipient,
45- keccak256 (output.call ),
45+ keccak256 (output.callbackData ),
4646 keccak256 (output.context)
4747 )
4848 );
@@ -112,7 +112,10 @@ library RegisterIntentLib {
112112 }
113113 }
114114
115- function compactClaimHash (address settler , StandardOrder calldata order ) internal pure returns (bytes32 ) {
115+ function compactClaimHash (
116+ address settler ,
117+ StandardOrder calldata order
118+ ) internal pure returns (bytes32 ) {
116119 return keccak256 (
117120 abi.encode (
118121 STANDARD_ORDER_BATCH_COMPACT_TYPE_HASH,
@@ -133,7 +136,10 @@ library RegisterIntentLib {
133136 if (block .chainid != originChainId) revert WrongChain (block .chainid , originChainId);
134137 }
135138
136- function _validateExpiry (uint32 fillDeadline , uint32 expires ) internal view {
139+ function _validateExpiry (
140+ uint32 fillDeadline ,
141+ uint32 expires
142+ ) internal view {
137143 // Check if the fill deadline has been passed
138144 if (block .timestamp > fillDeadline) revert DeadlinePassed ();
139145 // Check if expiry has been passed
@@ -163,14 +169,15 @@ library RegisterIntentLib {
163169 }
164170 }
165171
166- (claimHash,) = TheCompact (COMPACT).batchDepositAndRegisterFor (
167- order.user,
168- idsAndAmounts,
169- arbiter,
170- order.nonce,
171- order.expires,
172- STANDARD_ORDER_BATCH_COMPACT_TYPE_HASH,
173- witnessHash (order)
174- );
172+ (claimHash,) = TheCompact (COMPACT)
173+ .batchDepositAndRegisterFor (
174+ order.user,
175+ idsAndAmounts,
176+ arbiter,
177+ order.nonce,
178+ order.expires,
179+ STANDARD_ORDER_BATCH_COMPACT_TYPE_HASH,
180+ witnessHash (order)
181+ );
175182 }
176183}
0 commit comments