diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e107ac..60b5961 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.2) -set(PROJECT_NAME +set(PROJECT_NAME/home/mwo/mymonero-app-js/local_modules/mymonero_core_js/monero_utils/monero_sendingFunds_utils.js openmonero) project(${PROJECT_NAME}) diff --git a/README.md b/README.md index aa81682..a2b1872 100755 --- a/README.md +++ b/README.md @@ -22,13 +22,10 @@ to MyMonero. They include: - added support of testnet and stagenet networks, and mainnet without relying transactions - improved handling of mempool, coinbase, locked and unlocked transactions. - 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) 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. - free, time based imports of recent transactions added. - - new transaction details window. - sending xmr to a subaddress (not receiving nor generating subaddresses for now). ## Live stagenet version @@ -99,7 +96,7 @@ git clone --recursive https://github.com/monero-project/monero cd monero/ -make +USE_SINGLE_BUILDDIR=1 make ``` #### Compilation of the OpenMonero (don't run it yet) diff --git a/html/js/cn_util.js b/html/js/cn_util.js index 70944d6..14f48b1 100644 --- a/html/js/cn_util.js +++ b/html/js/cn_util.js @@ -230,6 +230,11 @@ var cnUtil = (function(initConfig) { return mn_random(128); }; + // Generate a 64-bit crypto random + this.rand_8 = function() { + return mn_random(64); + }; + this.encode_varint = function(i) { i = new JSBigInt(i); var out = ''; diff --git a/html/js/controllers/send_coins.js b/html/js/controllers/send_coins.js old mode 100644 new mode 100755 index b90276e..cb90d3a --- a/html/js/controllers/send_coins.js +++ b/html/js/controllers/send_coins.js @@ -60,16 +60,16 @@ class HostedMoneroAPIClient parameters.use_dust = true // Client now filters unmixable by dustthreshold amount (unless sweeping) + non-rct parameters.dust_threshold = mymonero_core_js.monero_config.dustThreshold.toString() const endpointPath = 'get_unspent_outs' - self.$http.post(config.apiUrl + endpointPath, parameters).success( + self.$http.post(config.apiUrl + endpointPath, parameters).then( function(data) { console.log(data); - __proceedTo_parseAndCallBack(data) + __proceedTo_parseAndCallBack(data.data) } - ).error( + ).catch( function(data) { - console.log("error", data); + console.log("error", data.data); fn(data && data.Error ? data.Error : "Something went wrong with getting your available balance for spending"); } ); @@ -90,6 +90,7 @@ class HostedMoneroAPIClient fn(err) return } + console.log("returnValuesByKey", returnValuesByKey); console.log("returnValuesByKey.per_kb_fee" , returnValuesByKey.per_kb_fee) const per_kb_fee__String = returnValuesByKey.per_kb_fee if (per_kb_fee__String == null || per_kb_fee__String == "" || typeof per_kb_fee__String === 'undefined') { @@ -144,12 +145,12 @@ class HostedMoneroAPIClient count: mixinNumber + 1 // Add one to mixin so we can skip real output key if necessary } const endpointPath = 'get_random_outs' - self.$http.post(config.apiUrl + endpointPath, parameters).success( + self.$http.post(config.apiUrl + endpointPath, parameters).then( function(data) { - __proceedTo_parseAndCallBack(data) + __proceedTo_parseAndCallBack(data.data) } - ).error( + ).catch( function(data) { fn(data && data.Error ? data.Error : "Something went wrong while getting decoy outputs"); @@ -191,12 +192,12 @@ class HostedMoneroAPIClient }; parameters.tx = serializedSignedTx const endpointPath = 'submit_raw_tx' - self.$http.post(config.apiUrl + endpointPath, parameters).success( + self.$http.post(config.apiUrl + endpointPath, parameters).then( function(data) { - __proceedTo_parseAndCallBack(data) + __proceedTo_parseAndCallBack(data.data) } - ).error( + ).catch( function(data) { fn(data && data.Error ? data.Error : "Something went wrong with getting your available balance for spending"); @@ -331,7 +332,7 @@ thinwalletCtrls.controller('SendCoinsCtrl', function($scope, $http, $q, AccountS var domain = target.address.replace(/@/g, "."); $http.post(config.apiUrl + "get_txt_records", { domain: domain - }).success(function(data) { + }).then(function(data) { var records = data.records; var oaRecords = []; console.log(domain + ": ", data.records); @@ -386,7 +387,7 @@ thinwalletCtrls.controller('SendCoinsCtrl', function($scope, $http, $q, AccountS fn("Failed to decode OpenAlias address: " + oaRecords[0].address + ": " + e); return; } - }).error(function(data) { + }).catch(function(data) { fn("Failed to resolve DNS records for '" + domain + "': " + ((data || {}).Error || data || "Unknown error")); return }); diff --git a/html/partials/send-coins.html b/html/partials/send-coins.html index 88663fa..c6cc790 100755 --- a/html/partials/send-coins.html +++ b/html/partials/send-coins.html @@ -52,6 +52,7 @@ data-name="Receiver Address 2" ng-model="payment_id"> + + @@ -100,6 +104,7 @@