From 3d96ce4a16f8c089de739704a38aeccb9aa5821f Mon Sep 17 00:00:00 2001 From: DaughterOfMars Date: Mon, 22 Jan 2024 13:03:23 -0500 Subject: [PATCH] chore: release `v1.0.0-rc.3` (#1323) * chore: release v1.0.0-rc.3 * fix some deprecated method usage --- CHANGELOG.md | 6 ++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- src/model/block/payload/transaction/unlock.rs | 4 +--- src/model/signature.rs | 14 ++++++-------- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb5224860..02c6a3c51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.0.0-rc.3](https://github.com/iotaledger/inx-chronicle/compare/v1.0.0-rc.2...v1.0.0-rc.3) (2024-01-22) + +### Miscellaneous Chores + +* **deps:** update `iota-sdk` to fix validation bug + ## [1.0.0-rc.2](https://github.com/iotaledger/inx-chronicle/compare/v1.0.0-rc.1...v1.0.0-rc.2) (2023-09-12) diff --git a/Cargo.lock b/Cargo.lock index bfae29eb6..b2fe947bc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -481,7 +481,7 @@ dependencies = [ [[package]] name = "chronicle" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" dependencies = [ "async-trait", "auth-helper", diff --git a/Cargo.toml b/Cargo.toml index 95d2f7797..cc612498c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chronicle" -version = "1.0.0-rc.2" +version = "1.0.0-rc.3" authors = ["IOTA Stiftung"] edition = "2021" description = "IOTA permanode implemented as an IOTA Node Extension (INX)." diff --git a/src/model/block/payload/transaction/unlock.rs b/src/model/block/payload/transaction/unlock.rs index abe02aeb8..78b188f73 100644 --- a/src/model/block/payload/transaction/unlock.rs +++ b/src/model/block/payload/transaction/unlock.rs @@ -52,9 +52,7 @@ impl TryFrom for iota::Unlock { fn try_from(value: Unlock) -> Result { Ok(match value { - Unlock::Signature { signature } => { - iota::Unlock::Signature(iota::SignatureUnlock::new(signature.try_into()?)) - } + Unlock::Signature { signature } => iota::Unlock::Signature(iota::SignatureUnlock::new(signature.into())), Unlock::Reference { index } => iota::Unlock::Reference(iota::ReferenceUnlock::new(index)?), Unlock::Alias { index } => iota::Unlock::Alias(iota::AliasUnlock::new(index)?), Unlock::Nft { index } => iota::Unlock::Nft(iota::NftUnlock::new(index)?), diff --git a/src/model/signature.rs b/src/model/signature.rs index 20dbe711d..2864bcbf0 100644 --- a/src/model/signature.rs +++ b/src/model/signature.rs @@ -32,22 +32,20 @@ impl From<&iota::Signature> for Signature { fn from(value: &iota::Signature) -> Self { match value { iota::Signature::Ed25519(signature) => Self::Ed25519 { - public_key: signature.public_key().to_bytes(), + public_key: signature.public_key_bytes().to_bytes(), signature: signature.signature().to_bytes(), }, } } } -impl TryFrom for iota::Signature { - type Error = iota_sdk::types::block::Error; - - fn try_from(value: Signature) -> Result { - Ok(match value { +impl From for iota::Signature { + fn from(value: Signature) -> Self { + match value { Signature::Ed25519 { public_key, signature } => { - iota::Ed25519Signature::try_from_bytes(public_key, signature)?.into() + iota::Ed25519Signature::from_bytes(public_key, signature).into() } - }) + } } }