From 1b92e7b4eaa80b134e6d7b3c054e5b0e8cb4eb5a Mon Sep 17 00:00:00 2001 From: Nodar Chkuaselidze Date: Fri, 6 Apr 2018 17:55:26 -0700 Subject: [PATCH] wallet-http: sign parameter to create transaction without signatures. --- lib/wallet/http.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/wallet/http.js b/lib/wallet/http.js index 7c3edd68..34085299 100644 --- a/lib/wallet/http.js +++ b/lib/wallet/http.js @@ -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)); });