mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-05 16:58:01 +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;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Request.prototype.tx_blob = function (j) {
|
||||||
|
this.message.tx_blob = j;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
Request.prototype.ripple_state = function (account, issuer, currency) {
|
Request.prototype.ripple_state = function (account, issuer, currency) {
|
||||||
this.message.ripple_state = {
|
this.message.ripple_state = {
|
||||||
'accounts' : [
|
'accounts' : [
|
||||||
|
|||||||
@@ -356,6 +356,7 @@ Transaction.prototype.submit = function (callback) {
|
|||||||
return this;
|
return this;
|
||||||
} else if (this.remote.local_signing) {
|
} else if (this.remote.local_signing) {
|
||||||
this.sign();
|
this.sign();
|
||||||
|
request.tx_blob(this.serialize().to_hex());
|
||||||
} else {
|
} else {
|
||||||
if (!this.remote.trusted) {
|
if (!this.remote.trusted) {
|
||||||
this.emit('error', {
|
this.emit('error', {
|
||||||
@@ -363,13 +364,13 @@ Transaction.prototype.submit = function (callback) {
|
|||||||
'result_message' : "Attempt to give a secret to an untrusted server."
|
'result_message' : "Attempt to give a secret to an untrusted server."
|
||||||
});
|
});
|
||||||
return this;
|
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();
|
request.request();
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
Reference in New Issue
Block a user