mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-17 13:07:32 +02:00
Improve unpack offer function (#672)
This commit is contained in:
parent
d2c20fbc40
commit
cca3ae8232
1 changed files with 6 additions and 7 deletions
|
|
@ -203,7 +203,12 @@ class SqueakCore:
|
|||
invoice_expiry = pay_req.expiry
|
||||
node_host = offer.host or peer.host
|
||||
node_port = offer.port
|
||||
decoded_offer = ReceivedOffer(
|
||||
# TODO: Check the payment point
|
||||
# payment_point = offer.payment_point
|
||||
# expected_payment_point = squeak.paymentPoint
|
||||
# if payment_point != expected_payment_point:
|
||||
# raise Exception("Invalid payment point.")
|
||||
return ReceivedOffer(
|
||||
received_offer_id=None,
|
||||
squeak_hash=squeak_hash,
|
||||
price_msat=price_msat,
|
||||
|
|
@ -218,12 +223,6 @@ class SqueakCore:
|
|||
node_port=node_port,
|
||||
peer_id=peer.peer_id,
|
||||
)
|
||||
# TODO: Check the payment point
|
||||
# payment_point = offer.payment_point
|
||||
# expected_payment_point = squeak.paymentPoint
|
||||
# if payment_point != expected_payment_point:
|
||||
# Do something
|
||||
return decoded_offer
|
||||
|
||||
def pay_offer(self, received_offer: ReceivedOffer) -> SentPayment:
|
||||
"""Pay the offer that the buyer received from the seller.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue