diff --git a/lib/server.js b/lib/server.js index 44d7825..9ee11a6 100644 --- a/lib/server.js +++ b/lib/server.js @@ -2054,8 +2054,7 @@ WalletService.prototype.getTx = function(opts, cb) { WalletService.prototype.editTxNote = function(opts, cb) { var self = this; - if (!Utils.checkRequired(opts, ['txid'])) - return cb(new ClientError('Required argument missing')); + if (!checkRequired(opts, 'txid', cb)) return; self._runLocked(cb, function(cb) { self.storage.fetchTxNote(self.walletId, opts.txid, function(err, note) { @@ -2084,9 +2083,7 @@ WalletService.prototype.editTxNote = function(opts, cb) { WalletService.prototype.getTxNote = function(opts, cb) { var self = this; - if (!Utils.checkRequired(opts, ['txid'])) - return cb(new ClientError('Required argument missing')); - + if (!checkRequired(opts, 'txid', cb)) return; self.storage.fetchTxNote(self.walletId, opts.txid, cb); };