@@ -202,17 +202,17 @@ pub async fn fetch_concentrated_liquidity_pool(
202202 token_2 : Pubkey ,
203203 tick_spacing : u16 ,
204204) -> Result < PoolInfo , Box < dyn Error > > {
205- let whirlpools_config_address = & * WHIRLPOOLS_CONFIG_ADDRESS . try_lock ( ) ?;
205+ let whirlpools_config_address = * WHIRLPOOLS_CONFIG_ADDRESS . try_lock ( ) ?;
206206 let [ token_a, token_b] = order_mints ( token_1, token_2) ;
207207 let whirlpool_address =
208- get_whirlpool_address ( whirlpools_config_address, & token_a, & token_b, tick_spacing) ?. 0 ;
208+ get_whirlpool_address ( & whirlpools_config_address, & token_a, & token_b, tick_spacing) ?. 0 ;
209209
210- let fee_tier_address = get_fee_tier_address ( whirlpools_config_address, tick_spacing) ?;
210+ let fee_tier_address = get_fee_tier_address ( & whirlpools_config_address, tick_spacing) ?;
211211
212212 let account_infos = rpc
213213 . get_multiple_accounts ( & [
214214 whirlpool_address,
215- * whirlpools_config_address,
215+ whirlpools_config_address,
216216 fee_tier_address. 0 ,
217217 token_a,
218218 token_b,
@@ -247,7 +247,7 @@ pub async fn fetch_concentrated_liquidity_pool(
247247 } else {
248248 Ok ( PoolInfo :: Uninitialized ( UninitializedPool {
249249 address : whirlpool_address,
250- whirlpools_config : * whirlpools_config_address,
250+ whirlpools_config : whirlpools_config_address,
251251 tick_spacing,
252252 fee_rate : fee_tier. default_fee_rate ,
253253 protocol_fee_rate : whirlpools_config. default_protocol_fee_rate ,
@@ -315,17 +315,17 @@ pub async fn fetch_whirlpools_by_token_pair(
315315 token_1 : Pubkey ,
316316 token_2 : Pubkey ,
317317) -> Result < Vec < PoolInfo > , Box < dyn Error > > {
318- let whirlpools_config_address = & * WHIRLPOOLS_CONFIG_ADDRESS . try_lock ( ) ?;
318+ let whirlpools_config_address = * WHIRLPOOLS_CONFIG_ADDRESS . try_lock ( ) ?;
319319 let [ token_a, token_b] = order_mints ( token_1, token_2) ;
320320
321321 let fee_tiers = fetch_all_fee_tier_with_filter (
322322 rpc,
323- vec ! [ FeeTierFilter :: WhirlpoolsConfig ( * whirlpools_config_address) ] ,
323+ vec ! [ FeeTierFilter :: WhirlpoolsConfig ( whirlpools_config_address) ] ,
324324 )
325325 . await ?;
326326
327327 let account_infos = rpc
328- . get_multiple_accounts ( & [ * whirlpools_config_address, token_a, token_b] )
328+ . get_multiple_accounts ( & [ whirlpools_config_address, token_a, token_b] )
329329 . await ?;
330330
331331 let whirlpools_config_info = account_infos[ 0 ] . as_ref ( ) . ok_or ( format ! (
@@ -348,7 +348,7 @@ pub async fn fetch_whirlpools_by_token_pair(
348348 . iter ( )
349349 . map ( |fee_tier| fee_tier. data . tick_spacing )
350350 . map ( |tick_spacing| {
351- get_whirlpool_address ( whirlpools_config_address, & token_a, & token_b, tick_spacing)
351+ get_whirlpool_address ( & whirlpools_config_address, & token_a, & token_b, tick_spacing)
352352 } )
353353 . map ( |x| x. map ( |y| y. 0 ) )
354354 . collect :: < Result < Vec < Pubkey > , ProgramError > > ( ) ?;
@@ -368,7 +368,7 @@ pub async fn fetch_whirlpools_by_token_pair(
368368 } else {
369369 whirlpools. push ( PoolInfo :: Uninitialized ( UninitializedPool {
370370 address : pool_address,
371- whirlpools_config : * whirlpools_config_address,
371+ whirlpools_config : whirlpools_config_address,
372372 tick_spacing : fee_tier. data . tick_spacing ,
373373 fee_rate : fee_tier. data . default_fee_rate ,
374374 protocol_fee_rate : whirlpools_config. default_protocol_fee_rate ,
0 commit comments