@@ -105,20 +105,13 @@ struct SymbolResponse {
105
105
pub hermes_id : Option < String > ,
106
106
}
107
107
108
- async fn fetch_symbols (
109
- history_url : & Url ,
110
- token : & str ,
111
- ) -> Result < Vec < SymbolResponse > > {
108
+ async fn fetch_symbols ( history_url : & Url ) -> Result < Vec < SymbolResponse > > {
112
109
let mut url = history_url. clone ( ) ;
113
110
url. set_scheme ( "http" ) . unwrap ( ) ;
114
111
url. set_path ( "/history/v1/symbols" ) ;
115
112
let client = Client :: new ( ) ;
116
113
let response = client
117
114
. get ( url)
118
- . header (
119
- "Authorization" ,
120
- HeaderValue :: from_str ( & format ! ( "Bearer {}" , token) ) ?,
121
- )
122
115
. send ( )
123
116
. await ?
124
117
. text ( )
@@ -129,6 +122,7 @@ async fn fetch_symbols(
129
122
#[ instrument( skip( config, state) ) ]
130
123
pub fn lazer_exporter ( config : Config , state : Arc < state:: State > ) -> Vec < JoinHandle < ( ) > >
131
124
{
125
+ // TODO: add loop to handle relayer failure/retry
132
126
let mut handles = Vec :: new ( ) ;
133
127
handles. push ( tokio:: spawn ( lazer_exporter:: lazer_exporter ( config. clone ( ) , state) ) ) ;
134
128
handles
@@ -151,7 +145,7 @@ mod lazer_exporter {
151
145
S : Send + Sync + ' static ,
152
146
{
153
147
// TODO: Re-fetch on an interval?
154
- let lazer_symbols: HashMap < String , SymbolResponse > = match fetch_symbols ( & config. history_url , & config . authorization_token ) . await {
148
+ let lazer_symbols: HashMap < String , SymbolResponse > = match fetch_symbols ( & config. history_url ) . await {
155
149
Ok ( symbols) => symbols. into_iter ( ) . filter_map ( |symbol| {
156
150
symbol. hermes_id . clone ( ) . map ( |id| ( id, symbol) )
157
151
} ) . collect ( ) ,
@@ -201,6 +195,7 @@ mod lazer_exporter {
201
195
tracing:: error!( "Error receiving message from at relayer {relayer_url}: {e:?}" ) ;
202
196
}
203
197
None => {
198
+ // TODO: Probably still appropriate to return here, but retry in caller.
204
199
tracing:: error!( "relayer connection closed" ) ;
205
200
return ;
206
201
}
0 commit comments