Skip to content

Commit

Permalink
Merge branch 'fraccaman+bat/fix-sdk-0.28.0' (#2261)
Browse files Browse the repository at this point in the history
* origin/fraccaman+bat/fix-sdk-0.28.0:
  fix: makefile
  added changelog
  fix: sdk async
  • Loading branch information
Gianmarco Fraccaroli committed Dec 13, 2023
2 parents 8e68fa5 + 6e1c3ce commit e74223c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
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

0 comments on commit e74223c

Please sign in to comment.