Skip to content

Commit

Permalink
refactor: improve test robustness and broaden platform support
Browse files Browse the repository at this point in the history
- refactor the 'values' struct initialization to include type conversions for the 'address' field in the testing module of the 'pallas_observer.rs' file.
  • Loading branch information
falcucci committed Dec 21, 2023
1 parent 09f1404 commit d80cac5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mithril-common/src/chain_observer/pallas_observer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,13 @@ mod tests {
let datum = hex::decode(hex_datum).unwrap().into();
let tag = TagWrap::<_, 24>::new(datum);
let inline_datum = Some((1_u16, tag));

let address: Address =
Address::from_bech32("addr_test1vr80076l3x5uw6n94nwhgmv7ssgy6muzf47ugn6z0l92rhg2mgtu0")
.unwrap();
let address: Addr = address.to_vec().into();
let values = localstate::queries_v16::Values {
address: b"addr_test1vr80076l3x5uw6n94nwhgmv7ssgy6muzf47ugn6z0l92rhg2mgtu0"
.to_vec()
.into(),
address,
amount: Value::Coin(lovelace),
inline_datum,
};
Expand Down

0 comments on commit d80cac5

Please sign in to comment.