diff options
author | Ian Coleman <ian@iancoleman.io> | 2018-05-29 08:47:23 +1000 |
---|---|---|
committer | Ian Coleman <ian@iancoleman.io> | 2018-05-29 11:30:48 +1000 |
commit | bddd5d9f958b14522a5380931fa10ad84ac862b6 (patch) | |
tree | 3703bffe8156ad585e1a13e5e00c8fcf23b6ed67 | |
parent | cbd0625ff7742ac5180b39139d2f6ee79730b934 (diff) | |
download | BIP39-bddd5d9f958b14522a5380931fa10ad84ac862b6.tar.gz BIP39-bddd5d9f958b14522a5380931fa10ad84ac862b6.tar.zst BIP39-bddd5d9f958b14522a5380931fa10ad84ac862b6.zip |
Add BIP84 unavailable indicator to UI
-rw-r--r-- | src/index.html | 136 | ||||
-rw-r--r-- | src/js/index.js | 6 |
2 files changed, 79 insertions, 63 deletions
diff --git a/src/index.html b/src/index.html index 916ec81..ea667ee 100644 --- a/src/index.html +++ b/src/index.html | |||
@@ -506,79 +506,89 @@ | |||
506 | <div id="bip84" class="tab-pane"> | 506 | <div id="bip84" class="tab-pane"> |
507 | <form class="form-horizontal" role="form"> | 507 | <form class="form-horizontal" role="form"> |
508 | <br> | 508 | <br> |
509 | <div class="col-sm-2"></div> | 509 | <div class="unavailable hidden"> |
510 | <div class="col-sm-10"> | 510 | <div class="form-group"> |
511 | <p> | 511 | <div class="col-sm-2"></div> |
512 | For more info see the | 512 | <div class="col-sm-10"> |
513 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki" target="_blank">BIP84 spec</a>. | 513 | <p>BIP84 is unavailable for this coin.</p> |
514 | </p> | 514 | </div> |
515 | </div> | ||
516 | <div class="form-group"> | ||
517 | <label for="purpose" class="col-sm-2 control-label"> | ||
518 | Purpose | ||
519 | </label> | ||
520 | <div class="col-sm-10"> | ||
521 | <input id="purpose" type="text" class="purpose form-control" value="84" readonly> | ||
522 | </div> | 515 | </div> |
523 | </div> | 516 | </div> |
524 | <div class="form-group"> | 517 | <div class="available"> |
525 | <label for="coin" class="col-sm-2 control-label"> | 518 | <div class="col-sm-2"></div> |
526 | Coin | ||
527 | </label> | ||
528 | <div class="col-sm-10"> | 519 | <div class="col-sm-10"> |
529 | <input id="coin" type="text" class="coin form-control" value="0" readonly> | 520 | <p> |
521 | For more info see the | ||
522 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki" target="_blank">BIP84 spec</a>. | ||
523 | </p> | ||
530 | </div> | 524 | </div> |
531 | </div> | 525 | <div class="form-group"> |
532 | <div class="form-group"> | 526 | <label for="purpose" class="col-sm-2 control-label"> |
533 | <label for="account" class="col-sm-2 control-label"> | 527 | Purpose |
534 | Account | 528 | </label> |
535 | </label> | 529 | <div class="col-sm-10"> |
536 | <div class="col-sm-10"> | 530 | <input id="purpose" type="text" class="purpose form-control" value="84" readonly> |
537 | <input id="account" type="text" class="account form-control" value="0"> | 531 | </div> |
538 | </div> | 532 | </div> |
539 | </div> | 533 | <div class="form-group"> |
540 | <div class="form-group"> | 534 | <label for="coin" class="col-sm-2 control-label"> |
541 | <label for="change" class="col-sm-2 control-label"> | 535 | Coin |
542 | External / Internal | 536 | </label> |
543 | </label> | 537 | <div class="col-sm-10"> |
544 | <div class="col-sm-10"> | 538 | <input id="coin" type="text" class="coin form-control" value="0" readonly> |
545 | <input id="change" type="text" class="change form-control" value="0"> | 539 | </div> |
546 | </div> | 540 | </div> |
547 | </div> | 541 | <div class="form-group"> |
548 | <div class="form-group"> | 542 | <label for="account" class="col-sm-2 control-label"> |
549 | <label class="col-sm-2 control-label"> | 543 | Account |
550 | </label> | 544 | </label> |
551 | <div class="col-sm-10"> | 545 | <div class="col-sm-10"> |
552 | <p>The account extended keys can be used for importing to most BIP84 compatible wallets.</p> | 546 | <input id="account" type="text" class="account form-control" value="0"> |
547 | </div> | ||
553 | </div> | 548 | </div> |
554 | </div> | 549 | <div class="form-group"> |
555 | <div class="form-group"> | 550 | <label for="change" class="col-sm-2 control-label"> |
556 | <label for="account-xprv" class="col-sm-2 control-label"> | 551 | External / Internal |
557 | <span>Account Extended Private Key</span> | 552 | </label> |
558 | </label> | 553 | <div class="col-sm-10"> |
559 | <div class="col-sm-10"> | 554 | <input id="change" type="text" class="change form-control" value="0"> |
560 | <textarea id="account-xprv" type="text" class="account-xprv form-control" readonly data-show-qr></textarea> | 555 | </div> |
561 | </div> | 556 | </div> |
562 | </div> | 557 | <div class="form-group"> |
563 | <div class="form-group"> | 558 | <label class="col-sm-2 control-label"> |
564 | <label for="account-xpub" class="col-sm-2 control-label"> | 559 | </label> |
565 | <span>Account Extended Public Key</span> | 560 | <div class="col-sm-10"> |
566 | </label> | 561 | <p>The account extended keys can be used for importing to most BIP84 compatible wallets.</p> |
567 | <div class="col-sm-10"> | 562 | </div> |
568 | <textarea id="account-xpub" type="text" class="account-xpub form-control" readonly data-show-qr></textarea> | ||
569 | </div> | 563 | </div> |
570 | </div> | 564 | <div class="form-group"> |
571 | <div class="form-group"> | 565 | <label for="account-xprv" class="col-sm-2 control-label"> |
572 | <label class="col-sm-2 control-label"> | 566 | <span>Account Extended Private Key</span> |
573 | </label> | 567 | </label> |
574 | <div class="col-sm-10"> | 568 | <div class="col-sm-10"> |
575 | <p>The BIP32 derivation path and extended keys are the basis for the derived addresses.</p> | 569 | <textarea id="account-xprv" type="text" class="account-xprv form-control" readonly data-show-qr></textarea> |
570 | </div> | ||
576 | </div> | 571 | </div> |
577 | </div> | 572 | <div class="form-group"> |
578 | <div class="form-group"> | 573 | <label for="account-xpub" class="col-sm-2 control-label"> |
579 | <label for="bip84-path" class="col-sm-2 control-label">BIP32 Derivation Path</label> | 574 | <span>Account Extended Public Key</span> |
580 | <div class="col-sm-10"> | 575 | </label> |
581 | <input id="bip84-path" type="text" class="path form-control" value="m/84'/0'/0'/0" readonly="readonly"> | 576 | <div class="col-sm-10"> |
577 | <textarea id="account-xpub" type="text" class="account-xpub form-control" readonly data-show-qr></textarea> | ||
578 | </div> | ||
579 | </div> | ||
580 | <div class="form-group"> | ||
581 | <label class="col-sm-2 control-label"> | ||
582 | </label> | ||
583 | <div class="col-sm-10"> | ||
584 | <p>The BIP32 derivation path and extended keys are the basis for the derived addresses.</p> | ||
585 | </div> | ||
586 | </div> | ||
587 | <div class="form-group"> | ||
588 | <label for="bip84-path" class="col-sm-2 control-label">BIP32 Derivation Path</label> | ||
589 | <div class="col-sm-10"> | ||
590 | <input id="bip84-path" type="text" class="path form-control" value="m/84'/0'/0'/0" readonly="readonly"> | ||
591 | </div> | ||
582 | </div> | 592 | </div> |
583 | </div> | 593 | </div> |
584 | </form> | 594 | </form> |
diff --git a/src/js/index.js b/src/js/index.js index afa743d..6cff8c4 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -77,6 +77,8 @@ | |||
77 | DOM.bip49accountXprv = $("#bip49 .account-xprv"); | 77 | DOM.bip49accountXprv = $("#bip49 .account-xprv"); |
78 | DOM.bip49accountXpub = $("#bip49 .account-xpub"); | 78 | DOM.bip49accountXpub = $("#bip49 .account-xpub"); |
79 | DOM.bip49change = $("#bip49 .change"); | 79 | DOM.bip49change = $("#bip49 .change"); |
80 | DOM.bip84unavailable = $("#bip84 .unavailable"); | ||
81 | DOM.bip84available = $("#bip84 .available"); | ||
80 | DOM.bip84path = $("#bip84-path"); | 82 | DOM.bip84path = $("#bip84-path"); |
81 | DOM.bip84purpose = $("#bip84 .purpose"); | 83 | DOM.bip84purpose = $("#bip84 .purpose"); |
82 | DOM.bip84coin = $("#bip84 .coin"); | 84 | DOM.bip84coin = $("#bip84 .coin"); |
@@ -1415,6 +1417,8 @@ | |||
1415 | function showSegwitAvailable() { | 1417 | function showSegwitAvailable() { |
1416 | DOM.bip49unavailable.addClass("hidden"); | 1418 | DOM.bip49unavailable.addClass("hidden"); |
1417 | DOM.bip49available.removeClass("hidden"); | 1419 | DOM.bip49available.removeClass("hidden"); |
1420 | DOM.bip84unavailable.addClass("hidden"); | ||
1421 | DOM.bip84available.removeClass("hidden"); | ||
1418 | DOM.bip141unavailable.addClass("hidden"); | 1422 | DOM.bip141unavailable.addClass("hidden"); |
1419 | DOM.bip141available.removeClass("hidden"); | 1423 | DOM.bip141available.removeClass("hidden"); |
1420 | } | 1424 | } |
@@ -1422,6 +1426,8 @@ | |||
1422 | function showSegwitUnavailable() { | 1426 | function showSegwitUnavailable() { |
1423 | DOM.bip49available.addClass("hidden"); | 1427 | DOM.bip49available.addClass("hidden"); |
1424 | DOM.bip49unavailable.removeClass("hidden"); | 1428 | DOM.bip49unavailable.removeClass("hidden"); |
1429 | DOM.bip84available.addClass("hidden"); | ||
1430 | DOM.bip84unavailable.removeClass("hidden"); | ||
1425 | DOM.bip141available.addClass("hidden"); | 1431 | DOM.bip141available.addClass("hidden"); |
1426 | DOM.bip141unavailable.removeClass("hidden"); | 1432 | DOM.bip141unavailable.removeClass("hidden"); |
1427 | } | 1433 | } |