Skip to content

Commit

Permalink
Remove partial_application crate
Browse files Browse the repository at this point in the history
  • Loading branch information
karbyshev committed Mar 8, 2024
1 parent 3f65aa5 commit c189090
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 22 deletions.
7 changes: 0 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ num-rational = "0.4.1"
num-traits = "0.2.14"
once_cell = "1.8.0"
orion = "0.16.0"
partial_application = "0.2.1"
paste = "1.0.9"
pretty_assertions = "1.4.0"
primitive-types = "0.12.1"
Expand Down
25 changes: 11 additions & 14 deletions crates/sdk/src/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use namada_core::key::*;
use namada_core::masp::{
ExtendedSpendingKey, ExtendedViewingKey, PaymentAddress,
};
use partial_application::partial;
pub use pre_genesis::gen_key_to_store;
use rand::CryptoRng;
use rand_core::RngCore;
Expand Down Expand Up @@ -419,11 +418,9 @@ impl<U: WalletStorage> Wallet<U> {
address: Address,
keys: ValidatorKeys,
) -> Result<(), LoadStoreError> {
self.utils.clone().update_store(
partial!(Store::add_validator_data => _,
address,
keys),
)
self.utils
.clone()
.update_store(|store| store.add_validator_data(address, keys))
}

/// XXX does not make sense in the current context -- REMOVE?
Expand Down Expand Up @@ -451,13 +448,13 @@ impl<U: WalletStorage> Wallet<U> {
validator_alias: Alias,
other: pre_genesis::ValidatorWallet,
) -> Result<(), LoadStoreError> {
self.utils.clone().update_store(
partial!(Store::extend_from_pre_genesis_validator => _,
self.utils.clone().update_store(|store| {
store.extend_from_pre_genesis_validator(
validator_address,
validator_alias,
other
),
)
other,
)
})
}

/// Gets all addresses given a vp_type
Expand All @@ -477,9 +474,9 @@ impl<U: WalletStorage> Wallet<U> {
vp_type: AddressVpType,
address: Address,
) -> Result<(), LoadStoreError> {
self.utils.clone().update_store(
partial!(Store::add_vp_type_to_address => _, vp_type, address),
)
self.utils.clone().update_store(|store| {
store.add_vp_type_to_address(vp_type, address)
})
}

/// Get addresses with tokens VP type keyed and ordered by their aliases.
Expand Down

0 comments on commit c189090

Please sign in to comment.