From bd82cfd76f660c727256ce1cf9e730a6831117f2 Mon Sep 17 00:00:00 2001 From: Kiyomichi Kosaka Date: Mon, 5 Apr 2021 13:43:54 +0200 Subject: [PATCH 1/2] Add tooltip to custom path field and make names in HD wallet setting a bit more precise. --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 6b5f434..da93887 100644 --- a/index.html +++ b/index.html @@ -1200,7 +1200,7 @@ @@ -1463,8 +1463,8 @@ HD wallet hardened path derivation:

The path derivation for hardened paths was calculated wrong in earlier versions of coinb.in. Please select the old path derivation to recover HD wallet keys generated with older version of coinb.in.

From f408c9b251bc36aea54d9551c1a59f11ebc3aa75 Mon Sep 17 00:00:00 2001 From: Kiyomichi Kosaka Date: Mon, 5 Apr 2021 13:46:09 +0200 Subject: [PATCH 2/2] Add the posibility to specify hardened indicies on HD wallets. --- js/coinbin.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/js/coinbin.js b/js/coinbin.js index 33382ce..1a3cccb 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -1701,15 +1701,23 @@ $(document).ready(function() { function deriveHDaddress() { var hd = coinjs.hd($("#verifyHDaddress .hdKey").html()); - var index_start = $("#verifyHDaddress .derivation_index_start").val()*1; - var index_end = $("#verifyHDaddress .derivation_index_end").val()*1; + var index_start = $("#verifyHDaddress .derivation_index_start").val(); + if ((index_start.length > 1) && (index_start[index_start.length - 1] == '\'')) { + var use_private_index = '\''; + index_start = index_start.replace(/[']/, "") * 1; + } else { + var use_private_index = ''; + index_start = index_start.replace(/[']/, "") * 1; + } + var index_end = $("#verifyHDaddress .derivation_index_end").val().replace(/[']/, "") * 1; + $("#verifyHDaddress .derivation_index_end").val(index_end + use_private_index); var html = ''; $("#verifyHDaddress .derived_data table tbody").html(""); for(var i=index_start;i<=index_end;i++){ if($("#hdpathtype option:selected").val()=='simple'){ var derived = hd.derive(i); } else { - var derived = hd.derive_path(($("#hdpath input").val().replace(/\/+$/, ""))+'/'+i); + var derived = hd.derive_path(($("#hdpath input").val().replace(/\/+$/, ""))+'/'+i+use_private_index); } html += ''; html += ''+i+'';