Browse Source

improve error message

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

2
lib/server.js

@ -1204,7 +1204,7 @@ WalletService.prototype.signTx = function(opts, cb) {
if (!self.clientVersion || /^bw.-0\.0\./.test(self.clientVersion)) { if (!self.clientVersion || /^bw.-0\.0\./.test(self.clientVersion)) {
if (!_.startsWith(txp.version, '1.')) { if (!_.startsWith(txp.version, '1.')) {
return cb(new ClientError(Errors.codes.UPGRADE_NEEDED, 'This spend proposal was created using a newer version of the client app')); return cb(new ClientError(Errors.codes.UPGRADE_NEEDED, 'To sign this spend proposal you need to upgrade your client app.'));
} }
} }

2
test/integration/server.js

@ -4338,7 +4338,7 @@ describe('Wallet service', function() {
verifyStub.restore(); verifyStub.restore();
should.exist(err); should.exist(err);
err.code.should.equal('UPGRADE_NEEDED'); err.code.should.equal('UPGRADE_NEEDED');
err.message.should.contain('newer version'); err.message.should.contain('sign this spend proposal');
done(); done();
}); });
}); });

Loading…
Cancel
Save