@@ -37,7 +37,6 @@ use std::{
3737} ;
3838
3939use tap_eip712_message:: Eip712Error ;
40- use thegraph_core:: alloy:: dyn_abi:: Eip712Domain ;
4140
4241use super :: {
4342 state:: { Checking , Failed } ,
@@ -97,7 +96,6 @@ type CheckBatchResponse<Rcpt> = (
9796pub trait CheckBatch < Rcpt > {
9897 fn check_batch (
9998 & self ,
100- domain_separator : & Eip712Domain ,
10199 receipts : Vec < ReceiptWithState < Checking , Rcpt > > ,
102100 ) -> Result < CheckBatchResponse < Rcpt > , Eip712Error > ;
103101}
@@ -157,7 +155,6 @@ where
157155{
158156 fn check_batch (
159157 & self ,
160- _domain_separator : & Eip712Domain ,
161158 receipts : Vec < ReceiptWithState < Checking , Rcpt > > ,
162159 ) -> Result < CheckBatchResponse < Rcpt > , Eip712Error > {
163160 let ( mut checking, mut failed) = ( vec ! [ ] , vec ! [ ] ) ;
@@ -189,14 +186,13 @@ where
189186{
190187 fn check_batch (
191188 & self ,
192- domain_separator : & Eip712Domain ,
193189 receipts : Vec < ReceiptWithState < Checking , Rcpt > > ,
194190 ) -> Result < CheckBatchResponse < Rcpt > , Eip712Error > {
195191 let mut signatures = HashSet :: new ( ) ;
196192 let ( mut checking, mut failed) = ( vec ! [ ] , vec ! [ ] ) ;
197193
198194 for received_receipt in receipts. into_iter ( ) {
199- let unique_id = received_receipt. receipt . unique_id ( domain_separator ) ? ;
195+ let unique_id = received_receipt. receipt . unique_id ( ) ;
200196 if signatures. insert ( unique_id) {
201197 checking. push ( received_receipt) ;
202198 } else {
@@ -277,10 +273,7 @@ mod tests {
277273 let signed_receipt_2 = create_signed_receipt_with_custom_value ( 15 ) ;
278274 let signed_receipt_copy = signed_receipt. clone ( ) ;
279275 let receipts_batch = vec ! [ signed_receipt, signed_receipt_2, signed_receipt_copy] ;
280- let domain_separator = create_test_domain_separator ( ) ;
281- let ( valid_receipts, invalid_receipts) = UniqueCheck
282- . check_batch ( & domain_separator, receipts_batch)
283- . unwrap ( ) ;
276+ let ( valid_receipts, invalid_receipts) = UniqueCheck . check_batch ( receipts_batch) . unwrap ( ) ;
284277 assert_eq ! ( valid_receipts. len( ) , 2 ) ;
285278 assert_eq ! ( invalid_receipts. len( ) , 1 ) ;
286279 }
@@ -290,12 +283,10 @@ mod tests {
290283 let signed_receipt = create_signed_receipt_with_custom_value ( 10 ) ;
291284 let signed_receipt_2 = create_signed_receipt_with_custom_value ( 15 ) ;
292285
293- let domain_separator = create_test_domain_separator ( ) ;
294-
295286 let receipts_batch = vec ! [ signed_receipt. clone( ) , signed_receipt_2] ;
296287 let min_time_stamp = signed_receipt. receipt . message . timestamp_ns + 1 ;
297288 let ( valid_receipts, invalid_receipts) = TimestampCheck ( min_time_stamp)
298- . check_batch ( & domain_separator , receipts_batch)
289+ . check_batch ( receipts_batch)
299290 . unwrap ( ) ;
300291 assert_eq ! ( valid_receipts. len( ) , 1 ) ;
301292 assert_eq ! ( invalid_receipts. len( ) , 1 ) ;
0 commit comments