File tree Expand file tree Collapse file tree
crates/gem_hypercore/src/rpc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,9 +158,7 @@ impl<C: Client> HyperCoreClient<C> {
158158 "type" : "clearinghouseState" ,
159159 "user" : user
160160 } ) ;
161- if let Some ( dex) = dex
162- && !dex. is_empty ( )
163- {
161+ if let Some ( dex) = dex && !dex. is_empty ( ) {
164162 payload[ "dex" ] = json ! ( dex) ;
165163 }
166164 self . info ( payload) . await
@@ -172,9 +170,7 @@ impl<C: Client> HyperCoreClient<C> {
172170
173171 pub async fn get_metadata_with_dex ( & self , dex : Option < String > ) -> Result < HypercoreMetadataResponse , Box < dyn Error + Send + Sync > > {
174172 let mut payload = json ! ( { "type" : "metaAndAssetCtxs" } ) ;
175- if let Some ( dex) = dex
176- && !dex. is_empty ( )
177- {
173+ if let Some ( dex) = dex && !dex. is_empty ( ) {
178174 payload[ "dex" ] = json ! ( dex) ;
179175 }
180176 self . info ( payload) . await
@@ -276,9 +272,7 @@ impl<C: Client> HyperCoreClient<C> {
276272 "type" : "frontendOpenOrders" ,
277273 "user" : user
278274 } ) ;
279- if let Some ( dex) = dex
280- && !dex. is_empty ( )
281- {
275+ if let Some ( dex) = dex && !dex. is_empty ( ) {
282276 payload[ "dex" ] = json ! ( dex) ;
283277 }
284278 self . info ( payload) . await
@@ -293,9 +287,7 @@ impl<C: Client> HyperCoreClient<C> {
293287 "type" : "portfolio" ,
294288 "user" : user
295289 } ) ;
296- if let Some ( dex) = dex
297- && !dex. is_empty ( )
298- {
290+ if let Some ( dex) = dex && !dex. is_empty ( ) {
299291 payload[ "dex" ] = json ! ( dex) ;
300292 }
301293 self . info ( payload) . await
You can’t perform that action at this time.
0 commit comments