message: block unintended solution for deluxe fraud
diff: @@ -10,9 +10,17 @@ const challenges = require('../data/datacache').challenges
  module.exports.upgradeToDeluxe = function upgradeToDeluxe () {
  return async (req, res, next) => {
  + let insufficientBalance = false
  if (req.body.paymentMode === 'wallet') {
  + const wallet = await models.Wallet.findOne({ where: { UserId: req.body.UserId } })
  + if (wallet.balance < 49) {
  + res.status(400).json({ status: 'error', error: 'Insuffienct funds in Wallet' })
  + insufficientBalance = true
  + } else {
  await models.Wallet.decrement({ balance: 49 }, { where: { UserId: req.body.UserId } })
  }
  + }
  + if (!insufficientBalance) {
  models.User.findOne({ where: { id: req.body.UserId, role: insecurity.roles.customer } })
  .then(user => {
  if (user) {
  @@ -30,6 +38,7 @@ module.exports.upgradeToDeluxe = function upgradeToDeluxe () {
  })
  }
  }
  +}
  module.exports.deluxeMembershipStatus = function deluxeMembershipStatus () {
  return (req, res, next) => {
  