aboutsummaryrefslogtreecommitdiffstats
path: root/routes/users.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-10-12 15:57:46 -0700
committerAdam Soltys <[email protected]>2020-10-12 15:57:46 -0700
commit445a3823f1accb61941d86f5b602639989025255 (patch)
treecf4d71b2cf21df2466cfbe85315af47daa98e448 /routes/users.js
parent19038304e39f190ea400a50b6c66a671762ee673 (diff)
downloadcoinos-server-445a3823f1accb61941d86f5b602639989025255.tar.gz
coinos-server-445a3823f1accb61941d86f5b602639989025255.zip
return confidentialAddress as well
Diffstat (limited to 'routes/users.js')
-rw-r--r--routes/users.js8
1 files changed, 4 insertions, 4 deletions
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 });
})
);