@@ -18,6 +18,7 @@ use axum::{
1818} ;
1919use tap_core:: {
2020 manager:: { adapters:: ReceiptStore , Manager } ,
21+ rav:: ReceiptAggregateVoucher ,
2122 receipt:: { Context , SignedReceipt } ,
2223} ;
2324use tower_http:: auth:: AsyncAuthorizeRequest ;
@@ -30,7 +31,7 @@ use crate::{error::IndexerServiceError, middleware::prometheus_metrics::MetricLa
3031///
3132/// Requires SignedReceipt, MetricLabels and Arc<Context> extensions
3233pub fn tap_receipt_authorize < T , B > (
33- tap_manager : Arc < Manager < T > > ,
34+ tap_manager : Arc < Manager < T , SignedReceipt , ReceiptAggregateVoucher > > ,
3435 failed_receipt_metric : & ' static prometheus:: CounterVec ,
3536) -> impl AsyncAuthorizeRequest <
3637 B ,
@@ -40,7 +41,7 @@ pub fn tap_receipt_authorize<T, B>(
4041> + Clone
4142 + Send
4243where
43- T : ReceiptStore + Sync + Send + ' static ,
44+ T : ReceiptStore < SignedReceipt > + Sync + Send + ' static ,
4445 B : Send ,
4546{
4647 move |request : Request < B > | {
@@ -91,7 +92,7 @@ mod tests {
9192 receipt:: {
9293 checks:: { Check , CheckError , CheckList , CheckResult } ,
9394 state:: Checking ,
94- ReceiptWithState ,
95+ ReceiptWithState , SignedReceipt ,
9596 } ,
9697 } ;
9798 use test_assets:: {
@@ -133,11 +134,11 @@ mod tests {
133134
134135 struct MyCheck ;
135136 #[ async_trait:: async_trait]
136- impl Check for MyCheck {
137+ impl Check < SignedReceipt > for MyCheck {
137138 async fn check (
138139 & self ,
139140 _: & tap_core:: receipt:: Context ,
140- receipt : & ReceiptWithState < Checking > ,
141+ receipt : & ReceiptWithState < Checking , SignedReceipt > ,
141142 ) -> CheckResult {
142143 if receipt. signed_receipt ( ) . message . nonce == FAILED_NONCE {
143144 Err ( CheckError :: Failed ( anyhow:: anyhow!( "Failed" ) ) )
0 commit comments