diff --git a/html/js/cn_util.js b/html/js/cn_util.js index 420935f..53c8ed0 100644 --- a/html/js/cn_util.js +++ b/html/js/cn_util.js @@ -437,37 +437,29 @@ var cnUtil = (function(initConfig) { return bintohex(output); };*/ - this.create_address_old = function(seed) { + + this.create_address = function(seed) { var keys = {}; var first; - if (seed.length !== 64) { first = this.cn_fast_hash(seed); } else { first = seed; //only input reduced seeds or this will not give you the result you want } - keys.spend = this.generate_keys(first); - var second = this.cn_fast_hash(first); - keys.view = this.generate_keys(second); - keys.public_addr = this.pubkeys_to_string(keys.spend.pub, keys.view.pub); - return keys; - }; - this.create_address = function(seed) { - var keys = {}; - var first; + keys.spend = this.generate_keys(first); if (seed.length !== 64) { - first = this.cn_fast_hash(seed); + var second = this.cn_fast_hash(first); } else { - first = seed; //only input reduced seeds or this will not give you the result you want + var second = this.cn_fast_hash(keys.spend.sec); } - keys.spend = this.generate_keys(first); - var second = this.cn_fast_hash(first); + keys.view = this.generate_keys(second); keys.public_addr = this.pubkeys_to_string(keys.spend.pub, keys.view.pub); return keys; }; + this.create_addr_prefix = function(seed) { var first; if (seed.length !== 64) { diff --git a/html/js/config.js b/html/js/config.js index f8a04d5..ea45e12 100755 --- a/html/js/config.js +++ b/html/js/config.js @@ -1,6 +1,6 @@ var config = { apiUrl: "http://127.0.0.1:1984/", - testnet: false, + testnet: true, coinUnitPlaces: 12, txMinConfirms: 10, // corresponds to CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE in Monero txCoinbaseMinConfirms: 60, // corresponds to CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW in Monero