Add setting to configure old HD wallet generation with hardened paths.

This commit is contained in:
Kiyomichi Kosaka 2021-04-05 13:19:01 +02:00
parent 704f2c96a3
commit 27a2d4efb1
2 changed files with 16 additions and 0 deletions

View File

@ -1456,6 +1456,19 @@
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<b>HD wallet hardened path derivation</b>: <br>
<p class="text-muted">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.</p>
<select class="form-control" id="coinjs_derivation">
<option value="bip32_derivation">BIP32 derivation</option>
<option value="coinbin_broken">Old coinb.in derivation</option>
</select>
</div>
</div>
<br>
<div id="statusSettings" class="hidden alert">

View File

@ -1914,6 +1914,8 @@ $(document).ready(function() {
coinjs.hdkey.pub = $("#coinjs_hdpub").val()*1;
coinjs.hdkey.prv = $("#coinjs_hdprv").val()*1;
coinjs.hd_derivation = $("#coinjs_derivation").val();
configureBroadcast();
configureGetUnspentTx();
@ -1959,6 +1961,7 @@ $(document).ready(function() {
$("#coinjs_multisig").val(o[2]);
$("#coinjs_hdpub").val(o[3]);
$("#coinjs_hdprv").val(o[4]);
$("#coinjs_derivation").val(o[7]);
// hide/show custom screen
if($("option:selected",this).val()=="custom"){