Skip to content

Commit

Permalink
fix(common): redundant store_cache removed (#472)
Browse files Browse the repository at this point in the history
* fix(common): redundant store_cache removed

* fix(common): ipc provider address is not an url

---------

Co-authored-by: Jonathan Becker <[email protected]>
  • Loading branch information
fala13 and Jon-Becker authored Jul 28, 2024
1 parent 9133646 commit e50c086
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions crates/common/src/ether/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ impl MultiTransportProvider {
return Err(eyre::eyre!("No RPC URL provided"));
}

let url = Url::from_str(rpc_url)?;

let this = if rpc_url.to_lowercase().contains("http") {
let url = Url::from_str(rpc_url)?;
Self::Http(ProviderBuilder::new().on_http(url))
} else if rpc_url.to_lowercase().contains("ws") {
let ws = WsConnect::new(rpc_url);
Expand Down
6 changes: 1 addition & 5 deletions crates/common/src/ether/signatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{
},
};
use eyre::{OptionExt, Result};
use heimdall_cache::{store_cache, with_cache};
use heimdall_cache::with_cache;
use serde::{Deserialize, Serialize};
use tracing::trace;

Expand Down Expand Up @@ -267,10 +267,6 @@ impl ResolveSelector for ResolvedFunction {
});
}

// cache the results
let _ = store_cache(&format!("selector.{selector}"), &signature_list, None)
.map_err(|e| trace!("error storing signatures in cache: {}", e));

Ok(match signature_list.len() {
0 => None,
_ => Some(signature_list),
Expand Down

0 comments on commit e50c086

Please sign in to comment.