Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sdk async #2261

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/2261-fix-sdk-0.28.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fix sdk compilation when using async-send feature flag.
([\#2261](https://github.com/anoma/namada/pull/2261))
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<signing::Signable>, D) -> F,
with: impl Fn(Tx, common::PublicKey, HashSet<signing::Signable>, D) -> F
+ MaybeSend
+ MaybeSync,
user_data: D,
) -> crate::error::Result<()>
where
D: Clone,
D: Clone + MaybeSend + MaybeSync,
F: MaybeSend
+ MaybeSync
+ std::future::Future<Output = crate::error::Result<Tx>>,
Expand Down
4 changes: 2 additions & 2 deletions sdk/src/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<Output = Result<Tx, Error>>,
{
Expand Down
Loading