File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4548,6 +4548,18 @@ where
45484548 Ok(())
45494549 }
45504550
4551+ /// Signals that the received [`InvoiceRequest`] must be rejected, and the corresponding
4552+ /// [`InvoiceError`], must be sent back to the counterparty.
4553+ pub fn reject_invoice_request(&self, reason: Bolt12SemanticError, responder: Responder) {
4554+ let mut pending_offers_message = self.pending_offers_messages.lock().unwrap();
4555+ let error = InvoiceError::from(reason);
4556+
4557+ let instructions = responder.respond().into_instructions();
4558+ let message = OffersMessage::InvoiceError(error);
4559+
4560+ pending_offers_message.push((message, instructions))
4561+ }
4562+
45514563 #[cfg(async_payments)]
45524564 fn initiate_async_payment(
45534565 &self, invoice: &StaticInvoice, payment_id: PaymentId
You can’t perform that action at this time.
0 commit comments