From 66b53405aaa85dc9b8b182c2ad6128faae70ee14 Mon Sep 17 00:00:00 2001 From: akhercha Date: Sat, 2 Nov 2024 18:27:30 +0100 Subject: [PATCH] =?UTF-8?q?dev(better=5Ftheoros):=20=F0=9F=94=A8=20nitpick?= =?UTF-8?q?ing=20optis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rust/theoros/src/rpc/evm/mod.rs | 4 ++-- rust/theoros/src/types/calldata.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/theoros/src/rpc/evm/mod.rs b/rust/theoros/src/rpc/evm/mod.rs index ecc159d..9ea948a 100644 --- a/rust/theoros/src/rpc/evm/mod.rs +++ b/rust/theoros/src/rpc/evm/mod.rs @@ -32,8 +32,8 @@ impl HyperlaneValidatorsMapping { } /// Get the available validators for a chain & their indexes - pub fn get_validators(&self, chain_name: &EvmChainName) -> Option> { - self.0.get(chain_name).cloned() + pub fn get_validators(&self, chain_name: &EvmChainName) -> Option<&HashMap> { + self.0.get(chain_name) } /// Get all configured chains names diff --git a/rust/theoros/src/types/calldata.rs b/rust/theoros/src/types/calldata.rs index 424d5fd..ca5cd37 100644 --- a/rust/theoros/src/types/calldata.rs +++ b/rust/theoros/src/types/calldata.rs @@ -1,4 +1,4 @@ -use std::{collections::HashMap, str::FromStr}; +use std::str::FromStr; use alloy::{primitives::U256, signers::Signature}; use anyhow::Context; @@ -36,7 +36,7 @@ impl Calldata { let feed_id = hex_str_to_u256(&feed_id)?; let update_info = state.storage.latest_update_per_feed().get(&feed_id).await?.context("No update found")?; - let validator_index_map: HashMap = + let validator_index_map = state.hyperlane_validators_mapping.get_validators(&chain_name).context("No validators found")?; let validators: Vec = validator_index_map.keys().copied().collect();