@@ -70,7 +70,7 @@ use crate::offers::nonce::Nonce;
70
70
use crate::offers::offer::{Offer, OfferBuilder};
71
71
use crate::offers::parse::Bolt12SemanticError;
72
72
use crate::offers::refund::{Refund, RefundBuilder};
73
- use crate::offers::signer::{self, hmac_for_payment_hash} ;
73
+ use crate::offers::signer;
74
74
use crate::onion_message::async_payments::{AsyncPaymentsMessage, HeldHtlcAvailable, ReleaseHeldHtlc, AsyncPaymentsMessageHandler};
75
75
use crate::onion_message::messenger::{Destination, MessageRouter, Responder, ResponseInstruction, MessageSendInstructions};
76
76
use crate::onion_message::offers::{OffersMessage, OffersMessageHandler};
@@ -9227,7 +9227,7 @@ where
9227
9227
let invoice = builder.allow_mpp().build_and_sign(secp_ctx)?;
9228
9228
9229
9229
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);
9231
9231
let context = OffersContext::InboundPayment {
9232
9232
payment_hash: invoice.payment_hash(), nonce, hmac
9233
9233
};
@@ -10990,7 +10990,7 @@ where
10990
10990
OffersMessage::InvoiceError(invoice_error) => {
10991
10991
let payment_hash = match context {
10992
10992
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) {
10994
10994
Ok(_) => Some(payment_hash),
10995
10995
Err(_) => None,
10996
10996
}
0 commit comments