Skip to content

Commit 4e4f12e

Browse files
committed
AuxiliaryData equality fix
1 parent da72f64 commit 4e4f12e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

rust/src/metadata.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,24 @@ impl GeneralTransactionMetadata {
285285
}
286286

287287
#[wasm_bindgen]
288-
#[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
288+
#[derive(Clone, Debug, Ord, PartialOrd)]
289289
pub struct AuxiliaryData {
290290
metadata: Option<GeneralTransactionMetadata>,
291291
native_scripts: Option<NativeScripts>,
292292
plutus_scripts: Option<PlutusScripts>,
293293
prefer_alonzo_format: bool,
294294
}
295295

296+
impl std::cmp::PartialEq<Self> for AuxiliaryData {
297+
fn eq(&self, other: &Self) -> bool {
298+
self.metadata.eq(&other.metadata)
299+
&& self.native_scripts.eq(&other.native_scripts)
300+
&& self.plutus_scripts.eq(&other.plutus_scripts)
301+
}
302+
}
303+
304+
impl std::cmp::Eq for AuxiliaryData {}
305+
296306
to_from_bytes!(AuxiliaryData);
297307

298308
#[wasm_bindgen]

0 commit comments

Comments
 (0)