Last active
August 31, 2022 08:59
-
-
Save pavanjoshi914/cc5d3a6005a5ff88fa98cc60eb56ac70 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
import PubSub from "pubsub-js"; | |
import { updateAllowance } from "./allowances"; | |
import { | |
paymentSuccessNotification, | |
paymentFailedNotification, | |
lnurlAuthSuccessNotification, | |
lnurlAuthFailedNotification, | |
} from "./notifications"; | |
import { persistSuccessfullPayment } from "./persistPayments"; | |
import { persistMetadata } from "./persistMetadata"; | |
const subscribe = () => { | |
PubSub.subscribe("ln.sendPayment.success", paymentSuccessNotification); | |
PubSub.subscribe("ln.sendPayment.failed", paymentFailedNotification); | |
PubSub.subscribe("ln.sendPayment.success", persistSuccessfullPayment); | |
PubSub.subscribe("ln.sendPayment.success", updateAllowance); | |
PubSub.subscribe("ln.sendPayment.success", persistMetadata); | |
console.info(`Event subscriptions registered`); | |
}; | |
export { subscribe }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment