From bfbe7a0d6423a15ac1660dbe2f5a52c161ee91ac Mon Sep 17 00:00:00 2001 From: tsigel Date: Thu, 25 Jul 2019 12:36:06 +0300 Subject: [PATCH 01/19] DEXW-1972: fix mobile download --- src/modules/ui/directives/footer/footer.html | 2 +- src/modules/ui/directives/footer/footer.less | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/modules/ui/directives/footer/footer.html b/src/modules/ui/directives/footer/footer.html index eaaaf6c716..339d020450 100644 --- a/src/modules/ui/directives/footer/footer.html +++ b/src/modules/ui/directives/footer/footer.html @@ -93,7 +93,7 @@
- +
diff --git a/src/modules/ui/directives/footer/footer.less b/src/modules/ui/directives/footer/footer.less index a84d4a6981..53efdb3a63 100644 --- a/src/modules/ui/directives/footer/footer.less +++ b/src/modules/ui/directives/footer/footer.less @@ -123,12 +123,6 @@ } } -body.welcome { - .toaster-mobiles { - display: none; - } -} - @media screen and (max-width: 1174px) { .footer { .section-wrapper { From dc4d6c7e1ffd7a2c24cb217437243ed2006ee1fd Mon Sep 17 00:00:00 2001 From: tsigel Date: Thu, 25 Jul 2019 14:47:56 +0300 Subject: [PATCH 02/19] DEXW-1972: fix analytics --- src/modules/ui/directives/footer/Footer.js | 13 ++++++++++++- src/modules/ui/directives/footer/footer.html | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/modules/ui/directives/footer/Footer.js b/src/modules/ui/directives/footer/Footer.js index 11cfd04cd7..8a0bd54338 100644 --- a/src/modules/ui/directives/footer/Footer.js +++ b/src/modules/ui/directives/footer/Footer.js @@ -1,6 +1,8 @@ (function () { 'use strict'; + const analytics = require('@waves/event-sender'); + const controller = function (Base, $scope, $element, utils, storage) { class FooterCtrl extends Base { @@ -48,6 +50,12 @@ storage.load(this._toasterMobilesStorageKey).then(wasHidden => { this.isToasterMobilesVisible = !wasHidden; + if (!wasHidden) { + analytics.send({ + name: 'Download Mobile Display', + target: 'all' + }); + } utils.safeApply($scope); }); } @@ -56,8 +64,11 @@ * @public */ hideToaster() { + analytics.send({ + name: 'Download Mobile Close', + target: 'all' + }); $element.find('.toaster-mobiles').addClass('hidden-toaster'); - storage.save(this._toasterMobilesStorageKey, true); } diff --git a/src/modules/ui/directives/footer/footer.html b/src/modules/ui/directives/footer/footer.html index 339d020450..79b3bc6f54 100644 --- a/src/modules/ui/directives/footer/footer.html +++ b/src/modules/ui/directives/footer/footer.html @@ -93,7 +93,7 @@
- +
From c955f7debb48e3c6aa03ba188098544cb78ac437 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Tue, 30 Jul 2019 16:58:04 +0300 Subject: [PATCH 03/19] DEXW-1947: fix export tab, remove signature-generator package function --- .../utils/modals/importAccounts/ImportAccountsCtrl.js | 5 +++-- ts-scripts/utils.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/utils/modals/importAccounts/ImportAccountsCtrl.js b/src/modules/utils/modals/importAccounts/ImportAccountsCtrl.js index 19b345eb8f..34f46ac11e 100644 --- a/src/modules/utils/modals/importAccounts/ImportAccountsCtrl.js +++ b/src/modules/utils/modals/importAccounts/ImportAccountsCtrl.js @@ -14,7 +14,7 @@ const controller = function (Base, $scope, utils, user, storage, $state, $mdDialog) { const { find, propEq, uniqBy, filter, pipe, prop } = require('ramda'); - const { utils: generatorUtils } = require('@waves/signature-generator'); + const { isValidAddress } = require('@waves/signature-adapter'); const OLD_ORIGIN = 'https://client.wavesplatform.com'; @@ -73,7 +73,8 @@ .catch(() => []) .then(list => { this.pending = false; - const filteredList = list.filter(user => generatorUtils.crypto.isValidAddress(user.address)); + const networkByte = WavesApp.network.code.charCodeAt(0); + const filteredList = list.filter(user => isValidAddress(user.address, networkByte)); this._addAccountList(filteredList); }); } diff --git a/ts-scripts/utils.ts b/ts-scripts/utils.ts index 9f20e573e0..c519f9d98d 100644 --- a/ts-scripts/utils.ts +++ b/ts-scripts/utils.ts @@ -579,7 +579,7 @@ export function route(connectionType: TConnection, buildType: TBuild, type: TPla return null; } - if (url.indexOf('export') !== -1) { + if (url.indexOf('/export.html') !== -1) { prepareExport().then((file) => { res.end(file); }); From c87269d1efb5186f4356c3b55dca732b6279c200 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Fri, 2 Aug 2019 11:04:43 +0300 Subject: [PATCH 04/19] DEXW-1930: make sentry global prod build --- gulpfile.ts | 5 +++++ scripts/htmlTask.ts | 1 + ts-scripts/interface.d.ts | 1 + ts-scripts/meta.json | 5 ++++- ts-scripts/utils.ts | 3 ++- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gulpfile.ts b/gulpfile.ts index dc8f0818e9..6369f83220 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -82,6 +82,11 @@ function createBuildTask(args?: { platform: TPlatform; env: TBuild; config: stri ? ['(function () {\nvar module = undefined;\n', '})();'] : null ), + createConcatTask( + getFileName('sentry-vendors.js', env as TBuild), + meta.sentryVendors, + join(outputPath, 'js') + ), createConcatTask( getFileName('vendor-styles.css', env as TBuild), meta.stylesheets, diff --git a/scripts/htmlTask.ts b/scripts/htmlTask.ts index 4974fbb838..2cc86b138e 100644 --- a/scripts/htmlTask.ts +++ b/scripts/htmlTask.ts @@ -13,6 +13,7 @@ function getScriptsList(input: string) { return [ filesMap['vendors'], + filesMap['sentry-vendors'], filesMap['bundle'], filesMap['templates'] ]; diff --git a/ts-scripts/interface.d.ts b/ts-scripts/interface.d.ts index f1e6e9cef6..0fe6a7a937 100644 --- a/ts-scripts/interface.d.ts +++ b/ts-scripts/interface.d.ts @@ -2,6 +2,7 @@ import { Stream } from 'stream'; export interface IMetaJSON { vendors: Array; + sentryVendors: Array; exportPageVendors: Array; stylesheets: Array; domain: string; diff --git a/ts-scripts/meta.json b/ts-scripts/meta.json index 23f856da32..f4b90b05d3 100644 --- a/ts-scripts/meta.json +++ b/ts-scripts/meta.json @@ -2,7 +2,6 @@ "vendors": [ "node_modules/@waves/bignumber/dist/bignumber.umd.js", "node_modules/@waves/waves-transactions/dist/min/waves-transactions.min.js", - "node_modules/@sentry/browser/build/bundle.min.js", "node_modules/@waves/oracle-data/dist/oracle-data.min.js", "node_modules/parse-json-bignumber/dist/parse-json-bignumber.min.js", "node_modules/worker-wrapper/dist/WorkerWrapper.min.js", @@ -39,6 +38,9 @@ "node_modules/i18next/dist/umd/i18next.js", "node_modules/n3-charts/build/LineChart.min.js" ], + "sentryVendors": [ + "node_modules/@sentry/browser/build/bundle.min.js" + ], "exportPageVendors": [ "node_modules/ts-utils/dist/ts-utils.min.js", "node_modules/@waves/waves-browser-bus/dist/browser-bus.min.js" @@ -166,6 +168,7 @@ ], "developmentScripts": [ "dist/dev/js/vendors.js", + "dist/dev/js/sentry-vendors.js", "dist/dev/js/bundle.js", "dist/dev/js/templates.js" ], diff --git a/ts-scripts/utils.ts b/ts-scripts/utils.ts index 9f20e573e0..1a0f3b7e19 100644 --- a/ts-scripts/utils.ts +++ b/ts-scripts/utils.ts @@ -158,8 +158,9 @@ export function getScripts(param: IPrepareHTMLOptions, pack, meta) { const sourceFiles = getFilesFrom(join(__dirname, '../src'), '.js', function (name, path) { return !name.includes('.spec') && !path.includes('/test/'); }); + const sentryScripts = meta.sentryVendors.map((i) => join(__dirname, '..', i)); const cacheKiller = `?v${pack.version}`; - scripts = meta.vendors.map((i) => join(__dirname, '..', i)).concat(sourceFiles); + scripts = meta.vendors.map((i) => join(__dirname, '..', i)).concat(sentryScripts).concat(sourceFiles); meta.debugInjections.forEach((path) => { scripts.unshift(join(__dirname, '../', path)); }); From 3241b145b1a7572876324b0fbee87e886e95aeaf Mon Sep 17 00:00:00 2001 From: vba2000 Date: Mon, 5 Aug 2019 13:39:56 +0300 Subject: [PATCH 05/19] DEXW-2005: fix build --- gulpfile.ts | 4 ++-- scripts/htmlTask.ts | 2 +- ts-scripts/interface.d.ts | 2 +- ts-scripts/meta.json | 8 ++++---- ts-scripts/utils.ts | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gulpfile.ts b/gulpfile.ts index 6369f83220..5ae6620ed6 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -83,8 +83,8 @@ function createBuildTask(args?: { platform: TPlatform; env: TBuild; config: stri : null ), createConcatTask( - getFileName('sentry-vendors.js', env as TBuild), - meta.sentryVendors, + getFileName('not-wrapped-vendors.js', env as TBuild), + meta.vendorsNotWrapped, join(outputPath, 'js') ), createConcatTask( diff --git a/scripts/htmlTask.ts b/scripts/htmlTask.ts index 2cc86b138e..b5b3a55b73 100644 --- a/scripts/htmlTask.ts +++ b/scripts/htmlTask.ts @@ -13,7 +13,7 @@ function getScriptsList(input: string) { return [ filesMap['vendors'], - filesMap['sentry-vendors'], + filesMap['not-wrapped-vendors'], filesMap['bundle'], filesMap['templates'] ]; diff --git a/ts-scripts/interface.d.ts b/ts-scripts/interface.d.ts index 0fe6a7a937..72dfa40909 100644 --- a/ts-scripts/interface.d.ts +++ b/ts-scripts/interface.d.ts @@ -2,7 +2,7 @@ import { Stream } from 'stream'; export interface IMetaJSON { vendors: Array; - sentryVendors: Array; + vendorsNotWrapped: Array; exportPageVendors: Array; stylesheets: Array; domain: string; diff --git a/ts-scripts/meta.json b/ts-scripts/meta.json index df4ad234f8..066fbb5f54 100644 --- a/ts-scripts/meta.json +++ b/ts-scripts/meta.json @@ -4,7 +4,6 @@ "node_modules/@waves/waves-transactions/dist/min/waves-transactions.min.js", "node_modules/@waves/oracle-data/dist/oracle-data.min.js", "node_modules/parse-json-bignumber/dist/parse-json-bignumber.min.js", - "node_modules/worker-wrapper/dist/worker-wrapper.js", "node_modules/handlebars/dist/handlebars.min.js", "node_modules/ramda/dist/ramda.min.js", "node_modules/mobile-detect/mobile-detect.min.js", @@ -37,8 +36,9 @@ "node_modules/i18next/dist/umd/i18next.js", "node_modules/n3-charts/build/LineChart.min.js" ], - "sentryVendors": [ - "node_modules/@sentry/browser/build/bundle.min.js" + "vendorsNotWrapped": [ + "node_modules/@sentry/browser/build/bundle.min.js", + "node_modules/worker-wrapper/dist/worker-wrapper.js" ], "exportPageVendors": [ "node_modules/ts-utils/dist/ts-utils.min.js", @@ -167,7 +167,7 @@ ], "developmentScripts": [ "dist/dev/js/vendors.js", - "dist/dev/js/sentry-vendors.js", + "dist/dev/js/not-wrapped-vendors.js", "dist/dev/js/bundle.js", "dist/dev/js/templates.js" ], diff --git a/ts-scripts/utils.ts b/ts-scripts/utils.ts index c3945955ce..3c05fb349d 100644 --- a/ts-scripts/utils.ts +++ b/ts-scripts/utils.ts @@ -158,7 +158,7 @@ export function getScripts(param: IPrepareHTMLOptions, pack, meta) { const sourceFiles = getFilesFrom(join(__dirname, '../src'), '.js', function (name, path) { return !name.includes('.spec') && !path.includes('/test/'); }); - const sentryScripts = meta.sentryVendors.map((i) => join(__dirname, '..', i)); + const sentryScripts = meta.vendorsNotWrapped.map((i) => join(__dirname, '..', i)); const cacheKiller = `?v${pack.version}`; scripts = meta.vendors.map((i) => join(__dirname, '..', i)).concat(sentryScripts).concat(sourceFiles); meta.debugInjections.forEach((path) => { From 9819d174f679898d3f7256fceee847c8efb51686 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Mon, 5 Aug 2019 17:29:16 +0300 Subject: [PATCH 06/19] DEXW-2001: close modals on logout --- src/modules/utils/modals/ModalManager.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/modules/utils/modals/ModalManager.js b/src/modules/utils/modals/ModalManager.js index e9bdaff2ce..b336de82e3 100644 --- a/src/modules/utils/modals/ModalManager.js +++ b/src/modules/utils/modals/ModalManager.js @@ -12,7 +12,8 @@ * @param {Storage} storage * @return {ModalManager} */ - const factory = function ($mdDialog, utils, decorators, $templateRequest, $rootScope, $injector, state, storage) { + const factory = function ($mdDialog, utils, decorators, $templateRequest, $rootScope, $injector, state, storage, + user) { const tsUtils = require('ts-utils'); const ds = require('data-service'); @@ -50,13 +51,16 @@ */ this._counter = 0; - state.signals.changeRouterStateStart.on(() => { + const closeModals = () => { const counter = this._counter; for (let i = 0; i < counter; i++) { $mdDialog.cancel(); } - }); + }; + + state.signals.changeRouterStateStart.on(closeModals); + user.logoutSignal.on(closeModals); } showScriptModal() { @@ -782,7 +786,8 @@ '$rootScope', '$injector', 'state', - 'storage']; + 'storage', + 'user']; angular.module('app.utils') .factory('modalManager', factory); From 88cae2fbcb8ceac0e7efd87af429ecd93c7a3ed6 Mon Sep 17 00:00:00 2001 From: vba2000 Date: Mon, 5 Aug 2019 17:53:46 +0300 Subject: [PATCH 07/19] DEXW-2010: fix timeline error --- src/modules/utils/services/TimeLine.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/utils/services/TimeLine.js b/src/modules/utils/services/TimeLine.js index 0ff588a9f6..3dc9e4d66a 100644 --- a/src/modules/utils/services/TimeLine.js +++ b/src/modules/utils/services/TimeLine.js @@ -121,6 +121,10 @@ const now = Date.now(); for (let i = this._listeners.list.length - 1; i >= 0; i--) { const item = this._listeners.list[i]; + if (!item) { + continue; + } + if (now - item.start >= item.timeout) { try { if (item.handler) { From ad83cd21688c8fa8e0bc779900446d897c53399b Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Mon, 5 Aug 2019 18:08:45 +0300 Subject: [PATCH 08/19] DEXW-2006: set default theme on logout --- src/modules/app/services/User.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/app/services/User.js b/src/modules/app/services/User.js index 26b7adf2f0..015c347fbb 100644 --- a/src/modules/app/services/User.js +++ b/src/modules/app/services/User.js @@ -419,6 +419,8 @@ ds.app.logOut(); clearTimeout(this._scriptInfoPollTimeoutId); + this.changeTheme('default'); + if (this._scriptInfoPoll) { this._scriptInfoPoll.destroy(); } From a327601d5fd04d4091e73261a4d338ab1c158d52 Mon Sep 17 00:00:00 2001 From: vba2000 Date: Mon, 5 Aug 2019 18:24:13 +0300 Subject: [PATCH 09/19] DEXW-2010: fix set default theme on logout --- src/modules/app/services/User.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/app/services/User.js b/src/modules/app/services/User.js index 26b7adf2f0..0243104350 100644 --- a/src/modules/app/services/User.js +++ b/src/modules/app/services/User.js @@ -426,6 +426,7 @@ if (stateName) { this.logoutSignal.dispatch({}); this._resetFields(); + this.changeTheme(themes.getDefaultTheme()); $state.go(stateName, undefined, { custom: { logout: true } }); } else if (WavesApp.isDesktop()) { transfer('reload'); From 98582e6fc7603699d7314523bcc9a6d29a55db62 Mon Sep 17 00:00:00 2001 From: vba2000 Date: Tue, 6 Aug 2019 10:35:34 +0300 Subject: [PATCH 10/19] DEXW-2010: fix cache by address --- src/modules/app/services/waves/WavesUtils.js | 13 +++++- .../app/services/waves/matcher/Matcher.js | 23 +++++++--- .../waves/node/content/Transactions.js | 43 ++++++++++++++----- 3 files changed, 60 insertions(+), 19 deletions(-) diff --git a/src/modules/app/services/waves/WavesUtils.js b/src/modules/app/services/waves/WavesUtils.js index 9a74a0ac9e..4ce6f37a6b 100644 --- a/src/modules/app/services/waves/WavesUtils.js +++ b/src/modules/app/services/waves/WavesUtils.js @@ -142,9 +142,18 @@ * @param pair * @returns {Promise} */ - @decorators.cachable(60) getVolume(pair) { - return ds.api.pairs.info(matcher.currentMatcherAddress, [pair]) + return this._getVolume(pair, matcher.currentMatcherAddress); + } + + /** + * @param pair + * @param {string} currentMatcherAddress + * @returns {Promise} + */ + @decorators.cachable(60) + _getVolume(pair, currentMatcherAddress) { + return ds.api.pairs.info(currentMatcherAddress, [pair]) .then((data) => { const [pair = {}] = data.filter(Boolean); return pair && String(pair.volume) || '0'; diff --git a/src/modules/app/services/waves/matcher/Matcher.js b/src/modules/app/services/waves/matcher/Matcher.js index b1c6ad635d..6a156c4aa8 100644 --- a/src/modules/app/services/waves/matcher/Matcher.js +++ b/src/modules/app/services/waves/matcher/Matcher.js @@ -97,15 +97,11 @@ } /** + * @param options * @return {Promise>} */ - @decorators.cachable(1) getOrders(options) { - if (user.address) { - return ds.api.matcher.getOrders(options).then(ds.processOrdersWithStore); - } else { - return Promise.resolve([]); - } + return this._getOrders(options, user.address); } /** @@ -285,6 +281,21 @@ }); } + /** + * @param {any} [options] + * @param {string} [address] + * @return {Promise>} + * @private + */ + @decorators.cachable(1) + _getOrders(options, address) { + if (address) { + return ds.api.matcher.getOrders(options).then(ds.processOrdersWithStore); + } else { + return Promise.resolve([]); + } + } + /** * @param {string} asset1 * @param {string} asset2 diff --git a/src/modules/app/services/waves/node/content/Transactions.js b/src/modules/app/services/waves/node/content/Transactions.js index 87fc088a4a..a79d904d0e 100644 --- a/src/modules/app/services/waves/node/content/Transactions.js +++ b/src/modules/app/services/waves/node/content/Transactions.js @@ -65,28 +65,26 @@ /** * Get transactions list by user - * @param {number} [limit] - * @param {string} [after] + * @param {number} limit + * @param {string} after * @return {Promise} */ - @decorators.cachable(1) list(limit = 1000, after) { - return ds.api.transactions.list(user.address, limit, after) - .then(list => list.map(this._pipeTransaction())); + return this._list(limit, after, user.address); } /** * @return {Promise} */ - @decorators.cachable(120) getActiveLeasingTx() { - return ds.fetch(`${this.node}/leasing/active/${user.address}`) - .then(R.uniqBy(R.prop('id'))) - .then(R.map(item => ({ ...item, status: 'active' }))) - .then(list => ds.api.transactions.parseTx(list, false)) - .then(list => list.map(this._pipeTransaction())); + return this._getActiveLeasingTx(user.address); } + /** + * @param {string} address + * @return {Promise} + */ + /** * Get transactions list by user from utx * @return {Promise} @@ -137,6 +135,29 @@ return this._pipeTransaction(false)(tx); } + @decorators.cachable(120) + _getActiveLeasingTx(address) { + return ds.fetch(`${this.node}/leasing/active/${address}`) + .then(R.uniqBy(R.prop('id'))) + .then(R.map(item => ({ ...item, status: 'active' }))) + .then(list => ds.api.transactions.parseTx(list, false)) + .then(list => list.map(this._pipeTransaction())); + } + + /** + * @private + * Get transactions list by user + * @param {number} [limit] + * @param {string} [after] + * @param {string} [address] + * @return {Promise} + */ + @decorators.cachable(1) + _list(limit, after, address) { + return ds.api.transactions.list(address, limit, after) + .then(list => list.map(this._pipeTransaction())); + } + /** * @return {function(*=)} * @private From e602687680ffb13e305f47015d8ad1c40282197f Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Tue, 6 Aug 2019 11:37:54 +0300 Subject: [PATCH 11/19] DEXW-2006: merge dexw-2010 --- src/modules/app/services/User.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/modules/app/services/User.js b/src/modules/app/services/User.js index 8ad697011f..0243104350 100644 --- a/src/modules/app/services/User.js +++ b/src/modules/app/services/User.js @@ -419,8 +419,6 @@ ds.app.logOut(); clearTimeout(this._scriptInfoPollTimeoutId); - this.changeTheme('default'); - if (this._scriptInfoPoll) { this._scriptInfoPoll.destroy(); } From 92729ab2696cd090a31b14365ee6f3c821747a35 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Tue, 6 Aug 2019 11:50:03 +0300 Subject: [PATCH 12/19] DEXW-2001: review fixes --- src/modules/utils/modals/ModalManager.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/modules/utils/modals/ModalManager.js b/src/modules/utils/modals/ModalManager.js index b336de82e3..811d3fa961 100644 --- a/src/modules/utils/modals/ModalManager.js +++ b/src/modules/utils/modals/ModalManager.js @@ -10,6 +10,7 @@ * @param {$injector} $injector * @param {State} state * @param {Storage} storage + * @param {User} user * @return {ModalManager} */ const factory = function ($mdDialog, utils, decorators, $templateRequest, $rootScope, $injector, state, storage, @@ -51,16 +52,8 @@ */ this._counter = 0; - const closeModals = () => { - const counter = this._counter; - - for (let i = 0; i < counter; i++) { - $mdDialog.cancel(); - } - }; - - state.signals.changeRouterStateStart.on(closeModals); - user.logoutSignal.on(closeModals); + state.signals.changeRouterStateStart.on(this.closeModals, this); + user.logoutSignal.on(this.closeModals, this); } showScriptModal() { @@ -548,6 +541,14 @@ return this._getModal(tsUtils.merge({}, DEFAULT_OPTIONS, options)); } + closeModals() { + const counter = this._counter; + + for (let i = 0; i < counter; i++) { + $mdDialog.cancel(); + } + } + /** * @return {User} * @private From b53e9caa2e0a7da9d2b6c5160dccd2b65a7512c8 Mon Sep 17 00:00:00 2001 From: tsigel Date: Tue, 6 Aug 2019 12:07:48 +0300 Subject: [PATCH 13/19] DEXW-2010: fix portfolio --- .../directives/portfolioRow/PortfolioRow.js | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js b/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js index 26a9435b16..62307c41c7 100644 --- a/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js +++ b/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js @@ -182,8 +182,10 @@ this.isSmart = balance.asset.hasScript; const firstAssetChar = this.balance.asset.name.slice(0, 1); const canPayFee = list.find(item => item.asset.id === this.balance.asset.id) && !this._isWaves; - const { isVerified, isGateway, - isTokenomica, logo, isGatewaySoon } = utils.getDataFromOracles(this.balance.asset.id); + const { + isVerified, isGateway, + isTokenomica, logo, isGatewaySoon + } = utils.getDataFromOracles(this.balance.asset.id); this.isVerifiedOrGateway = isVerified || isGateway; @@ -232,14 +234,13 @@ */ this._poll = createPoll(this, this._initSponsorShips, angular.noop, 5000); this._onUpdateBalance(); - // this._initSponsorShips(); this._setHandlers(); this.changeLanguageHandler(); }); } $onDestroy() { - i18next.off('languageChanged', this.changeLanguageHandler); + super.$onDestroy(); this.$node.off(); } @@ -256,6 +257,7 @@ 'app.wallet.portfolio'); }); } + /** * @return {boolean} * @private @@ -274,13 +276,13 @@ const isAssetLockedInDex = utils.isLockedInDex(this.balance.asset.id); return !isAssetLockedInDex && (this.balance.isPinned || - this._isMyAsset || - this.balance.asset.isMyAsset || - this.balance.asset.id === WavesApp.defaultAssets.WAVES || - this.gatewayService.getPurchasableWithCards()[this.balance.asset.id] || - this.gatewayService.getCryptocurrencies()[this.balance.asset.id] || - this.gatewayService.getFiats()[this.balance.asset.id] || - path(statusPath, ds.dataManager.getOracleData('oracleWaves')) === STATUS_LIST.VERIFIED); + this._isMyAsset || + this.balance.asset.isMyAsset || + this.balance.asset.id === WavesApp.defaultAssets.WAVES || + this.gatewayService.getPurchasableWithCards()[this.balance.asset.id] || + this.gatewayService.getCryptocurrencies()[this.balance.asset.id] || + this.gatewayService.getFiats()[this.balance.asset.id] || + path(statusPath, ds.dataManager.getOracleData('oracleWaves')) === STATUS_LIST.VERIFIED); } @@ -415,7 +417,7 @@ _setHandlers() { this._initActions(); - i18next.on('languageChanged', this.changeLanguageHandler); + this.listenEventEmitter(i18next, 'languageChanged', this.changeLanguageHandler); this.$node.on('click', `.${SELECTORS.BUTTONS.SEND}`, () => { analytics.send({ From bffba010b6f0c6b53b9dabc4549332aaff6267c4 Mon Sep 17 00:00:00 2001 From: vba2000 Date: Tue, 6 Aug 2019 14:49:10 +0300 Subject: [PATCH 14/19] DEXW-2018: fix --- .../receive/receiveCryptocurrency/ReceiveCryptocurrency.js | 4 ++++ .../receive/receiveCryptocurrency/receive-cryptocurrency.html | 4 ++-- src/modules/utils/services/gateways/CoinomatService.js | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modules/utils/modals/receive/receiveCryptocurrency/ReceiveCryptocurrency.js b/src/modules/utils/modals/receive/receiveCryptocurrency/ReceiveCryptocurrency.js index db4fa99c5f..b18c6478c6 100644 --- a/src/modules/utils/modals/receive/receiveCryptocurrency/ReceiveCryptocurrency.js +++ b/src/modules/utils/modals/receive/receiveCryptocurrency/ReceiveCryptocurrency.js @@ -1,6 +1,8 @@ (function () { 'use strict'; + const { Money } = require('@waves/data-entities'); + /** * @param {typeof Base} Base * @param {ng.IScope} $scope @@ -79,8 +81,10 @@ if (depositDetails) { depositDetails.then((details) => { this.gatewayAddress = details.address; + this.minAmount = Money.fromTokens(details.details.tunnel.in_min || 0.001, this.asset); $scope.$apply(); }, () => { + this.minAmount = Money.fromTokens(0.001, this.asset); this.gatewayAddress = null; this.gatewayServerError = true; $scope.$apply(); diff --git a/src/modules/utils/modals/receive/receiveCryptocurrency/receive-cryptocurrency.html b/src/modules/utils/modals/receive/receiveCryptocurrency/receive-cryptocurrency.html index f8a37310be..4ad58b7a1b 100644 --- a/src/modules/utils/modals/receive/receiveCryptocurrency/receive-cryptocurrency.html +++ b/src/modules/utils/modals/receive/receiveCryptocurrency/receive-cryptocurrency.html @@ -41,8 +41,8 @@
-
-
+
+
diff --git a/src/modules/utils/services/gateways/CoinomatService.js b/src/modules/utils/services/gateways/CoinomatService.js index a8f146cf40..ddc222c010 100644 --- a/src/modules/utils/services/gateways/CoinomatService.js +++ b/src/modules/utils/services/gateways/CoinomatService.js @@ -44,7 +44,7 @@ const from = GATEWAYS[asset.id].gateway; const to = GATEWAYS[asset.id].waves; return this._loadPaymentDetails(from, to, wavesAddress).then((details) => { - return { address: details.tunnel.wallet_from }; + return { address: details.tunnel.wallet_from, details }; }); } From 52966f98fa2dcdbb31df13e2fd2b9e3f5b3af768 Mon Sep 17 00:00:00 2001 From: vba2000 Date: Tue, 6 Aug 2019 14:53:37 +0300 Subject: [PATCH 15/19] DEXW-2018: fix 2 --- .../receiveCryptocurrency/receive-cryptocurrency.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/utils/modals/receive/receiveCryptocurrency/receive-cryptocurrency.html b/src/modules/utils/modals/receive/receiveCryptocurrency/receive-cryptocurrency.html index 4ad58b7a1b..d0bbe83872 100644 --- a/src/modules/utils/modals/receive/receiveCryptocurrency/receive-cryptocurrency.html +++ b/src/modules/utils/modals/receive/receiveCryptocurrency/receive-cryptocurrency.html @@ -41,8 +41,14 @@
-
-
+
+
From 1feab89908a2fd51bac61992c0c7a6fb50f3ecab Mon Sep 17 00:00:00 2001 From: vba2000 Date: Tue, 6 Aug 2019 15:08:17 +0300 Subject: [PATCH 16/19] DEXW-2018: fix api --- .../receive/receiveCryptocurrency/ReceiveCryptocurrency.js | 2 +- src/modules/utils/services/gateways/CoinomatService.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/utils/modals/receive/receiveCryptocurrency/ReceiveCryptocurrency.js b/src/modules/utils/modals/receive/receiveCryptocurrency/ReceiveCryptocurrency.js index b18c6478c6..46430afd9d 100644 --- a/src/modules/utils/modals/receive/receiveCryptocurrency/ReceiveCryptocurrency.js +++ b/src/modules/utils/modals/receive/receiveCryptocurrency/ReceiveCryptocurrency.js @@ -81,7 +81,7 @@ if (depositDetails) { depositDetails.then((details) => { this.gatewayAddress = details.address; - this.minAmount = Money.fromTokens(details.details.tunnel.in_min || 0.001, this.asset); + this.minAmount = Money.fromTokens(details.in_min || 0.001, this.asset); $scope.$apply(); }, () => { this.minAmount = Money.fromTokens(0.001, this.asset); diff --git a/src/modules/utils/services/gateways/CoinomatService.js b/src/modules/utils/services/gateways/CoinomatService.js index ddc222c010..66238d5b71 100644 --- a/src/modules/utils/services/gateways/CoinomatService.js +++ b/src/modules/utils/services/gateways/CoinomatService.js @@ -44,7 +44,7 @@ const from = GATEWAYS[asset.id].gateway; const to = GATEWAYS[asset.id].waves; return this._loadPaymentDetails(from, to, wavesAddress).then((details) => { - return { address: details.tunnel.wallet_from, details }; + return { address: details.tunnel.wallet_from, details: details.tunnel }; }); } From 842e55fd25b4ac650bf64febbaff3dbf371bca84 Mon Sep 17 00:00:00 2001 From: vba2000 Date: Tue, 6 Aug 2019 15:31:31 +0300 Subject: [PATCH 17/19] DEXW-2018: fix details --- .../receive/receiveCryptocurrency/ReceiveCryptocurrency.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/utils/modals/receive/receiveCryptocurrency/ReceiveCryptocurrency.js b/src/modules/utils/modals/receive/receiveCryptocurrency/ReceiveCryptocurrency.js index 46430afd9d..346e91f599 100644 --- a/src/modules/utils/modals/receive/receiveCryptocurrency/ReceiveCryptocurrency.js +++ b/src/modules/utils/modals/receive/receiveCryptocurrency/ReceiveCryptocurrency.js @@ -81,7 +81,7 @@ if (depositDetails) { depositDetails.then((details) => { this.gatewayAddress = details.address; - this.minAmount = Money.fromTokens(details.in_min || 0.001, this.asset); + this.minAmount = Money.fromTokens(details.details.in_min || 0.001, this.asset); $scope.$apply(); }, () => { this.minAmount = Money.fromTokens(0.001, this.asset); From 039563755cc8a3ebcc180b8d9e347887cfc83328 Mon Sep 17 00:00:00 2001 From: tsigel Date: Tue, 6 Aug 2019 18:59:15 +0300 Subject: [PATCH 18/19] DEXW-2021: fix ff and safari --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5bb98990a2..5eedcf4439 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "waves-client", - "version": "1.3.13", + "version": "1.3.14", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -18245,9 +18245,9 @@ "dev": true }, "worker-wrapper": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/worker-wrapper/-/worker-wrapper-1.3.1.tgz", - "integrity": "sha512-EtZrJ+CSqGVkd/2VPMKlVI6zQznrw9H7l7fdM/x2irVoNLugeg8nmUpFvDahV3rbN85GmlH/NAhgHnxxHdGCEQ==" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/worker-wrapper/-/worker-wrapper-1.3.2.tgz", + "integrity": "sha512-Sjj8D8915GlsxDItQxXYo/P9X19YNT5tVrroVsHFdP+S3kvCE+q8P+8tJTTRqKlsSSqTE3QV6FzGdR9eaLE0xA==" }, "wrap-ansi": { "version": "2.1.0", diff --git a/package.json b/package.json index 999bf19e3c..90df91620d 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "ramda": "^0.25.0", "ts-api-validator": "2.1.2", "ts-utils": "^6.0.6", - "worker-wrapper": "^1.3.1" + "worker-wrapper": "^1.3.2" }, "husky": { "hooks": { From cf6f45d588197ce22373b140ecb29cc48eff03d2 Mon Sep 17 00:00:00 2001 From: vk Date: Tue, 6 Aug 2019 19:02:06 +0300 Subject: [PATCH 19/19] DEXW-2021:update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 90df91620d..3f8b533a62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "waves-client", - "version": "1.3.14", + "version": "1.3.16", "description": "The official client application for the Waves platform", "private": true, "repository": {