From 445a3823f1accb61941d86f5b602639989025255 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 12 Oct 2020 15:57:46 -0700 Subject: return confidentialAddress as well --- routes/users.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'routes/users.js') diff --git a/routes/users.js b/routes/users.js index 6e9678fe..becd8d40 100644 --- a/routes/users.js +++ b/routes/users.js @@ -399,7 +399,7 @@ app.get( "/address", ah(async (req, res) => { let { network, type } = req.query; - let address; + let address, confidentialAddress; type = { bech32: "p2wpkh", @@ -460,13 +460,13 @@ app.get( n ); - ({ confidentialAddress: address } = p[type]({ + ({ confidentialAddress } = p[type]({ redeem: p2wpkh, network: n, blindkey: blindkey.publicKey })); - lq.importBlindingKey(address, blindkey.privateKey.toString('hex')); + lq.importBlindingKey(confidentialAddress, blindkey.privateKey.toString('hex')); } else { ({ address } = p[type]({ redeem: p.p2wpkh({ @@ -478,7 +478,7 @@ app.get( } } - res.send(address); + res.send({ address, confidentialAddress }); }) ); -- cgit v1.2.3