Skip to content

Commit 03b7bad

Browse files
Alenarsfauvel
authored andcommitted
Add compatibility with wasm to BlockNumber
1 parent 43c4f0b commit 03b7bad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mithril-common/src/entities/block_number.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ use crate::entities::wrapper_helpers::{
1111
};
1212
use crate::signable_builder::Beacon;
1313

14+
#[cfg(target_family = "wasm")]
15+
use wasm_bindgen::prelude::*;
16+
1417
/// BlockNumber is the block number of a Cardano transaction.
1518
#[derive(
1619
Debug, Copy, Clone, Default, PartialEq, Serialize, Deserialize, Hash, Eq, PartialOrd, Ord,
1720
)]
21+
#[cfg_attr(target_family = "wasm", wasm_bindgen)]
1822
pub struct BlockNumber(pub u64);
1923

2024
impl Beacon for BlockNumber {}

0 commit comments

Comments
 (0)