Skip to content

Commit 557145c

Browse files
committed
fixup! Add end-to-end test for HRN resolution
1 parent 494866a commit 557145c

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/payment/unified.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -337,16 +337,10 @@ impl UnifiedPayment {
337337
/// Sets a test offer to be used in the `send` method when the `hrn_tests` config flag is enabled.
338338
/// This is necessary to test sending Bolt12 payments via the unified payment handler in HRN tests,
339339
/// as we cannot rely on the offer being present in the parsed URI.
340+
#[cfg(hrn_tests)]
340341
pub fn set_test_offer(&self, _offer: Offer) {
341-
#[cfg(hrn_tests)]
342-
{
343-
let mut guard = self.test_offer.lock().unwrap();
344-
*guard = Some(_offer);
345-
}
346-
#[cfg(not(hrn_tests))]
347-
{
348-
log_error!(self.logger, "set_test_offer was called but hrn_tests is not enabled. This method should only be used in HRN tests.");
349-
}
342+
let mut guard = self.test_offer.lock().unwrap();
343+
*guard = Some(_offer);
350344
}
351345
}
352346

0 commit comments

Comments
 (0)