Last active
August 31, 2022 08:26
-
-
Save pavanjoshi914/9d81161e7628f7de0cba835d7e2560c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
publishPaymentNotification: ( | |
message: Message, | |
data: PaymentNotificationData | |
) => { | |
let status = "success"; // default. let's hope for success | |
if ("error" in data.response) { | |
status = "failed"; | |
} | |
PubSub.publish(`ln.sendPayment.${status}`, { | |
response: data.response, | |
details: data.details, | |
paymentRequestDetails: data.paymentRequestDetails, | |
origin: message.origin, | |
metadata: message.metadata, | |
}); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment