Skip to content

Commit

Permalink
chore(cargo): update crate versions to 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aesedepece committed Jan 2, 2024
1 parent cebeaad commit 633d0f6
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 28 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock
100644 → 100755

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "witnet"
version = "1.6.8"
version = "1.7.0"
authors = ["Witnet Foundation <info@witnet.foundation>"]
publish = false
repository = "witnet/witnet-rust"
Expand Down
2 changes: 1 addition & 1 deletion bridges/centralized-ethereum/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "witnet-centralized-ethereum-bridge"
version = "1.6.8"
version = "1.7.0"
authors = ["Witnet Foundation <info@witnet.foundation>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion data_structures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Witnet Foundation <info@witnet.foundation>"]
description = "data structures component"
edition = "2021"
name = "witnet_data_structures"
version = "1.6.8"
version = "1.7.0"
workspace = ".."

[features]
Expand Down
2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "witnet_node"
version = "1.6.8"
version = "1.7.0"
authors = ["Witnet Foundation <info@witnet.foundation>"]
workspace = ".."
description = "node component"
Expand Down
41 changes: 25 additions & 16 deletions node/src/signature_mngr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,12 +497,16 @@ impl Actor for SignatureManagerAdapter {

async move {
let config = config_mngr::get().await?;
let master_key_from_file = if let Some(master_key_path) = &config.storage.master_key_import_path {
master_key_import_from_file(master_key_path).map(Some)
} else {
Ok(None)
}?;
let master_key_from_storage: Option<ExtendedSK> = storage_mngr::get::<_, ExtendedSecretKey>(&MASTER_KEY).await?.map(Into::into);
let master_key_from_file =
if let Some(master_key_path) = &config.storage.master_key_import_path {
master_key_import_from_file(master_key_path).map(Some)
} else {
Ok(None)
}?;
let master_key_from_storage: Option<ExtendedSK> =
storage_mngr::get::<_, ExtendedSecretKey>(&MASTER_KEY)
.await?
.map(Into::into);

let master_key = match (master_key_from_file, master_key_from_storage) {
// Didn't ask to import master key and no master key in storage:
Expand All @@ -513,23 +517,28 @@ impl Actor for SignatureManagerAdapter {
(None, Some(from_storage)) => Ok(from_storage),
(Some(from_file), None) => {
// Save the key into the storage
persist_master_key(from_file.clone()).await.map(|()| from_file)
},
persist_master_key(from_file.clone())
.await
.map(|()| from_file)
}
// There is a master key in storage and imported:
(Some(from_file), Some(_from_storage)) => {
// Save the key into the storage
persist_master_key(from_file.clone()).await.map(|()| from_file.clone())
persist_master_key(from_file.clone())
.await
.map(|()| from_file.clone())
}
}?;

crypto.send(SetKey(master_key)).await?
}.into_actor(self)
.map_err(|err, _act, _ctx| {
log::error!("Failed to configure master key: {}", err);
System::current().stop_with_code(1);
})
.map(|_res: Result<(), ()>, _act, _ctx| ())
.wait(ctx);
}
.into_actor(self)
.map_err(|err, _act, _ctx| {
log::error!("Failed to configure master key: {}", err);
System::current().stop_with_code(1);
})
.map(|_res: Result<(), ()>, _act, _ctx| ())
.wait(ctx);

let crypto = self.crypto.clone();
async move {
Expand Down
2 changes: 1 addition & 1 deletion toolkit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "witnet_toolkit"
version = "1.6.8"
version = "1.7.0"
authors = ["Adán SDPC <adan.sdpc@gmail.com>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion wallet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Witnet Foundation <info@witnet.foundation>"]
edition = "2021"
name = "witnet_wallet"
version = "1.6.8"
version = "1.7.0"
workspace = ".."

[dependencies]
Expand Down

0 comments on commit 633d0f6

Please sign in to comment.