From a8642e4453cfc87c6c88ed8b347acbc46455a0f6 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 30 Dec 2025 16:47:32 -0500 Subject: [PATCH] fix: update for new cache --- Cargo.toml | 9 ++++----- src/perms/tx_cache.rs | 9 ++++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3020a46..4cb93c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "init4-bin-base" description = "Internal utilities for binaries produced by the init4 team" keywords = ["init4", "bin", "base"] -version = "0.18.0-rc.2" +version = "0.18.0-rc.3" edition = "2021" rust-version = "1.85" authors = ["init4", "James Prestwich", "evalir"] @@ -15,8 +15,8 @@ repository = "https://github.com/init4tech/bin-base" init4-from-env-derive = "0.1.0" # Signet -signet-constants = { version = "0.16.0-rc.1" } -signet-tx-cache = { version = "0.16.0-rc.1", optional = true } +signet-constants = { version = "0.16.0-rc.4" } +signet-tx-cache = { version = "0.16.0-rc.4", optional = true } # alloy alloy = { version = "1.0.35", optional = true, default-features = false, features = ["std", "signer-local", "consensus", "network"] } @@ -52,7 +52,6 @@ serde = { version = "1", features = ["derive"] } thiserror = "2.0.11" tower = "0.5.2" async-trait = { version = "0.1.80", optional = true } -eyre = { version = "0.6.12", optional = true } # AWS aws-config = { version = "1.1.7", optional = true } @@ -72,7 +71,7 @@ tokio = { version = "1.43.0", features = ["macros"] } default = ["alloy", "rustls"] alloy = ["dep:alloy"] aws = ["alloy", "alloy?/signer-aws", "dep:async-trait", "dep:aws-config", "dep:aws-sdk-kms"] -perms = ["dep:oauth2", "dep:tokio", "dep:reqwest", "dep:signet-tx-cache", "dep:eyre"] +perms = ["dep:oauth2", "dep:tokio", "dep:reqwest", "dep:signet-tx-cache"] rustls = ["dep:rustls", "rustls/aws-lc-rs"] [[example]] diff --git a/src/perms/tx_cache.rs b/src/perms/tx_cache.rs index b575176..51899b8 100644 --- a/src/perms/tx_cache.rs +++ b/src/perms/tx_cache.rs @@ -1,9 +1,9 @@ use crate::perms::oauth::SharedToken; -use eyre::Result; use serde::de::DeserializeOwned; use signet_tx_cache::{ - client::TxCache, + error::Result, types::{TxCacheBundle, TxCacheBundleResponse, TxCacheBundlesResponse}, + TxCache, }; use tracing::{instrument, warn}; @@ -52,7 +52,10 @@ impl BuilderTxCache { async fn get_inner_with_token(&self, join: &str) -> Result { let url = self.tx_cache.url().join(join)?; - let secret = self.token.secret().await?; + let secret = self.token.secret().await.unwrap_or_else(|_| { + warn!("Failed to get token secret"); + "".to_string() + }); self.tx_cache .client()