Skip to content

Commit

Permalink
Add type ascription to fix build when telemetry feature is disabled (
Browse files Browse the repository at this point in the history
  • Loading branch information
romac authored May 23, 2022
1 parent 228bd22 commit 4e83aae
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions relayer/src/worker/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ use tracing::{error_span, trace};

use crate::{
chain::handle::ChainHandle,
util::task::{spawn_background_task, Next, TaskHandle},
telemetry,
util::task::{spawn_background_task, Next, TaskError, TaskHandle},
};

pub fn spawn_wallet_worker<Chain: ChainHandle>(chain: Chain) -> TaskHandle {
use crate::{telemetry, util::task::TaskError};

let span = error_span!("wallet", chain = %chain.id());

spawn_background_task(span, Some(Duration::from_secs(5)), move || {
Expand All @@ -21,7 +20,7 @@ pub fn spawn_wallet_worker<Chain: ChainHandle>(chain: Chain) -> TaskHandle {
TaskError::Ignore(format!("failed to query balance for the account: {e}"))
})?;

let amount = balance.amount.parse().map_err(|_| {
let amount: u64 = balance.amount.parse().map_err(|_| {
TaskError::Ignore(format!(
"failed to parse amount into u64: {}",
balance.amount
Expand Down

0 comments on commit 4e83aae

Please sign in to comment.