diff options
author | Ian Coleman <coleman.ian@gmail.com> | 2014-10-13 11:10:43 +1100 |
---|---|---|
committer | Ian Coleman <coleman.ian@gmail.com> | 2014-10-13 11:10:43 +1100 |
commit | d9ca83979293d38d84fdc735f0e07d049eb9a7f2 (patch) | |
tree | b3237362e9b17a9eb0fd1fd7c031ea31799d7393 /src | |
parent | 1543fdbf090abaccffbf74b2417e676560da2a33 (diff) | |
download | BIP39-d9ca83979293d38d84fdc735f0e07d049eb9a7f2.tar.gz BIP39-d9ca83979293d38d84fdc735f0e07d049eb9a7f2.tar.zst BIP39-d9ca83979293d38d84fdc735f0e07d049eb9a7f2.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/index.html | 21 | ||||
-rw-r--r-- | src/js/index.js | 11 |
2 files changed, 2 insertions, 30 deletions
diff --git a/src/index.html b/src/index.html index 5ff997b..0e552fc 100644 --- a/src/index.html +++ b/src/index.html | |||
@@ -117,16 +117,6 @@ | |||
117 | <p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">BIP44 spec</a></p> | 117 | <p>For more info see the <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">BIP44 spec</a></p> |
118 | </div> | 118 | </div> |
119 | <div class="form-group"> | 119 | <div class="form-group"> |
120 | <label for="network-bip44" class="col-sm-2 control-label">Coin</label> | ||
121 | <div class="col-sm-10"> | ||
122 | <select id="network-bip44" class="network form-control"> | ||
123 | <option value="bitcoin">Bitcoin</option> | ||
124 | <option value="bitcoin-testnet">Bitcoin Testnet</option> | ||
125 | <option value="litecoin">Litecoin</option> | ||
126 | </select> | ||
127 | </div> | ||
128 | </div> | ||
129 | <div class="form-group"> | ||
130 | <label for="purpose" class="col-sm-2 control-label"> | 120 | <label for="purpose" class="col-sm-2 control-label"> |
131 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank">Purpose</a> | 121 | <a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#purpose" target="_blank">Purpose</a> |
132 | </label> | 122 | </label> |
@@ -205,17 +195,6 @@ | |||
205 | <div class="col-md-12"> | 195 | <div class="col-md-12"> |
206 | <h2>Derived Addresses</h2> | 196 | <h2>Derived Addresses</h2> |
207 | <p>Note these addreses are derived from the <strong>BIP32 Extended Key</strong></p> | 197 | <p>Note these addreses are derived from the <strong>BIP32 Extended Key</strong></p> |
208 | <div class="form-group"> | ||
209 | <label for="network-address-type" class="col-sm-2 control-label">Coin</label> | ||
210 | <div class="col-sm-10"> | ||
211 | <select id="network-address-type" class="network form-control"> | ||
212 | <option value="bitcoin">Bitcoin</option> | ||
213 | <option value="bitcoin-testnet">Bitcoin Testnet</option> | ||
214 | <option value="litecoin">Litecoin</option> | ||
215 | <option value="dogecoin">Dogecoin</option> | ||
216 | </select> | ||
217 | </div> | ||
218 | </div> | ||
219 | <table class="table table-striped"> | 198 | <table class="table table-striped"> |
220 | <thead> | 199 | <thead> |
221 | <th> | 200 | <th> |
diff --git a/src/js/index.js b/src/js/index.js index bad4cfb..0ce039a 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -15,8 +15,6 @@ | |||
15 | var DOM = {}; | 15 | var DOM = {}; |
16 | DOM.network = $(".network"); | 16 | DOM.network = $(".network"); |
17 | DOM.phraseNetwork = $("#network-phrase"); | 17 | DOM.phraseNetwork = $("#network-phrase"); |
18 | DOM.bip44Network = $("#network-bip44"); | ||
19 | DOM.addressNetwork = $("#network-address-type"); | ||
20 | DOM.phrase = $(".phrase"); | 18 | DOM.phrase = $(".phrase"); |
21 | DOM.passphrase = $(".passphrase"); | 19 | DOM.passphrase = $(".passphrase"); |
22 | DOM.generate = $(".generate"); | 20 | DOM.generate = $(".generate"); |
@@ -84,15 +82,10 @@ | |||
84 | } | 82 | } |
85 | else if (n == "dogecoin") { | 83 | else if (n == "dogecoin") { |
86 | network = Bitcoin.networks.dogecoin; | 84 | network = Bitcoin.networks.dogecoin; |
87 | var NO_BIP44_VALUE = 9999; | 85 | var UNOFFICIAL_BIP44_COIN = 9999; |
88 | DOM.bip44coin.val(NO_BIP44_VALUE); // This coin is not in BIP44 | 86 | DOM.bip44coin.val(UNOFFICIAL_BIP44_COIN); // This coin is not in BIP44 |
89 | } | 87 | } |
90 | setBip44DerivationPath(); | 88 | setBip44DerivationPath(); |
91 | DOM.phraseNetwork.val(n); | ||
92 | DOM.bip44Network.val(n); | ||
93 | if(e.target != DOM.addressNetwork.dom){ | ||
94 | DOM.addressNetwork.val(n); | ||
95 | } | ||
96 | delayedPhraseChanged(); | 89 | delayedPhraseChanged(); |
97 | } | 90 | } |
98 | 91 | ||