Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanoroshiba committed Sep 4, 2024
1 parent a8c45e9 commit 2911562
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/astria-core/src/primitive/v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 8,6 @@ use base64::{
prelude::BASE64_STANDARD,
};
use bytes::Bytes;
use hex::FromHex;
use sha2::{
Digest as _,
Sha256,
Expand Down Expand Up @@ -537,6 536,8 @@ impl TransactionId {
/// Returns an error if the transaction ID buffer was not 32 bytes long or if it was not hex
/// encoded.
pub fn try_from_raw_ref(raw: &raw::TransactionId) -> Result<Self, TransactionIdError> {
use hex::FromHex as _;

let inner = <[u8; TRANSACTION_ID_LEN]>::from_hex(&raw.inner).map_err(|err| {
TransactionIdError(TransactionIdErrorKind::HexDecode {
source: err,
Expand Down

0 comments on commit 2911562

Please sign in to comment.