diff --git a/README.md b/README.md index 96e3538..796e391 100755 --- a/README.md +++ b/README.md @@ -14,17 +14,16 @@ to use, host and modify. Additionally, some features were added/changed as compa to MyMonero. They include: - google analytics, cloudflare, images and flash were removed. - - frontend's html and javascript upgrads and cleanups. + - frontend's html and javascript upgrades and cleanups. - transaction service fee was set to zero (same as in MyMonero). - the wallets generated use 25 word mnemonics, fully compatible with official monero wallets (13 word mnemonics generated by MyMonero work as usual though). - import wallet fee was reduced. - added support of testnet and stagenet networks, and mainnet without relying transactions - improved handling of mempool, coinbase, locked and unlocked transactions. - - added dynamic miner fees. - view only mode added. - private tx key given to a user which can be used to prove sending xmr to a recipient. - - Cross-Origin Resource Sharing (CORS) was disabled. + - Cross-Origin Resource Sharing (CORS) disabled. - transaction confirmation window added to double check tx details before its commited. - ability to select transaction priority. - legacy address + payment_id system replaced with integrated addresses for better privacy. diff --git a/html/js/config.js b/html/js/config.js index f5f1960..bc8fdb6 100755 --- a/html/js/config.js +++ b/html/js/config.js @@ -3,7 +3,7 @@ var config = { mainnetExplorerUrl: "https://xmrchain.com/", testnetExplorerUrl: "https://testnet.xmrchain.com/", stagenetExplorerUrl: "http://162.210.173.150:8083/", - nettype: 2, /* 0 - MAINNET, 1 - TESTNET, 2 - STAGENET */ + nettype: 1, /* 0 - MAINNET, 1 - TESTNET, 2 - STAGENET */ coinUnitPlaces: 12, txMinConfirms: 10, // corresponds to CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE in Monero txCoinbaseMinConfirms: 60, // corresponds to CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW in Monero diff --git a/html/js/controllers/login.js b/html/js/controllers/login.js index 42ae9d4..fd0155f 100755 --- a/html/js/controllers/login.js +++ b/html/js/controllers/login.js @@ -35,7 +35,7 @@ thinwalletCtrls.controller("LoginCtrl", function($scope, $location, AccountServi $scope.error = ''; }; - $scope.decode = true; + $scope.decode = false; $scope.mnemonic_language = 'english'; @@ -46,7 +46,6 @@ thinwalletCtrls.controller("LoginCtrl", function($scope, $location, AccountServi // just some dummy account, as not to fill login form every time. $scope.mnemonic = "eluded extra boyfriend gels hiding waxing feline unbending drying pancakes dwindling fuming friendly pamphlet myth tepid snug budget android vogue losing each affair afraid affair"; } else { - $scope.decode = false; $scope.address = "44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A"; $scope.view_key = "f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501" ; } @@ -81,8 +80,6 @@ thinwalletCtrls.controller("LoginCtrl", function($scope, $location, AccountServi //var payment_id8 = rand_8(); //var integarted_address = get_account_integrated_address(keys.public_addr, payment_id8); - $scope.decode = false; - return [seed, keys]; }; diff --git a/html/modals/login.html b/html/modals/login.html index 8f2ad4e..3d3c5c9 100755 --- a/html/modals/login.html +++ b/html/modals/login.html @@ -46,31 +46,6 @@ - - -
-
- -
-
{{address}}
-
- -
-
{{view_key}}
-
- -
-
{{spend_key}}
-
- -
-

{{error}}

diff --git a/src/CurrentBlockchainStatus.cpp b/src/CurrentBlockchainStatus.cpp index 60be5cd..345fe25 100755 --- a/src/CurrentBlockchainStatus.cpp +++ b/src/CurrentBlockchainStatus.cpp @@ -130,7 +130,7 @@ CurrentBlockchainStatus::init_monero_blockchain() mcore = unique_ptr(new xmreg::MicroCore{}); // initialize the core using the blockchain path - if (!mcore->init(blockchain_path)) + if (!mcore->init(blockchain_path, net_type)) return false; // get the high level Blockchain object to interact diff --git a/src/MicroCore.cpp b/src/MicroCore.cpp index a12dfaa..d9a4408 100755 --- a/src/MicroCore.cpp +++ b/src/MicroCore.cpp @@ -5,16 +5,6 @@ #include "MicroCore.h" - -namespace -{ -// NOTE: These values should match blockchain.cpp -// TODO: Refactor -const uint64_t mainnet_hard_fork_version_1_till = 1009826; -const uint64_t testnet_hard_fork_version_1_till = 624633; -} - - namespace xmreg { /** @@ -45,31 +35,20 @@ MicroCore::MicroCore(): * Initialize m_blockchain_storage with the BlockchainLMDB object. */ bool -MicroCore::init(const string& _blockchain_path) +MicroCore::init(const string& _blockchain_path, network_type nt) { int db_flags = 0; blockchain_path = _blockchain_path; - //db_flags |= MDB_RDONLY; - db_flags |= MDB_NOLOCK; - //db_flags |= MDB_SYNC; - - // uint64_t DEFAULT_FLAGS = MDB_NOMETASYNC | MDB_NORDAHEAD; + nettype = nt; - //db_flags = DEFAULT_FLAGS; - - HardFork* m_hardfork = nullptr; + db_flags |= MDB_RDONLY; + db_flags |= MDB_NOLOCK; BlockchainDB* db = nullptr; db = new BlockchainLMDB(); - bool use_testnet {false}; - - uint64_t hard_fork_version_1_till = use_testnet ? testnet_hard_fork_version_1_till : mainnet_hard_fork_version_1_till; - - m_hardfork = new HardFork(*db, 1, hard_fork_version_1_till); - try { // try opening lmdb database files @@ -84,13 +63,11 @@ MicroCore::init(const string& _blockchain_path) // check if the blockchain database // is successful opened if(!db->is_open()) - { return false; - } // initialize Blockchain object to manage // the database. - return m_blockchain_storage.init(db, m_hardfork, network_type::MAINNET); + return m_blockchain_storage.init(db, nettype); } /** @@ -349,11 +326,12 @@ MicroCore::~MicroCore() bool init_blockchain(const string& path, MicroCore& mcore, - Blockchain*& core_storage) + Blockchain*& core_storage, + network_type nt) { // initialize the core using the blockchain path - if (!mcore.init(path)) + if (!mcore.init(path, nt)) { cerr << "Error accessing blockchain." << endl; return false; diff --git a/src/MicroCore.h b/src/MicroCore.h index 70a91d7..5c479e6 100755 --- a/src/MicroCore.h +++ b/src/MicroCore.h @@ -34,11 +34,13 @@ class MicroCore { hw::device* m_device; + network_type nettype; + public: MicroCore(); bool - init(const string& _blockchain_path); + init(const string& _blockchain_path, network_type nt); Blockchain& get_core(); @@ -96,8 +98,8 @@ public: bool init_blockchain(const string& path, MicroCore& mcore, - Blockchain*& core_storage); - + Blockchain*& core_storage, + network_type nt); }