diff --git a/package-lock.json b/package-lock.json index fa2759469c..ce49cd7806 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5327,24 +5327,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.mergewith": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", - "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", - "dev": true - }, "logalot": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz", @@ -5632,9 +5614,9 @@ "dev": true }, "nan": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.1.tgz", - "integrity": "sha512-I6YB/YEuDeUZMmhscXKxGgZlFnhsn5y0hgOZBadkzfTRrZBtJDZeg6eQf7PYMIEclwmorTKK8GztsyOUSVBREA==", + "version": "2.13.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", + "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", "dev": true }, "nanomatch": { @@ -5713,9 +5695,9 @@ } }, "node-sass": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.11.0.tgz", - "integrity": "sha512-bHUdHTphgQJZaF1LASx0kAviPH7sGlcyNhWade4eVIpFp6tsn7SV8xNMTbsQFpEV9VXpnwTTnNYlfsZXgGgmkA==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.12.0.tgz", + "integrity": "sha512-A1Iv4oN+Iel6EPv77/HddXErL2a+gZ4uBeZUy+a8O35CFYTXhgA8MgLCWBtwpGZdCvTvQ9d+bQxX/QC36GDPpQ==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -5725,12 +5707,10 @@ "get-stdin": "^4.0.1", "glob": "^7.0.3", "in-publish": "^2.0.0", - "lodash.assign": "^4.2.0", - "lodash.clonedeep": "^4.3.2", - "lodash.mergewith": "^4.6.0", + "lodash": "^4.17.11", "meow": "^3.7.0", "mkdirp": "^0.5.1", - "nan": "^2.10.0", + "nan": "^2.13.2", "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "^2.88.0", diff --git a/package.json b/package.json index 08677ddea7..1ed7963a7b 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "grunt-shell": "^1.1.2", "grunt-text-replace": "^0.4.0", "lodash": "^4.17.5", - "node-sass": "^4.11.0" + "node-sass": "^4.12.0" }, "scripts": { "deploy-branch": "grunt deploy-branch", diff --git a/src/accountstatus/accountstatus.es6 b/src/accountstatus/accountstatus.es6 index 66dc70a60b..c354b9325f 100644 --- a/src/accountstatus/accountstatus.es6 +++ b/src/accountstatus/accountstatus.es6 @@ -64,7 +64,7 @@ class AccountStatus { return Promise.all([ liveapi.send({ get_account_status: 1 }), liveapi.cached.send({ website_status: 1 }), - liveapi.send({ 'get_settings': 1 }), + liveapi.cached.send({ 'get_settings': 1 }), liveapi.cached.send({ get_financial_assessment: 1 }), liveapi.send({ mt5_login_list: 1 }) ]); diff --git a/src/cashier/deposit.es6 b/src/cashier/deposit.es6 index 47991f0843..771b254924 100644 --- a/src/cashier/deposit.es6 +++ b/src/cashier/deposit.es6 @@ -154,7 +154,7 @@ function init_state(root) { }); /* get the residence field and its states */ - var residence_promise = liveapi.send({ get_settings: 1 }) + var residence_promise = liveapi.cached.send({ get_settings: 1 }) .then(function(data) { state.user.residence = data.get_settings.country_code; state.user.residence_name = data.get_settings.country; diff --git a/src/cashier/withdraw.es6 b/src/cashier/withdraw.es6 index 9e5300a757..76e616d599 100644 --- a/src/cashier/withdraw.es6 +++ b/src/cashier/withdraw.es6 @@ -297,7 +297,6 @@ class Withdraw { transfer.submit = () => { if (transfer.account === '' || transfer.amount === '') { - console.log(transfer); empty_fields.show(); return; } @@ -344,7 +343,7 @@ class Withdraw { } } - liveapi.send({ get_settings: 1 }) + liveapi.cached.send({ get_settings: 1 }) .then(data => { agent.residence = data.get_settings.country_code; const currency = local_storage.get('currency'); diff --git a/src/copytrade/copytrade.es6 b/src/copytrade/copytrade.es6 index 39a060223e..04062c1286 100644 --- a/src/copytrade/copytrade.es6 +++ b/src/copytrade/copytrade.es6 @@ -331,6 +331,7 @@ const initConfigWindow = () => { state.allowCopy.allow_copiers = 0; } else { liveapi + .cached .send({ get_settings: 1 }) .then((settings) => { state.is_loading = false; diff --git a/src/instruments/instruments.es6 b/src/instruments/instruments.es6 index 12ee7193b1..087d47a47a 100755 --- a/src/instruments/instruments.es6 +++ b/src/instruments/instruments.es6 @@ -8,6 +8,7 @@ import "common/util"; function refresh_active_symbols() { liveapi + .cached .send({ active_symbols: 'brief' }) .then(function(data) { local_storage.set('active_symbols', data.active_symbols); diff --git a/src/statement/statement.es6 b/src/statement/statement.es6 index 3ae934b8f5..c9560ce194 100644 --- a/src/statement/statement.es6 +++ b/src/statement/statement.es6 @@ -84,7 +84,8 @@ const refreshTable = (yyy_mm_dd) => { if(!loading) { loading = true; - liveapi.send(request) + liveapi + .send(request) .then(refresh) .catch((err) => { refresh({}); diff --git a/src/trade/tradeDialog.es6 b/src/trade/tradeDialog.es6 index 4b47ac63f3..879686730c 100644 --- a/src/trade/tradeDialog.es6 +++ b/src/trade/tradeDialog.es6 @@ -440,7 +440,7 @@ function init_state(available,root, dialog, symbol, contracts_for_spot) { var update_currency = function() { /* change currency on user login */ if(liveapi.is_authenticated()) { - liveapi.send({payout_currencies: 1}) + liveapi.send({ payout_currencies: 1 }) .then(function(data){ state.currency.value = data.payout_currencies[0]; state.currency.array = data.payout_currencies; diff --git a/src/trade/tradeMenu.es6 b/src/trade/tradeMenu.es6 index f14216cbb8..2a5dde0e10 100644 --- a/src/trade/tradeMenu.es6 +++ b/src/trade/tradeMenu.es6 @@ -10,6 +10,7 @@ const show_error = (err) => { }; const refresh_active_symbols = () => { liveapi + .cached .send({ active_symbols: 'brief' }) .then((data) => { /* clean up the data! */