Last active
September 12, 2018 08:55
-
-
Save dariooddenino/ec8b3017f48beda5f0fc547836824d17 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| exports.addCardListenerImpl = function (card, fn) { | |
| card.addEventListener('change', fn); | |
| return null; | |
| } | |
This file contains hidden or 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
| addCardListener :: Card -> (Event -> Effect Unit) -> Effect Unit | |
| addCardListener = runEffectFn2 addCardListenerImpl | |
| ... | |
| eval (Init next) = next <$ do | |
| card <- H.liftEffect mountCard | |
| -- X is logged correctly and it's the stripe response object | |
| H.subscribe $ ES.eventSource (addCardListener card) (Just <<< H.request <<< HandleStripeError <<< spy "X") | |
| eval (HandleStripeError ev reply) = do | |
| -- this is not logged | |
| logShow "HELLO?" | |
| pure $ reply H.Listening | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment