Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bfbe7a0
DEXW-1972: fix mobile download
tsigel Jul 25, 2019
dc4d6c7
DEXW-1972: fix analytics
tsigel Jul 25, 2019
c955f7d
DEXW-1947: fix export tab, remove signature-generator package function
Jul 30, 2019
c87269d
DEXW-1930: make sentry global prod build
Aug 2, 2019
0986cc6
Merge pull request #1547 from wavesplatform/dexw-1930-desktop-error
GIvanovWaves Aug 5, 2019
93582b5
Merge branch 'dev' of github.com:wavesplatform/WavesGUI into dexw-197…
tsigel Aug 5, 2019
567545a
Merge pull request #1540 from wavesplatform/dexw-1947-fix-export-tab
GIvanovWaves Aug 5, 2019
3241b14
DEXW-2005: fix build
vba2000 Aug 5, 2019
2d2fd38
Merge pull request #1553 from wavesplatform/dexw-2005-fix-workerwrapp…
jahsus-waves Aug 5, 2019
9819d17
DEXW-2001: close modals on logout
Aug 5, 2019
537732d
Merge pull request #1532 from wavesplatform/dexw-1972-fix-mobile-down…
jahsus-waves Aug 5, 2019
88cae2f
DEXW-2010: fix timeline error
vba2000 Aug 5, 2019
ad83cd2
DEXW-2006: set default theme on logout
Aug 5, 2019
096e1a9
Merge remote-tracking branch 'origin/dexw-2010-fix-timeline' into dex…
Aug 5, 2019
a327601
DEXW-2010: fix set default theme on logout
vba2000 Aug 5, 2019
98582e6
DEXW-2010: fix cache by address
vba2000 Aug 6, 2019
108b334
Merge remote-tracking branch 'origin/dexw-2010-fix-timeline' into dex…
Aug 6, 2019
e602687
DEXW-2006: merge dexw-2010
Aug 6, 2019
92729ab
DEXW-2001: review fixes
Aug 6, 2019
15e0a15
Merge pull request #1555 from wavesplatform/dexw-2010-fix-timeline
jahsus-waves Aug 6, 2019
b53e9ca
DEXW-2010: fix portfolio
tsigel Aug 6, 2019
409239e
Merge pull request #1554 from wavesplatform/dexw-2001-logout-close-mo…
jahsus-waves Aug 6, 2019
2f1796c
Merge pull request #1556 from wavesplatform/dexw-2006-set-default-the…
jahsus-waves Aug 6, 2019
bffba01
DEXW-2018: fix
vba2000 Aug 6, 2019
52966f9
DEXW-2018: fix 2
vba2000 Aug 6, 2019
1feab89
DEXW-2018: fix api
vba2000 Aug 6, 2019
842e55f
DEXW-2018: fix details
vba2000 Aug 6, 2019
c8f1dad
Merge pull request #1561 from wavesplatform/dexw-2010-fix-timeline
jahsus-waves Aug 6, 2019
c162b6c
Merge pull request #1560 from wavesplatform/dexw-2018-fix-coinomat-wa…
jahsus-waves Aug 6, 2019
0395637
DEXW-2021: fix ff and safari
tsigel Aug 6, 2019
cf6f45d
DEXW-2021:update version
jahsus-waves Aug 6, 2019
6b729eb
Merge pull request #1564 from wavesplatform/dexw-2021-release-1.3.16
jahsus-waves Aug 7, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ function createBuildTask(args?: { platform: TPlatform; env: TBuild; config: stri
? ['(function () {\nvar module = undefined;\n', '})();']
: null
),
createConcatTask(
getFileName('not-wrapped-vendors.js', env as TBuild),
meta.vendorsNotWrapped,
join(outputPath, 'js')
),
createConcatTask(
getFileName('vendor-styles.css', env as TBuild),
meta.stylesheets,
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions scripts/htmlTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function getScriptsList(input: string) {

return [
filesMap['vendors'],
filesMap['not-wrapped-vendors'],
filesMap['bundle'],
filesMap['templates']
];
Expand Down
1 change: 1 addition & 0 deletions src/modules/app/services/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
13 changes: 11 additions & 2 deletions src/modules/app/services/waves/WavesUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,18 @@
* @param pair
* @returns {Promise<string>}
*/
@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<string>}
*/
@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';
Expand Down
23 changes: 17 additions & 6 deletions src/modules/app/services/waves/matcher/Matcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,11 @@
}

/**
* @param options
* @return {Promise<Array<IOrder>>}
*/
@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);
}

/**
Expand Down Expand Up @@ -285,6 +281,21 @@
});
}

/**
* @param {any} [options]
* @param {string} [address]
* @return {Promise<Array<IOrder>>}
* @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
Expand Down
43 changes: 32 additions & 11 deletions src/modules/app/services/waves/node/content/Transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,26 @@

/**
* Get transactions list by user
* @param {number} [limit]
* @param {string} [after]
* @param {number} limit
* @param {string} after
* @return {Promise<ITransaction[]>}
*/
@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<ITransaction[]>}
*/
@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<ITransaction[]>}
*/

/**
* Get transactions list by user from utx
* @return {Promise<ITransaction[]>}
Expand Down Expand Up @@ -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<ITransaction[]>}
*/
@decorators.cachable(1)
_list(limit, after, address) {
return ds.api.transactions.list(address, limit, after)
.then(list => list.map(this._pipeTransaction()));
}

/**
* @return {function(*=)}
* @private
Expand Down
13 changes: 12 additions & 1 deletion src/modules/ui/directives/footer/Footer.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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);
});
}
Expand All @@ -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);
}

Expand Down
31 changes: 21 additions & 10 deletions src/modules/ui/directives/footer/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
<section>
<div class="section-wrapper">
<div class="footer-left">
<a class="logo logo-footer margin-2" href="https://wavesplatform.com" target="_blank" rel="noopener noreferrer"></a>
<a class="logo logo-footer margin-2" href="https://wavesplatform.com" target="_blank"
rel="noopener noreferrer"></a>
<div class="margin-2" w-i18n="welcome.broughtBy"></div>
<div class="margin-1" w-i18n="welcome.copyright"></div>
<div class="margin-2">
<a class="footer__link" w-i18n="welcome.mailto" target="_blank" rel="noopener noreferrer" href="https://support.wavesplatform.com"></a>
<a class="footer__link" w-i18n="welcome.mailto" target="_blank" rel="noopener noreferrer"
href="https://support.wavesplatform.com"></a>
</div>
<w-change-language></w-change-language>
</div>
Expand All @@ -19,7 +21,7 @@
class="footer__link" target="_blank" rel="noopener noreferrer"
href="https://wavesplatform.com/products-wallet"></a></div>
<div><a w-analytics event="'Footer Keeper Click'"
w-i18n="welcome.wavesKeeper"
w-i18n="welcome.wavesKeeper"
event-target="'ui'"
class="footer__link" target="_blank" rel="noopener noreferrer"
href="https://wavesplatform.com/products-keeper"></a></div>
Expand Down Expand Up @@ -73,28 +75,37 @@
<div class="footer-title basic-700" w-i18n="welcome.legal"></div>
<div><a w-analytics event="'Footer Privacy Policy Click'"
event-target="'ui'"
class="footer__link" w-i18n="welcome.privacyPolicy" target="_blank" rel="noopener noreferrer" href="https://wavesplatform.com/files/docs/Privacy%20Policy_SW.pdf"></a></div>
class="footer__link" w-i18n="welcome.privacyPolicy" target="_blank"
rel="noopener noreferrer"
href="https://wavesplatform.com/files/docs/Privacy%20Policy_SW.pdf"></a></div>
<div><a w-analytics event="'Footer Terms of use Click'"
event-target="'ui'"class="footer__link" w-i18n="welcome.termsOfUse" target="_blank" rel="noopener noreferrer" href="https://wavesplatform.com/files/docs/Waves_terms_and_conditions.pdf"></a></div>
event-target="'ui'" class="footer__link" w-i18n="welcome.termsOfUse" target="_blank"
rel="noopener noreferrer"
href="https://wavesplatform.com/files/docs/Waves_terms_and_conditions.pdf"></a></div>
</div>

<div>
<div class="footer-title basic-700" w-i18n="welcome.social"></div>
<div><a w-analytics event="'Footer Blog Click'"
class="footer__link" w-i18n="welcome.blog" target="_blank" rel="noopener noreferrer" href="https://blog.wavesplatform.com/"></a></div>
class="footer__link" w-i18n="welcome.blog" target="_blank" rel="noopener noreferrer"
href="https://blog.wavesplatform.com/"></a></div>
<div><a w-analytics event="'Footer Twitter Click'"
class="footer__link" w-i18n="welcome.twitter" target="_blank" rel="noopener noreferrer" href="https://twitter.com/Waves_DEX"></a></div>
class="footer__link" w-i18n="welcome.twitter" target="_blank" rel="noopener noreferrer"
href="https://twitter.com/Waves_DEX"></a></div>
<div><a w-analytics event="'Footer Telegram Click'" event-params='{Language: $ctrl.lang}'
class="footer__link" w-i18n="welcome.telegram" target="_blank" rel="noopener noreferrer" href="{{::$ctrl.telegramLink}}"></a></div>
class="footer__link" w-i18n="welcome.telegram" target="_blank" rel="noopener noreferrer"
href="{{::$ctrl.telegramLink}}"></a></div>
<div><a w-analytics event="'Footer Forum Click'"
class="footer__link" w-i18n="welcome.forum" target="_blank" rel="noopener noreferrer" href="https://forum.wavesplatform.com"></a></div>
class="footer__link" w-i18n="welcome.forum" target="_blank" rel="noopener noreferrer"
href="https://forum.wavesplatform.com"></a></div>
</div>
</div>
</div>
</section>
<w-web-only>
<div class="toaster-mobiles" ng-if="::$ctrl.isToasterMobilesVisible">
<a href="{{::$ctrl.mobileAppLink}}" class="toaster-mobiles__link">
<a w-analytics event="::'Download Mobile Client Click'" event-target="::'all'"
href="{{::$ctrl.mobileAppLink}}" class="toaster-mobiles__link">
<div class="toaster-mobiles__mobile-app-logo"></div>
<div class="toaster-mobiles__text-wrapper">
<div class="toaster-mobiles__title" w-i18n="welcome.downloadMobileApp"></div>
Expand Down
6 changes: 0 additions & 6 deletions src/modules/ui/directives/footer/footer.less
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,6 @@
}
}

body.welcome {
.toaster-mobiles {
display: none;
}
}

@media screen and (max-width: 1174px) {
.footer {
.section-wrapper {
Expand Down
24 changes: 15 additions & 9 deletions src/modules/utils/modals/ModalManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
* @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) {
const factory = function ($mdDialog, utils, decorators, $templateRequest, $rootScope, $injector, state, storage,
user) {

const tsUtils = require('ts-utils');
const ds = require('data-service');
Expand Down Expand Up @@ -50,13 +52,8 @@
*/
this._counter = 0;

state.signals.changeRouterStateStart.on(() => {
const counter = this._counter;

for (let i = 0; i < counter; i++) {
$mdDialog.cancel();
}
});
state.signals.changeRouterStateStart.on(this.closeModals, this);
user.logoutSignal.on(this.closeModals, this);
}

showScriptModal() {
Expand Down Expand Up @@ -544,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
Expand Down Expand Up @@ -782,7 +787,8 @@
'$rootScope',
'$injector',
'state',
'storage'];
'storage',
'user'];

angular.module('app.utils')
.factory('modalManager', factory);
Expand Down
5 changes: 3 additions & 2 deletions src/modules/utils/modals/importAccounts/ImportAccountsCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
});
}
Expand Down
Loading