Skip to content

Commit 62284c7

Browse files
committed
fixup! Add support for sending to human-readable names that resolve to Bolt12 Offers
1 parent 9899a54 commit 62284c7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ where
742742
hash: Some(payment_hash),
743743
preimage: payment_preimage,
744744
secret: Some(payment_secret),
745-
offer_id,
745+
offer_id: Some(offer_id),
746746
payer_note,
747747
quantity,
748748
};

tests/integration_tests_rust.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ fn simple_bolt12_send_receive() {
820820
} => {
821821
assert!(hash.is_some());
822822
assert!(preimage.is_some());
823-
assert_eq!(offer_id, offer.id());
823+
assert_eq!(offer_id, Some(offer.id()));
824824
assert_eq!(&expected_quantity, qty);
825825
assert_eq!(expected_payer_note.unwrap(), note.clone().unwrap().0);
826826
//TODO: We should eventually set and assert the secret sender-side, too, but the BOLT12
@@ -841,7 +841,7 @@ fn simple_bolt12_send_receive() {
841841
assert!(hash.is_some());
842842
assert!(preimage.is_some());
843843
assert!(secret.is_some());
844-
assert_eq!(offer_id, offer.id());
844+
assert_eq!(offer_id, Some(offer.id()));
845845
},
846846
_ => {
847847
panic!("Unexpected payment kind");
@@ -886,7 +886,7 @@ fn simple_bolt12_send_receive() {
886886
} => {
887887
assert!(hash.is_some());
888888
assert!(preimage.is_some());
889-
assert_eq!(offer_id, offer.id());
889+
assert_eq!(offer_id, Some(offer.id()));
890890
assert_eq!(&expected_quantity, qty);
891891
assert_eq!(expected_payer_note.unwrap(), note.clone().unwrap().0);
892892
//TODO: We should eventually set and assert the secret sender-side, too, but the BOLT12
@@ -910,7 +910,7 @@ fn simple_bolt12_send_receive() {
910910
assert!(hash.is_some());
911911
assert!(preimage.is_some());
912912
assert!(secret.is_some());
913-
assert_eq!(offer_id, offer.id());
913+
assert_eq!(offer_id, Some(offer.id()));
914914
},
915915
_ => {
916916
panic!("Unexpected payment kind");

0 commit comments

Comments
 (0)