File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -948,8 +948,12 @@ pub mod tests {
948948 None => create_mock_sender_account ( ) . await . 1 ,
949949 } ;
950950
951- let endpoint =
952- Endpoint :: new ( sender_aggregator_endpoint. unwrap_or ( get_grpc_url ( ) . await ) ) . unwrap ( ) ;
951+ let aggregator_url = match sender_aggregator_endpoint {
952+ Some ( url) => url,
953+ None => get_grpc_url ( ) . await ,
954+ } ;
955+
956+ let endpoint = Endpoint :: new ( aggregator_url) . unwrap ( ) ;
953957
954958 let sender_aggregator = TapAggregatorClient :: connect ( endpoint. clone ( ) )
955959 . await
Original file line number Diff line number Diff line change @@ -144,6 +144,11 @@ pub async fn create_sender_account(
144144 PREFIX_ID . fetch_add( 1 , std:: sync:: atomic:: Ordering :: SeqCst )
145145 ) ;
146146
147+ let aggregator_url = match aggregator_endpoint {
148+ Some ( url) => url,
149+ None => Url :: parse ( & get_grpc_url ( ) . await ) . unwrap ( ) ,
150+ } ;
151+
147152 let args = SenderAccountArgs {
148153 config,
149154 pgpool,
@@ -153,8 +158,7 @@ pub async fn create_sender_account(
153158 escrow_subgraph,
154159 network_subgraph,
155160 domain_separator : TAP_EIP712_DOMAIN_SEPARATOR . clone ( ) ,
156- sender_aggregator_endpoint : aggregator_endpoint
157- . unwrap_or ( Url :: parse ( & get_grpc_url ( ) . await ) . unwrap ( ) ) ,
161+ sender_aggregator_endpoint : aggregator_url,
158162 allocation_ids : HashSet :: new ( ) ,
159163 prefix : Some ( prefix. clone ( ) ) ,
160164 retry_interval : RETRY_DURATION ,
You can’t perform that action at this time.
0 commit comments