diff options
Diffstat (limited to 'src/js/index.js')
-rw-r--r-- | src/js/index.js | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/src/js/index.js b/src/js/index.js index 5b8aedb..f8b6761 100644 --- a/src/js/index.js +++ b/src/js/index.js | |||
@@ -239,14 +239,30 @@ | |||
239 | 239 | ||
240 | function displayAddresses(start, total) { | 240 | function displayAddresses(start, total) { |
241 | for (var i=0; i<total; i++) { | 241 | for (var i=0; i<total; i++) { |
242 | var index = i+ start; | 242 | var index = i + start; |
243 | var key = bip32ExtendedKey.derive(index); | 243 | new TableRow(index); |
244 | var address = key.getAddress().toString(); | ||
245 | var privkey = key.privKey.toWIF(network); | ||
246 | addAddressToList(index, address, privkey); | ||
247 | } | 244 | } |
248 | } | 245 | } |
249 | 246 | ||
247 | function TableRow(index) { | ||
248 | |||
249 | function init() { | ||
250 | calculateValues(); | ||
251 | } | ||
252 | |||
253 | function calculateValues() { | ||
254 | setTimeout(function() { | ||
255 | var key = bip32ExtendedKey.derive(index); | ||
256 | var address = key.getAddress().toString(); | ||
257 | var privkey = key.privKey.toWIF(network); | ||
258 | addAddressToList(index, address, privkey); | ||
259 | }, 50) | ||
260 | } | ||
261 | |||
262 | init(); | ||
263 | |||
264 | } | ||
265 | |||
250 | function showMore() { | 266 | function showMore() { |
251 | var start = DOM.addresses.children().length; | 267 | var start = DOM.addresses.children().length; |
252 | var rowsToAdd = parseInt(DOM.rowsToAdd.val()); | 268 | var rowsToAdd = parseInt(DOM.rowsToAdd.val()); |
@@ -261,11 +277,7 @@ | |||
261 | return; | 277 | return; |
262 | } | 278 | } |
263 | } | 279 | } |
264 | showPending(); | ||
265 | setTimeout(function() { | ||
266 | displayAddresses(start, rowsToAdd); | 280 | displayAddresses(start, rowsToAdd); |
267 | hidePending(); | ||
268 | }, 50); | ||
269 | } | 281 | } |
270 | 282 | ||
271 | function clearDisplay() { | 283 | function clearDisplay() { |