fix(traverse): fix conway txs not returning reference inputs (#388)
This commit is contained in:
parent
8916e43b95
commit
700d109d31
1 changed files with 11 additions and 8 deletions
|
|
@ -198,17 +198,20 @@ impl<'b> MultiEraTx<'b> {
|
|||
/// https://github.com/input-output-hk/cardano-ledger/commit/a342b74f5db3d3a75eae3e2abe358a169701b1e7
|
||||
pub fn reference_inputs(&self) -> Vec<MultiEraInput> {
|
||||
match self {
|
||||
MultiEraTx::Conway(x) => x
|
||||
.transaction_body
|
||||
.reference_inputs
|
||||
.iter()
|
||||
.flatten()
|
||||
.map(MultiEraInput::from_alonzo_compatible)
|
||||
.collect(),
|
||||
MultiEraTx::Babbage(x) => x
|
||||
.transaction_body
|
||||
.reference_inputs
|
||||
.as_ref()
|
||||
.map(|inputs| {
|
||||
inputs
|
||||
.iter()
|
||||
.map(MultiEraInput::from_alonzo_compatible)
|
||||
.collect()
|
||||
})
|
||||
.unwrap_or_default(),
|
||||
.iter()
|
||||
.flatten()
|
||||
.map(MultiEraInput::from_alonzo_compatible)
|
||||
.collect(),
|
||||
_ => vec![],
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue