fix: correct V1 to_plutus_data() for txout with no datum hash

This commit is contained in:
jmhrpr 2022-12-15 17:17:36 +00:00 committed by Kasey
parent 34d76bc280
commit 325a7b7b45
2 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@
### Changed
- **aiken**: `check` now also runs and reports on any `test` found in the project
- **aiken**: fix Plutus V1 `to_plutus_data()` for post-alonzo txout with no datum hash
### Removed

View File

@ -296,7 +296,7 @@ impl ToPlutusData for TxOut {
post_alonzo_output.value.to_plutus_data(),
match post_alonzo_output.datum_option {
Some(DatumOption::Hash(hash)) => Some(hash).to_plutus_data(),
_ => None::<DatumOption>.to_plutus_data(),
_ => None::<Option<Hash<32>>>.to_plutus_data(),
},
],
),