@@ -4,7 +4,10 @@ use async_trait::async_trait;
4
4
use dashmap:: DashMap ;
5
5
use drift:: state:: user:: { OrderStatus , User , UserStats } ;
6
6
use drift_sdk:: {
7
- auction_subscriber:: { AuctionSubscriber , AuctionSubscriberConfig } , constants:: PROGRAM_ID as drift_program, event_emitter:: Event , slot_subscriber:: SlotSubscriber , types:: {
7
+ auction_subscriber:: { AuctionSubscriber , AuctionSubscriberConfig } ,
8
+ constants:: PROGRAM_ID as drift_program,
9
+ event_emitter:: Event ,
10
+ types:: {
8
11
CommitmentConfig ,
9
12
MarketType ,
10
13
Order ,
@@ -16,7 +19,7 @@ use solana_sdk::signature::Signature;
16
19
use tokio:: sync:: mpsc:: { self , Receiver , Sender } ;
17
20
use tokio:: task:: JoinHandle ;
18
21
19
- use crate :: jit_proxy_client:: { self , JitIxParams , JitProxyClient } ;
22
+ use crate :: jit_proxy_client:: { JitIxParams , JitProxyClient } ;
20
23
use crate :: JitResult ;
21
24
22
25
@@ -35,7 +38,7 @@ fn log_details(order: &Order) {
35
38
}
36
39
37
40
#[ inline( always) ]
38
- fn check_err ( err : String , order_sig : String ) -> Option < u8 > {
41
+ fn check_err ( err : String , order_sig : String ) -> Option < ( ) > {
39
42
if err. contains ( "0x1770" ) || err. contains ( "0x1771" ) {
40
43
log:: error!( "Order: {} does not cross params yet, retrying" , order_sig) ;
41
44
None
@@ -47,10 +50,10 @@ fn check_err(err: String, order_sig: String) -> Option<u8> {
47
50
None
48
51
} else if err. contains ( "0x1772" ) {
49
52
log:: error!( "Order: {} already filled" , order_sig) ;
50
- Some ( 1 )
53
+ Some ( ( ) )
51
54
} else {
52
55
log:: error!( "Error: {}" , err) ;
53
- Some ( 2 )
56
+ Some ( ( ) )
54
57
}
55
58
}
56
59
@@ -61,7 +64,6 @@ pub struct JitParams {
61
64
min_position : i64 ,
62
65
max_position : i64 ,
63
66
price_type : PriceType ,
64
- sub_account_id : Option < u16 > ,
65
67
}
66
68
67
69
impl JitParams {
@@ -71,15 +73,13 @@ impl JitParams {
71
73
min_position : i64 ,
72
74
max_position : i64 ,
73
75
price_type : PriceType ,
74
- sub_account_id : Option < u16 > ,
75
76
) -> Self {
76
77
Self {
77
78
bid,
78
79
ask,
79
80
min_position,
80
81
max_position,
81
82
price_type,
82
- sub_account_id,
83
83
}
84
84
}
85
85
}
0 commit comments