Browse Source

ignore unrecognized preferences

activeAddress
Ivan Socolsky 10 years ago
parent
commit
116bea1aa5
  1. 2
      lib/server.js
  2. 2
      test/integration/server.js

2
lib/server.js

@ -479,6 +479,8 @@ WalletService.prototype.savePreferences = function(opts, cb) {
},
}];
opts = _.pick(opts, _.pluck(preferences, 'name'));
try {
_.each(preferences, function(preference) {
var value = opts[preference.name];

2
test/integration/server.js

@ -1158,6 +1158,7 @@ describe('Wallet service', function() {
email: 'dummy@dummy.com',
language: 'es',
unit: 'bit',
dummy: 'ignored',
}, function(err) {
should.not.exist(err);
server.getPreferences({}, function(err, preferences) {
@ -1166,6 +1167,7 @@ describe('Wallet service', function() {
preferences.email.should.equal('dummy@dummy.com');
preferences.language.should.equal('es');
preferences.unit.should.equal('bit');
should.not.exist(preferences.dummy);
done();
});
});

Loading…
Cancel
Save