stabilize ids and harden release pipeline
This commit is contained in:
+15
-1
@@ -193,6 +193,16 @@ impl WalletRegistry {
|
||||
);
|
||||
}
|
||||
|
||||
/// Drop a pending invoice at the user's request.
|
||||
pub fn dismiss_mint_quote(&mut self, quote_id: String, cx: &mut Context<Self>) {
|
||||
if !self.quotes.iter().any(|quote| quote.quote_id == quote_id) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.quotes.retain(|quote| quote.quote_id != quote_id);
|
||||
self.emit_updated(cx);
|
||||
}
|
||||
|
||||
/// Pay a lightning invoice from the wallet.
|
||||
pub fn melt(&mut self, invoice: String, cx: &mut Context<Self>) {
|
||||
let Some(mint_url) = self.primary_mint(cx) else {
|
||||
@@ -896,7 +906,11 @@ impl WalletRegistry {
|
||||
};
|
||||
|
||||
match outcome {
|
||||
ops::Outcome::Idle => {}
|
||||
ops::Outcome::Idle => {
|
||||
if matches!(job, ops::Job::ClaimQuote { .. }) {
|
||||
self.emit_error("Invoice is not paid yet".to_string(), cx);
|
||||
}
|
||||
}
|
||||
ops::Outcome::Reconciled { updates } => {
|
||||
self.publish_failed = false;
|
||||
let changed = !updates.is_empty();
|
||||
|
||||
Reference in New Issue
Block a user