aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2021-10-29 08:15:43 -0400
committerAdam Soltys <[email protected]>2021-12-02 19:51:00 -0500
commit696a6dfb8c02b584f615a8d31301059fa3f6eb34 (patch)
treec7bf12e761de72f21d21ce0e314cee7c644618a2
parentc8214d587af93c12826e5cb09e5421a9219dda36 (diff)
downloadcoinos-server-696a6dfb8c02b584f615a8d31301059fa3f6eb34.tar.gz
coinos-server-696a6dfb8c02b584f615a8d31301059fa3f6eb34.zip
parse address index as int
-rw-r--r--routes/users.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/users.js b/routes/users.js
index 0c258155..d9a04304 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -437,9 +437,10 @@ app.get(
await lq.getNewAddress()
);
const parts = hdkeypath.split("/");
- i = parts[parts.length - 1].slice(0, -1);
+ i = parseInt(parts[parts.length - 1].slice(0, -1));
}
+ l.info("liquid address index", i);
if (!i) throw new Error("Problem generating address");
hd = fromBase58(config.liquid.masterkey, n).derivePath(`m/0'/0'/${i}'`);