mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-29 08:35:49 +00:00
JS: Correctly construct submit request when using local_signing.
This commit is contained in:
@@ -138,6 +138,12 @@ Request.prototype.tx_json = function (j) {
|
||||
return this;
|
||||
};
|
||||
|
||||
Request.prototype.tx_blob = function (j) {
|
||||
this.message.tx_blob = j;
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Request.prototype.ripple_state = function (account, issuer, currency) {
|
||||
this.message.ripple_state = {
|
||||
'accounts' : [
|
||||
|
||||
@@ -356,6 +356,7 @@ Transaction.prototype.submit = function (callback) {
|
||||
return this;
|
||||
} else if (this.remote.local_signing) {
|
||||
this.sign();
|
||||
request.tx_blob(this.serialize().to_hex());
|
||||
} else {
|
||||
if (!this.remote.trusted) {
|
||||
this.emit('error', {
|
||||
@@ -363,13 +364,13 @@ Transaction.prototype.submit = function (callback) {
|
||||
'result_message' : "Attempt to give a secret to an untrusted server."
|
||||
});
|
||||
return this;
|
||||
} else {
|
||||
request.secret(this._secret);
|
||||
}
|
||||
|
||||
request.secret(this._secret);
|
||||
request.build_path(this._build_path);
|
||||
request.tx_json(this.tx_json);
|
||||
}
|
||||
|
||||
request.build_path(this._build_path);
|
||||
request.tx_json(this.tx_json);
|
||||
request.request();
|
||||
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user