feat(traverse): Expose collateral return (#158)
This commit is contained in:
parent
30b8383aac
commit
97d4fad2b7
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 {
|
pub fn withdrawals(&self) -> MultiEraWithdrawals {
|
||||||
match self {
|
match self {
|
||||||
MultiEraTx::AlonzoCompatible(x, _) => match &x.transaction_body.withdrawals {
|
MultiEraTx::AlonzoCompatible(x, _) => match &x.transaction_body.withdrawals {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue