Skip to content

Commit

Permalink
replace calls
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Oct 1, 2024
1 parent 365fb3b commit fe4da1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pallas-utxorpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,13 @@ impl<C: LedgerContext> Mapper<C> {
pub fn map_tx_output(&self, x: &trv::MultiEraOutput) -> u5c::TxOutput {
u5c::TxOutput {
address: x.address().map(|a| a.to_vec()).unwrap_or_default().into(),
coin: x.lovelace_amount(),
coin: x.value().coin(),
// TODO: this is wrong, we're crating a new item for each asset even if they share
// the same policy id. We need to adjust Pallas' interface to make this mapping more
// ergonomic.
assets: x
.non_ada_assets()
.value()
.assets()
.iter()
.map(|x| self.map_policy_assets(x))
.collect(),
Expand Down

0 comments on commit fe4da1d

Please sign in to comment.