diff --git a/.changelog/unreleased/bug-fixes/2261-fix-sdk-0.28.0.md b/.changelog/unreleased/bug-fixes/2261-fix-sdk-0.28.0.md new file mode 100644 index 0000000000..1173c40189 --- /dev/null +++ b/.changelog/unreleased/bug-fixes/2261-fix-sdk-0.28.0.md @@ -0,0 +1,2 @@ +- Fix sdk compilation when using async-send feature flag. + ([\#2261](https://github.com/anoma/namada/pull/2261)) \ No newline at end of file diff --git a/Makefile b/Makefile index 339eb6c79e..6b7441b01a 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,8 @@ check-mainnet: check-crates: $(foreach p,$(crates), echo "Checking $(p)" && cargo +$(nightly) check -Z unstable-options --tests -p $(p) && ) \ make -C $(wasms_for_tests) check && \ - cargo check --package namada --target wasm32-unknown-unknown --no-default-features --features "namada-sdk" + cargo check --package namada --target wasm32-unknown-unknown --no-default-features --features "namada-sdk" && \ + cargo check --package namada_sdk --all-features clippy-wasm = $(cargo) +$(nightly) clippy --manifest-path $(wasm)/Cargo.toml --all-targets -- -D warnings diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs index 3f8c607840..29aab3041a 100644 --- a/sdk/src/lib.rs +++ b/sdk/src/lib.rs @@ -542,11 +542,13 @@ pub trait Namada: Sized + MaybeSync + MaybeSend { tx: &mut Tx, args: &args::Tx, signing_data: SigningTxData, - with: impl Fn(Tx, common::PublicKey, HashSet, D) -> F, + with: impl Fn(Tx, common::PublicKey, HashSet, D) -> F + + MaybeSend + + MaybeSync, user_data: D, ) -> crate::error::Result<()> where - D: Clone, + D: Clone + MaybeSend + MaybeSync, F: MaybeSend + MaybeSync + std::future::Future>, diff --git a/sdk/src/signing.rs b/sdk/src/signing.rs index d5e8132af8..7f854b59b0 100644 --- a/sdk/src/signing.rs +++ b/sdk/src/signing.rs @@ -58,7 +58,7 @@ use crate::tx::{ }; pub use crate::wallet::store::AddressVpType; use crate::wallet::{Wallet, WalletIo}; -use crate::{args, display_line, rpc, Namada}; +use crate::{args, display_line, rpc, MaybeSend, Namada}; #[cfg(feature = "std")] /// Env. var specifying where to store signing test vectors @@ -217,7 +217,7 @@ pub async fn sign_tx<'a, D, F, U>( user_data: D, ) -> Result<(), Error> where - D: Clone, + D: Clone + MaybeSend, U: WalletIo, F: std::future::Future>, {