@@ -70,7 +70,7 @@ use crate::offers::nonce::Nonce;
7070use crate::offers::offer::{Offer, OfferBuilder};
7171use crate::offers::parse::Bolt12SemanticError;
7272use crate::offers::refund::{Refund, RefundBuilder};
73- use crate::offers::signer::{self, hmac_for_payment_hash} ;
73+ use crate::offers::signer;
7474use crate::onion_message::async_payments::{AsyncPaymentsMessage, HeldHtlcAvailable, ReleaseHeldHtlc, AsyncPaymentsMessageHandler};
7575use crate::onion_message::messenger::{Destination, MessageRouter, Responder, ResponseInstruction, MessageSendInstructions};
7676use crate::onion_message::offers::{OffersMessage, OffersMessageHandler};
@@ -9227,7 +9227,7 @@ where
92279227 let invoice = builder.allow_mpp().build_and_sign(secp_ctx)?;
92289228
92299229 let nonce = Nonce::from_entropy_source(entropy);
9230- let hmac = hmac_for_payment_hash(invoice. payment_hash(), nonce, expanded_key);
9230+ let hmac = payment_hash.hmac_for_offer_payment( nonce, expanded_key);
92319231 let context = OffersContext::InboundPayment {
92329232 payment_hash: invoice.payment_hash(), nonce, hmac
92339233 };
@@ -10990,7 +10990,7 @@ where
1099010990 OffersMessage::InvoiceError(invoice_error) => {
1099110991 let payment_hash = match context {
1099210992 Some(OffersContext::InboundPayment { payment_hash, nonce, hmac }) => {
10993- match signer::verify_payment_hash( payment_hash, hmac, nonce, expanded_key) {
10993+ match payment_hash.verify( hmac, nonce, expanded_key) {
1099410994 Ok(_) => Some(payment_hash),
1099510995 Err(_) => None,
1099610996 }
0 commit comments