mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-15 10:55:55 +01:00
nut08 change amount
This commit is contained in:
@@ -40,3 +40,12 @@ pub struct MeltResponse {
|
||||
pub preimage: Option<String>,
|
||||
pub change: Option<Vec<BlindedSignature>>,
|
||||
}
|
||||
|
||||
impl MeltResponse {
|
||||
pub fn change_amount(&self) -> Amount {
|
||||
match &self.change {
|
||||
Some(change) => change.iter().map(|c| c.amount).sum(),
|
||||
None => Amount::ZERO,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user