INNER CODE UNIT · Rust
get_validator_url
gemwalletcom/wallet · core/crates/block_explorers/src/lib.rs:38
fn get_validator_url(&self, _validator: &str) -> Option<String> {
None
}
fn get_swap_tx_url(&self, input: &ExplorerInput) -> String {
self.get_tx_url(&input.hash)
}
}
pub fn get_block_explorer(chain: Chain, name: &str) -> Box<dyn BlockExplorer> {
let mut explorers = get_block_explorers(chain);
let index = explorers.iter().position(|explorer| explorer.name() == name).unwrap_or_default();
explorers.swap_remove(index)
}
pub fn get_block_explorers(chain: Chain) -> Vec<Box<dyn BlockExplorer>> {
match chain {
Chain::Bitcoin => vec![blockchair::new_bitcoin(), mempool::new(), threexpl::new_bitcoin()],