Fix for missing transaction.remote

This commit is contained in:
wltsmrz
2014-04-25 01:38:01 -07:00
parent 30fd0e7bff
commit 903e480130

View File

@@ -280,6 +280,13 @@ Transaction.prototype._getServer = function() {
*/
Transaction.prototype.complete = function() {
if (this.remote) {
if (!this.remote.trusted && !this.remote.local_signing) {
this.emit('error', new RippleError('tejServerUntrusted', 'Attempt to give secret to untrusted server'));
return false;
}
}
// Try to auto-fill the secret
if (!this._secret && !(this._secret = this._accountSecret(this.tx_json.Account))) {
this.emit('error', new RippleError('tejSecretUnknown', 'Missing secret'));
@@ -297,11 +304,6 @@ Transaction.prototype.complete = function() {
}
}
if (!this.remote.trusted && !this.remote.local_signing) {
this.emit('error', new RippleError('tejServerUntrusted', 'Attempt to give secret to untrusted server'));
return false;
}
// If the Fee hasn't been set, one needs to be computed by
// an assigned server
if (this.remote && typeof this.tx_json.Fee === 'undefined') {