wallet-http: sign parameter to create transaction without signatures.

This commit is contained in:
Nodar Chkuaselidze 2018-04-06 17:55:26 -07:00
parent f24a9b674f
commit 1b92e7b4ea
No known key found for this signature in database
GPG Key ID: 8E1B4DC29040BD90

View File

@ -465,6 +465,7 @@ class HTTP extends Server {
const valid = Validator.fromRequest(req);
const passphrase = valid.str('passphrase');
const outputs = valid.array('outputs', []);
const sign = valid.bool('sign', true);
const options = {
rate: valid.u64('rate'),
@ -499,7 +500,8 @@ class HTTP extends Server {
const tx = await req.wallet.createTX(options);
await req.wallet.sign(tx, passphrase);
if (sign)
await req.wallet.sign(tx, passphrase);
res.json(200, tx.getJSON(this.network));
});