unlock-protocol / unlock

Ʉnlock is a protocol for memberships built on a blockchain.
https://unlock-protocol.com
MIT License
841 stars 248 forks source link

Make required changes for paywall<->app communication #4133

Closed cnasc closed 5 years ago

cnasc commented 5 years ago

Making an issue for these so I can make sure I get them all

cellog commented 5 years ago

Making an issue for these so I can make sure I get them all

  • [x] postOfficeMiddleware needs to respond to LockUpdate, not KeyPurchase
 postOfficeService.on(PostOfficeEvents.LockUpdate, locks => {
  const lock = Object.values(locks)[0] // probably not exactly this?
  dispatch(addToCart({ lock }))
})

So this is not correct. It needs to save all of the locks it gets into the store. We could receive a key purchase request on any of them