mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-30 00:55:49 +00:00
Fix for missing transaction.remote
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user