feat(traverse): Expose collateral return (#158)
This commit is contained in:
parent
4965603e32
commit
737b0eee21
1 changed files with 11 additions and 0 deletions
|
|
@ -192,6 +192,17 @@ impl<'b> MultiEraTx<'b> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn collateral_return(&self) -> Option<MultiEraOutput> {
|
||||
match self {
|
||||
MultiEraTx::Babbage(x) => x
|
||||
.transaction_body
|
||||
.collateral_return
|
||||
.as_ref()
|
||||
.map(MultiEraOutput::from_babbage),
|
||||
_ => None
|
||||
}
|
||||
}
|
||||
|
||||
pub fn withdrawals(&self) -> MultiEraWithdrawals {
|
||||
match self {
|
||||
MultiEraTx::AlonzoCompatible(x, _) => match &x.transaction_body.withdrawals {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue