|
|
@ -5,6 +5,7 @@ var async = require('async'); |
|
|
|
var log = require('npmlog'); |
|
|
|
log.debug = log.verbose; |
|
|
|
log.disableColor(); |
|
|
|
var EmailValidator = require('email-validator'); |
|
|
|
|
|
|
|
var WalletUtils = require('bitcore-wallet-utils'); |
|
|
|
var Bitcore = WalletUtils.Bitcore; |
|
|
@ -449,7 +450,7 @@ WalletService.prototype.savePreferences = function(opts, cb) { |
|
|
|
opts = opts || {}; |
|
|
|
|
|
|
|
if (opts.email) { |
|
|
|
if (opts.email.length > 254 || opts.email.indexOf('@') == -1) { |
|
|
|
if (!EmailValidator.validate(opts.email)) { |
|
|
|
return cb(new ClientError('Invalid email address')); |
|
|
|
} |
|
|
|
} |
|
|
|