File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
crates/swapper/src/jupiter Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ prices:
4848 url : " https://hermes.pyth.network"
4949 timer : 60
5050 jupiter :
51- url : " https://lite-api.jup.ag "
51+ url : " "
5252 timer : 60
5353charter :
5454 timer : 60
Original file line number Diff line number Diff line change 1- use super :: { client:: JupiterClient , provider:: JUPITER_API_URL , provider:: Jupiter } ;
2- use crate :: alien:: { RpcClient , RpcProvider } ;
1+ use super :: { client:: JupiterClient , provider:: Jupiter } ;
2+ use crate :: {
3+ alien:: { RpcClient , RpcProvider } ,
4+ config,
5+ } ;
36use gem_jsonrpc:: client:: JsonRpcClient ;
47use primitives:: Chain ;
58use std:: sync:: Arc ;
69
710impl Jupiter < RpcClient , RpcClient > {
811 pub fn new ( provider : Arc < dyn RpcProvider > ) -> Self {
9- let http_client = JupiterClient :: new ( RpcClient :: new ( JUPITER_API_URL . into ( ) , provider. clone ( ) ) ) ;
12+ let url = config:: get_swap_api_url ( "jupiter" ) ;
13+ let http_client = JupiterClient :: new ( RpcClient :: new ( url, provider. clone ( ) ) ) ;
1014 let solana_endpoint = provider
1115 . get_endpoint ( Chain :: Solana )
1216 . expect ( "Failed to get Solana endpoint for Jupiter provider" ) ;
Original file line number Diff line number Diff line change @@ -19,8 +19,6 @@ use gem_solana::{
1919use primitives:: { AssetId , Chain } ;
2020use std:: collections:: HashSet ;
2121
22- pub ( crate ) const JUPITER_API_URL : & str = "https://lite-api.jup.ag" ;
23-
2422#[ derive( Debug ) ]
2523pub struct Jupiter < C , R >
2624where
4745 }
4846 }
4947
50- pub fn api_url ( ) -> & ' static str {
51- JUPITER_API_URL
52- }
53-
5448 pub fn get_asset_address ( & self , asset_id : & str ) -> Result < String , SwapperError > {
5549 get_pubkey_by_str ( asset_id)
5650 . map ( |x| x. to_string ( ) )
You can’t perform that action at this time.
0 commit comments