Skip to content

Commit ebe9932

Browse files
fixup! refactor(offers): bundle paid invoice data for payer proofs
Co-Authored-By: OpenAI Codex <noreply@openai.com>
1 parent c91eae1 commit ebe9932

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lightning/src/offers/payer_proof.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ impl<'a> PayerProofBuilder<'a, ExplicitSigningKey> {
272272
///
273273
/// Returns an error if the preimage doesn't match the invoice's payment hash.
274274
fn new(invoice: &'a Bolt12Invoice, preimage: PaymentPreimage) -> Result<Self, PayerProofError> {
275-
let computed_hash = sha256::Hash::hash(&preimage.0);
276-
if computed_hash.as_byte_array() != &invoice.payment_hash().0 {
275+
let computed_hash: PaymentHash = preimage.into();
276+
if computed_hash != invoice.payment_hash() {
277277
return Err(PayerProofError::PreimageMismatch);
278278
}
279279

0 commit comments

Comments
 (0)