66
77use {
88 super :: {
9- super :: adapter,
109 Conf ,
1110 NotifyPrice ,
1211 NotifyPriceSched ,
1312 Price ,
1413 Pubkey ,
1514 SubscriptionID ,
1615 } ,
16+ crate :: agent:: state,
1717 anyhow:: {
1818 anyhow,
1919 Result ,
@@ -120,7 +120,7 @@ async fn handle_connection<S>(
120120 notify_price_sched_tx_buffer : usize ,
121121 logger : Logger ,
122122) where
123- S : adapter :: AdapterApi ,
123+ S : state :: StateApi ,
124124 S : Send ,
125125 S : Sync ,
126126 S : ' static ,
@@ -168,7 +168,7 @@ async fn handle_next<S>(
168168 notify_price_sched_rx : & mut mpsc:: Receiver < NotifyPriceSched > ,
169169) -> Result < ( ) >
170170where
171- S : adapter :: AdapterApi ,
171+ S : state :: StateApi ,
172172{
173173 tokio:: select! {
174174 msg = ws_rx. next( ) => {
@@ -210,7 +210,7 @@ async fn handle<S>(
210210 msg : Message ,
211211) -> Result < ( ) >
212212where
213- S : adapter :: AdapterApi ,
213+ S : state :: StateApi ,
214214{
215215 // Ignore control and binary messages
216216 if !msg. is_text ( ) {
@@ -296,7 +296,7 @@ async fn dispatch_and_catch_error<S>(
296296 request : & Request < Method , Value > ,
297297) -> Response < serde_json:: Value >
298298where
299- S : adapter :: AdapterApi ,
299+ S : state :: StateApi ,
300300{
301301 debug ! (
302302 logger,
@@ -436,7 +436,7 @@ pub async fn run<S>(
436436 adapter : Arc < S > ,
437437 shutdown_rx : broadcast:: Receiver < ( ) > ,
438438) where
439- S : adapter :: AdapterApi ,
439+ S : state :: StateApi ,
440440 S : Send ,
441441 S : Sync ,
442442 S : ' static ,
@@ -454,7 +454,7 @@ async fn serve<S>(
454454 mut shutdown_rx : broadcast:: Receiver < ( ) > ,
455455) -> Result < ( ) >
456456where
457- S : adapter :: AdapterApi ,
457+ S : state :: StateApi ,
458458 S : Send ,
459459 S : Sync ,
460460 S : ' static ,
0 commit comments