From 3bb48f2964f22a11827aa782a32eaa15b1062de7 Mon Sep 17 00:00:00 2001 From: shufps Date: Tue, 14 Nov 2023 17:28:26 +0100 Subject: [PATCH] rebased, clippied, formatted, compiles again --- src/bin/inx-chronicle/api/explorer/routes.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bin/inx-chronicle/api/explorer/routes.rs b/src/bin/inx-chronicle/api/explorer/routes.rs index 5fd3cbad5..4c90f09e8 100644 --- a/src/bin/inx-chronicle/api/explorer/routes.rs +++ b/src/bin/inx-chronicle/api/explorer/routes.rs @@ -19,7 +19,7 @@ use chronicle::{ }, }; use futures::{StreamExt, TryStreamExt}; -use iota_sdk::types::block::address::ToBech32Ext; +use iota_sdk::types::block::address::{Hrp, ToBech32Ext}; use super::{ extractors::{ @@ -356,7 +356,7 @@ async fn richest_addresses_ledger_analytics( .get_richest_addresses(ledger_index, top) .await?; - let hrp = database + let hrp: Hrp = database .collection::() .get_protocol_parameters_for_ledger_index(ledger_index) .await? @@ -370,7 +370,9 @@ async fn richest_addresses_ledger_analytics( .top .into_iter() .map(|stat| AddressStatDto { - address: iota_sdk::types::block::address::Address::from(stat.address).to_bech32(hrp.clone()).to_string(), + address: iota_sdk::types::block::address::Address::from(stat.address) + .to_bech32(hrp) + .to_string(), balance: stat.balance, }) .collect(),