@@ -52,8 +52,6 @@ pub enum MaxMakerVolRpcError {
52
52
} ,
53
53
#[ display( fmt = "No such coin {}" , coin) ]
54
54
NoSuchCoin { coin : String } ,
55
- #[ display( fmt = "Coin {} is wallet only" , coin) ]
56
- CoinIsWalletOnly { coin : String } ,
57
55
#[ display( fmt = "Transport error: {}" , _0) ]
58
56
Transport ( String ) ,
59
57
#[ display( fmt = "Internal error: {}" , _0) ]
@@ -111,11 +109,10 @@ impl From<CheckBalanceError> for MaxMakerVolRpcError {
111
109
impl HttpStatusCode for MaxMakerVolRpcError {
112
110
fn status_code ( & self ) -> StatusCode {
113
111
match self {
112
+ MaxMakerVolRpcError :: NoSuchCoin { .. } => StatusCode :: NOT_FOUND ,
114
113
MaxMakerVolRpcError :: NotSufficientBalance { .. }
115
114
| MaxMakerVolRpcError :: NotSufficientBaseCoinBalance { .. }
116
- | MaxMakerVolRpcError :: VolumeTooLow { .. }
117
- | MaxMakerVolRpcError :: NoSuchCoin { .. }
118
- | MaxMakerVolRpcError :: CoinIsWalletOnly { .. } => StatusCode :: BAD_REQUEST ,
115
+ | MaxMakerVolRpcError :: VolumeTooLow { .. } => StatusCode :: BAD_REQUEST ,
119
116
MaxMakerVolRpcError :: Transport ( _) | MaxMakerVolRpcError :: InternalError ( _) => {
120
117
StatusCode :: INTERNAL_SERVER_ERROR
121
118
} ,
@@ -138,14 +135,12 @@ pub struct MaxMakerVolResponse {
138
135
139
136
pub async fn max_maker_vol ( ctx : MmArc , req : MaxMakerVolRequest ) -> MmResult < MaxMakerVolResponse , MaxMakerVolRpcError > {
140
137
let coin = lp_coinfind_or_err ( & ctx, & req. coin ) . await ?;
141
- if coin. wallet_only ( & ctx) {
142
- return MmError :: err ( MaxMakerVolRpcError :: CoinIsWalletOnly { coin : req. coin } ) ;
143
- }
144
138
let CoinVolumeInfo {
145
139
volume,
146
140
balance,
147
141
locked_by_swaps,
148
142
} = get_max_maker_vol ( & ctx, & coin) . await ?;
143
+
149
144
Ok ( MaxMakerVolResponse {
150
145
coin : req. coin ,
151
146
volume : MmNumberMultiRepr :: from ( volume) ,
0 commit comments