Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/owning-address
Browse files Browse the repository at this point in the history
DaughterOfMars authored Jan 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 1dcd8df + 3d96ce4 commit 11efd94
Showing 3 changed files with 13 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


4 changes: 1 addition & 3 deletions src/model/block/payload/transaction/unlock.rs
Original file line number Diff line number Diff line change
@@ -52,9 +52,7 @@ impl TryFrom<Unlock> for iota::Unlock {

fn try_from(value: Unlock) -> Result<Self, Self::Error> {
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)?),
14 changes: 6 additions & 8 deletions src/model/signature.rs
Original file line number Diff line number Diff line change
@@ -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<Signature> for iota::Signature {
type Error = iota_sdk::types::block::Error;

fn try_from(value: Signature) -> Result<Self, Self::Error> {
Ok(match value {
impl From<Signature> 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()
}
})
}
}
}

0 comments on commit 11efd94

Please sign in to comment.