Coin selection is done from a single control

There were three places to select the coin type, which was getting
confusing. Only one place to select it is needed.
This commit is contained in:
Ian Coleman
2014-10-13 11:10:43 +11:00
parent 1543fdbf09
commit d9ca839792
2 changed files with 2 additions and 30 deletions
-21
View File
@@ -116,16 +116,6 @@
<div class="col-sm-10"> <div class="col-sm-10">
<p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">BIP44 spec</a></p> <p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">BIP44 spec</a></p>
</div> </div>
<div class="form-group">
<label for="network-bip44" class="col-sm-2 control-label">Coin</label>
<div class="col-sm-10">
<select id="network-bip44" class="network form-control">
<option value="bitcoin">Bitcoin</option>
<option value="bitcoin-testnet">Bitcoin Testnet</option>
<option value="litecoin">Litecoin</option>
</select>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="purpose" class="col-sm-2 control-label"> <label for="purpose" class="col-sm-2 control-label">
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank">Purpose</a> <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank">Purpose</a>
@@ -205,17 +195,6 @@
<div class="col-md-12"> <div class="col-md-12">
<h2>Derived Addresses</h2> <h2>Derived Addresses</h2>
<p>Note these addreses are derived from the <strong>BIP32 Extended Key</strong></p> <p>Note these addreses are derived from the <strong>BIP32 Extended Key</strong></p>
<div class="form-group">
<label for="network-address-type" class="col-sm-2 control-label">Coin</label>
<div class="col-sm-10">
<select id="network-address-type" class="network form-control">
<option value="bitcoin">Bitcoin</option>
<option value="bitcoin-testnet">Bitcoin Testnet</option>
<option value="litecoin">Litecoin</option>
<option value="dogecoin">Dogecoin</option>
</select>
</div>
</div>
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<th> <th>
+2 -9
View File
@@ -15,8 +15,6 @@
var DOM = {}; var DOM = {};
DOM.network = $(".network"); DOM.network = $(".network");
DOM.phraseNetwork = $("#network-phrase"); DOM.phraseNetwork = $("#network-phrase");
DOM.bip44Network = $("#network-bip44");
DOM.addressNetwork = $("#network-address-type");
DOM.phrase = $(".phrase"); DOM.phrase = $(".phrase");
DOM.passphrase = $(".passphrase"); DOM.passphrase = $(".passphrase");
DOM.generate = $(".generate"); DOM.generate = $(".generate");
@@ -84,15 +82,10 @@
} }
else if (n == "dogecoin") { else if (n == "dogecoin") {
network = Bitcoin.networks.dogecoin; network = Bitcoin.networks.dogecoin;
var NO_BIP44_VALUE = 9999; var UNOFFICIAL_BIP44_COIN = 9999;
DOM.bip44coin.val(NO_BIP44_VALUE); // This coin is not in BIP44 DOM.bip44coin.val(UNOFFICIAL_BIP44_COIN); // This coin is not in BIP44
} }
setBip44DerivationPath(); setBip44DerivationPath();
DOM.phraseNetwork.val(n);
DOM.bip44Network.val(n);
if(e.target != DOM.addressNetwork.dom){
DOM.addressNetwork.val(n);
}
delayedPhraseChanged(); delayedPhraseChanged();
} }