recentBlock :: Handler (Maybe Block)
recentBlock = do
  thr <- fiveMinAgo
  result <- runDB $ selectFirst [BlockCreatedAt >=. thr] [Desc BlockCreatedAt]
  case result of
    Nothing -> return Nothing
    Just (Entity _ b) ->
      return $ Just b
recentBlock :: Handler (Maybe Block)
recentBlock = do
  thr <- fiveMinAgo
  result <- runDB $ selectFirst [BlockCreatedAt >=. thr] [Desc BlockCreatedAt]
  case result of
    Nothing -> return Nothing
    Just (Entity _ b) ->
      return $ Just b
recentBlock = do
  thr <- fiveMinAgo
  result <- runDB $ selectFirst [BlockCreatedAt >=. thr] [Desc BlockCreatedAt]
  case result of
    Nothing -> return Nothing
    Just (Entity _ b) ->
      return $ Just b