@@ -923,7 +923,7 @@ pub mod tests {
923923 #[ bon:: builder]
924924 async fn create_sender_allocation_args (
925925 pgpool : PgPool ,
926- sender_aggregator_endpoint : String ,
926+ sender_aggregator_endpoint : Option < String > ,
927927 escrow_subgraph_endpoint : & str ,
928928 #[ builder( default = 1000 ) ] rav_request_receipt_limit : u64 ,
929929 sender_account : Option < ActorRef < SenderAccountMessage > > ,
@@ -948,7 +948,8 @@ pub mod tests {
948948 None => create_mock_sender_account ( ) . await . 1 ,
949949 } ;
950950
951- let endpoint = Endpoint :: new ( sender_aggregator_endpoint. to_string ( ) ) . unwrap ( ) ;
951+ let endpoint =
952+ Endpoint :: new ( sender_aggregator_endpoint. unwrap_or ( get_grpc_url ( ) . await ) ) . unwrap ( ) ;
952953
953954 let sender_aggregator = TapAggregatorClient :: connect ( endpoint. clone ( ) )
954955 . await
@@ -987,7 +988,7 @@ pub mod tests {
987988 ) -> ( ActorRef < SenderAllocationMessage > , Arc < Notify > ) {
988989 let args = create_sender_allocation_args ( )
989990 . pgpool ( pgpool)
990- . sender_aggregator_endpoint ( sender_aggregator_endpoint. unwrap_or ( get_grpc_url ( ) . await ) )
991+ . maybe_sender_aggregator_endpoint ( sender_aggregator_endpoint)
991992 . escrow_subgraph_endpoint ( escrow_subgraph_endpoint)
992993 . sender_account ( sender_account. unwrap ( ) )
993994 . rav_request_receipt_limit ( rav_request_receipt_limit)
@@ -1453,7 +1454,6 @@ pub mod tests {
14531454
14541455 let args = create_sender_allocation_args ( )
14551456 . pgpool ( pgpool. clone ( ) )
1456- . sender_aggregator_endpoint ( get_grpc_url ( ) . await )
14571457 . escrow_subgraph_endpoint ( & mock_escrow_subgraph_server. uri ( ) )
14581458 . call ( )
14591459 . await ;
@@ -1479,7 +1479,6 @@ pub mod tests {
14791479 let ( mock_escrow_subgraph_server, _mock_ecrow_subgraph) = mock_escrow_subgraph ( ) . await ;
14801480 let args = create_sender_allocation_args ( )
14811481 . pgpool ( pgpool. clone ( ) )
1482- . sender_aggregator_endpoint ( get_grpc_url ( ) . await )
14831482 . escrow_subgraph_endpoint ( & mock_escrow_subgraph_server. uri ( ) )
14841483 . call ( )
14851484 . await ;
@@ -1511,7 +1510,6 @@ pub mod tests {
15111510 let ( mock_escrow_subgraph_server, _mock_ecrow_subgraph) = mock_escrow_subgraph ( ) . await ;
15121511 let args = create_sender_allocation_args ( )
15131512 . pgpool ( pgpool. clone ( ) )
1514- . sender_aggregator_endpoint ( get_grpc_url ( ) . await )
15151513 . escrow_subgraph_endpoint ( & mock_escrow_subgraph_server. uri ( ) )
15161514 . call ( )
15171515 . await ;
@@ -1543,7 +1541,6 @@ pub mod tests {
15431541
15441542 let args = create_sender_allocation_args ( )
15451543 . pgpool ( pgpool. clone ( ) )
1546- . sender_aggregator_endpoint ( get_grpc_url ( ) . await )
15471544 . escrow_subgraph_endpoint ( & mock_escrow_subgraph_server. uri ( ) )
15481545 . call ( )
15491546 . await ;
@@ -1577,7 +1574,6 @@ pub mod tests {
15771574 let ( mock_escrow_subgraph_server, _mock_ecrow_subgraph) = mock_escrow_subgraph ( ) . await ;
15781575 let args = create_sender_allocation_args ( )
15791576 . pgpool ( pgpool. clone ( ) )
1580- . sender_aggregator_endpoint ( get_grpc_url ( ) . await )
15811577 . escrow_subgraph_endpoint ( & mock_escrow_subgraph_server. uri ( ) )
15821578 . call ( )
15831579 . await ;
@@ -1618,7 +1614,6 @@ pub mod tests {
16181614
16191615 let args = create_sender_allocation_args ( )
16201616 . pgpool ( pgpool. clone ( ) )
1621- . sender_aggregator_endpoint ( get_grpc_url ( ) . await )
16221617 . escrow_subgraph_endpoint ( & mock_escrow_subgraph_server. uri ( ) )
16231618 . call ( )
16241619 . await ;
@@ -1649,7 +1644,6 @@ pub mod tests {
16491644 // Create a sender_allocation.
16501645 let ( sender_allocation, notify) = create_sender_allocation ( )
16511646 . pgpool ( pgpool. clone ( ) )
1652- . sender_aggregator_endpoint ( get_grpc_url ( ) . await )
16531647 . escrow_subgraph_endpoint ( & mock_escrow_subgraph_server. uri ( ) )
16541648 . sender_account ( sender_account)
16551649 . call ( )
@@ -1736,7 +1730,6 @@ pub mod tests {
17361730
17371731 let ( sender_allocation, notify) = create_sender_allocation ( )
17381732 . pgpool ( pgpool. clone ( ) )
1739- . sender_aggregator_endpoint ( get_grpc_url ( ) . await )
17401733 . escrow_subgraph_endpoint ( & mock_server. uri ( ) )
17411734 . sender_account ( sender_account)
17421735 . call ( )
0 commit comments