From 1b7cbdf366725eaaf999dfd413d1a70615783b46 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Wed, 20 Mar 2019 19:54:42 +0300 Subject: [PATCH 001/150] CLIENT-1661: fix modal --- .../setAssetScript/SetAssetScriptModalCtrl.js | 29 +++++++++++++-- .../modals/setAssetScript/setAssetScript.html | 36 +++++++++++++++++-- 2 files changed, 61 insertions(+), 4 deletions(-) diff --git a/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js b/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js index 8d8e47801e..d80015e6ca 100644 --- a/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js +++ b/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js @@ -1,7 +1,11 @@ (function () { 'use strict'; - const controller = function (Base, $scope) { + const controller = function (Base, $scope, user, waves) { + + const ds = require('data-service'); + const { path } = require('ramda'); + const { STATUS_LIST } = require('@waves/oracle-data'); class SetAssetScriptModalCtrl extends Base { @@ -18,10 +22,31 @@ * @type {number} */ step = 0; + /** + * @type {boolean} + */ + isVerified; + /** + * @type {boolean} + */ + isGateway; + /** + * @type {boolean} + */ + isSuspicious; constructor(assetId) { super($scope); + waves.node.assets.getAsset(assetId).then(asset => { + this.assetName = asset[0].displayName; + $scope.$apply(); + }); + const data = ds.dataManager.getOracleAssetData(assetId); + this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; + this.isGateway = path(['status'], data) === 3; + this.isSuspicious = user.scam[assetId]; + this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; this.state = { assetId }; } @@ -45,7 +70,7 @@ return new SetAssetScriptModalCtrl(this.locals); }; - controller.$inject = ['Base', '$scope']; + controller.$inject = ['Base', '$scope', 'user', 'waves']; angular.module('app.utils').controller('SetAssetScriptModalCtrl', controller); })(); diff --git a/src/modules/utils/modals/setAssetScript/setAssetScript.html b/src/modules/utils/modals/setAssetScript/setAssetScript.html index ef3ff89a51..e9f3eec012 100644 --- a/src/modules/utils/modals/setAssetScript/setAssetScript.html +++ b/src/modules/utils/modals/setAssetScript/setAssetScript.html @@ -2,7 +2,7 @@ + on-success="$ctrl.onFillTxForm(signable)"> - +
+
+ + +
+

+ {{$ctrl.assetName}} + + + +

+ +
{{::$ctrl.ticker}}
+
+ +
+ +
+
+
+
+
+
+
+
From 2750bfba2e4e3a51e135eb33cec2ae6f254fcab8 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Thu, 21 Mar 2019 12:14:15 +0300 Subject: [PATCH 002/150] CLIENT-1661: add ticke --- .../utils/modals/setAssetScript/SetAssetScriptModalCtrl.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js b/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js index d80015e6ca..2c117c0ef9 100644 --- a/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js +++ b/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js @@ -40,6 +40,7 @@ super($scope); waves.node.assets.getAsset(assetId).then(asset => { this.assetName = asset[0].displayName; + this.ticker = asset[0].ticker; $scope.$apply(); }); const data = ds.dataManager.getOracleAssetData(assetId); From 22bfe0b7e05113a879193b78a5aaa3de9c21281e Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Thu, 21 Mar 2019 12:25:20 +0300 Subject: [PATCH 003/150] CLIENT-1661: add type --- .../utils/modals/setAssetScript/SetAssetScriptModalCtrl.js | 5 ++++- src/modules/utils/modals/setAssetScript/setAssetScript.html | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js b/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js index 2c117c0ef9..0f2efa7305 100644 --- a/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js +++ b/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js @@ -34,7 +34,10 @@ * @type {boolean} */ isSuspicious; - + /** + * @type {string} + */ + assetName; constructor(assetId) { super($scope); diff --git a/src/modules/utils/modals/setAssetScript/setAssetScript.html b/src/modules/utils/modals/setAssetScript/setAssetScript.html index e9f3eec012..d34743e8da 100644 --- a/src/modules/utils/modals/setAssetScript/setAssetScript.html +++ b/src/modules/utils/modals/setAssetScript/setAssetScript.html @@ -28,8 +28,7 @@

- -
{{::$ctrl.ticker}}
+
{{$ctrl.ticker}}
From f392da32f2864737aeb2d7ca411ec9509433645e Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Fri, 22 Mar 2019 11:39:35 +0300 Subject: [PATCH 004/150] CLIENT-1661: fix array assets --- .../ui/directives/setAssetScriptForm/setAssetScriptFrom.html | 3 ++- .../utils/modals/setAssetScript/SetAssetScriptModalCtrl.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html b/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html index 0c74b85963..6c7780c859 100644 --- a/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html +++ b/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html @@ -58,8 +58,9 @@

+

- +
diff --git a/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js b/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js index 0f2efa7305..6ed8b178b9 100644 --- a/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js +++ b/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js @@ -42,8 +42,8 @@ constructor(assetId) { super($scope); waves.node.assets.getAsset(assetId).then(asset => { - this.assetName = asset[0].displayName; - this.ticker = asset[0].ticker; + this.assetName = asset.displayName; + this.ticker = asset.ticker; $scope.$apply(); }); const data = ds.dataManager.getOracleAssetData(assetId); From e13eed7baf62ea8d20506ae18dc7fd345a1c742a Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Fri, 22 Mar 2019 11:42:25 +0300 Subject: [PATCH 005/150] CLIENT-1661: fix setAsset --- .../ui/directives/setAssetScriptForm/setAssetScriptFrom.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html b/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html index 6c7780c859..0c74b85963 100644 --- a/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html +++ b/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html @@ -58,9 +58,8 @@

-
-
+
From a9ab7b063fb42c6b4119d45af4a063aee4b3f592 Mon Sep 17 00:00:00 2001 From: uiskander Date: Thu, 28 Mar 2019 16:32:57 +0300 Subject: [PATCH 006/150] CLIENT-1784: refactor important info toolti, added components to stand --- src/modules/app/less/app.less | 9 +++ src/modules/create/less/confirm-backup.less | 4 - .../create/templates/confirmBackup.html | 2 +- src/modules/create/templates/create.html | 7 +- src/modules/desktop/templates/desktop.html | 7 +- src/modules/restore/templates/restore.html | 7 +- src/modules/stand/controller/StandCtrl.js | 19 ++++- src/modules/stand/less/stand.less | 46 +++++++++++ src/modules/stand/templates/stand.html | 77 ++++++++++++++++-- .../ui/directives/infoTooltip/InfoTooltip.js | 48 +++++++++++ .../directives/infoTooltip/infoTooltip.html | 3 + .../directives/infoTooltip/infoTooltip.less | 78 ++++++++++++++++++ src/modules/utils/modals/receive/Receive.html | 10 +-- .../modals/tutorialModals/tutorialModals.less | 79 ------------------- .../modules/leasing/templates/leasing.html | 1 - src/modules/welcome/templates/welcome.html | 7 +- 16 files changed, 281 insertions(+), 123 deletions(-) create mode 100644 src/modules/ui/directives/infoTooltip/InfoTooltip.js create mode 100644 src/modules/ui/directives/infoTooltip/infoTooltip.html create mode 100644 src/modules/ui/directives/infoTooltip/infoTooltip.less diff --git a/src/modules/app/less/app.less b/src/modules/app/less/app.less index 6d419559a8..f2d1e175c0 100644 --- a/src/modules/app/less/app.less +++ b/src/modules/app/less/app.less @@ -649,6 +649,15 @@ md-toolbar:not(.md-menu-toolbar) { } } + +.important-information { + position: absolute; + right: 150px; + top: 43px; +} + + + w-permit { display: block; } diff --git a/src/modules/create/less/confirm-backup.less b/src/modules/create/less/confirm-backup.less index 514db68802..7ce0d3eeb9 100644 --- a/src/modules/create/less/confirm-backup.less +++ b/src/modules/create/less/confirm-backup.less @@ -3,10 +3,6 @@ margin: auto; text-align: center; - .description { - margin: 10px 0 50px 0; - } - .seed-error { margin-top: -40px; } diff --git a/src/modules/create/templates/confirmBackup.html b/src/modules/create/templates/confirmBackup.html index d9bbd03791..9046a8d6b4 100644 --- a/src/modules/create/templates/confirmBackup.html +++ b/src/modules/create/templates/confirmBackup.html @@ -5,7 +5,7 @@ -
+
diff --git a/src/modules/create/templates/create.html b/src/modules/create/templates/create.html index 9771a03c50..1335d0ef4a 100644 --- a/src/modules/create/templates/create.html +++ b/src/modules/create/templates/create.html @@ -1,8 +1,3 @@ - - - + diff --git a/src/modules/desktop/templates/desktop.html b/src/modules/desktop/templates/desktop.html index 30628ac073..09f71d8889 100644 --- a/src/modules/desktop/templates/desktop.html +++ b/src/modules/desktop/templates/desktop.html @@ -1,12 +1,7 @@
- - - +
diff --git a/src/modules/restore/templates/restore.html b/src/modules/restore/templates/restore.html index 3b68e069b6..14f37a8ba4 100644 --- a/src/modules/restore/templates/restore.html +++ b/src/modules/restore/templates/restore.html @@ -1,10 +1,5 @@
- - - + diff --git a/src/modules/stand/controller/StandCtrl.js b/src/modules/stand/controller/StandCtrl.js index 9593518432..f724467451 100644 --- a/src/modules/stand/controller/StandCtrl.js +++ b/src/modules/stand/controller/StandCtrl.js @@ -1,3 +1,4 @@ +/* eslint-disable max-len */ (function () { 'use strict'; @@ -11,14 +12,30 @@ class StandCtrl extends Base { constructor() { + super($scope); + + const seed = "merry evil keep lost fox tech absent trololo both field get input div cosmic" + /** + * @type {string} + */ + this.tab = 'info'; + this.qrData = 'Keep on waving, we\`ll take care of the bad guys' + /** + * @type {boolean} + */ this.invalid = true; this.warning = true; this.success = true; this.error = true; this.active = true; this.inactive = true; - + this.seedConfirmWasFilled = false; + this.seedIsValid = false; + /** + * @type {string} + */ + this.seed = seed; // this.observeOnce('form', () => { // this.form.invalid.$setTouched(true); // }); diff --git a/src/modules/stand/less/stand.less b/src/modules/stand/less/stand.less index 43214ef44a..64fea20dcf 100644 --- a/src/modules/stand/less/stand.less +++ b/src/modules/stand/less/stand.less @@ -9,6 +9,19 @@ html body .stand .hidden { color: grey; } + w-seed-read[type="read"] { + position: relative; + &:before { + position: absolute; + z-index: 1; + width: 100%; + height: 135px; + content: ''; + opacity: 0; + display: block; + } + } + w-change-language w-select { position: relative; top: 0; @@ -68,4 +81,37 @@ html body .stand .hidden { ._internal-error { display: block !important; } + + w-tabs { + box-shadow: 0 0 3px #ccc; + max-height: 190px; + h4 { + + } + .tab-body-wrap { + } + + .tab-content { + display: flex; + align-items: center; + font-size: 100px; + padding: 20px; + min-height: 140px; + justify-content: center; + } + + + + + + + + w-tab > div { + //height: 141px; + //font-size: 100px; + //padding: 20px; + //border-bottom: 1px solid @color-basic-200; + //text-align: center; + } + } } diff --git a/src/modules/stand/templates/stand.html b/src/modules/stand/templates/stand.html index a1c8f3cafb..0f9bfba1f8 100644 --- a/src/modules/stand/templates/stand.html +++ b/src/modules/stand/templates/stand.html @@ -1,11 +1,8 @@ - - -
+
+ +
@@ -80,7 +77,7 @@

Selects

Select title
- + Default Value 1 Value 2 @@ -208,6 +205,12 @@

Inputs

OFF
+
+ +

Range

+ + +
@@ -280,6 +283,12 @@

Loader

+

Information tooltip

+ + + +
+

Helpers

@@ -302,6 +311,19 @@

Helpers

+
+ +

QR Code

+
+
Отсканируйте QR код
+ +
Нажмите чтобы увеличить/уменьшить
+ +
+ +
+
@@ -397,6 +419,45 @@

Actions

+ +

Seed Backup

+ +
Seed previrew
+ + +
Seed confirmation
+ + + + +
+ +

Tabs

+ + + +
🙉
+
+ +
🙈
+
+ +
🙊
+
+
+ +
+ + + + + + + +
diff --git a/src/modules/ui/directives/infoTooltip/InfoTooltip.js b/src/modules/ui/directives/infoTooltip/InfoTooltip.js new file mode 100644 index 0000000000..0f345f2384 --- /dev/null +++ b/src/modules/ui/directives/infoTooltip/InfoTooltip.js @@ -0,0 +1,48 @@ +(function () { + 'use strict'; + + const controller = function (Base, $scope, $element) { + + class infoTooltipController extends Base { + + constructor() { + super(); + this.hovered = false; + } + + hoverIn() { + this.hovered = true; + clearTimeout(this.timer); + $scope.$apply(); + } + + hoverOut() { + clearTimeout(this.timer); + this.timer = setTimeout(() => { + this.hovered = false; + $scope.$apply(); + }, Number(this.delay) || 1000); + } + + $postLink() { + $element.on('mouseover', () => this.hoverIn()); + $element.on('mouseout', () => this.hoverOut()); + } + + } + + return new HelpIconController(); + }; + + controller.$inject = ['Base', '$scope', '$element']; + + angular.module('app.ui').component('wInfoTooltip', { + templateUrl: 'modules/ui/directives/infoTooltip/infoTooltip.html', + transclude: true, + bindings: { + delay: '=' + }, + controller + }); + +})(); diff --git a/src/modules/ui/directives/infoTooltip/infoTooltip.html b/src/modules/ui/directives/infoTooltip/infoTooltip.html new file mode 100644 index 0000000000..26b3a7a391 --- /dev/null +++ b/src/modules/ui/directives/infoTooltip/infoTooltip.html @@ -0,0 +1,3 @@ +
+ +
diff --git a/src/modules/ui/directives/infoTooltip/infoTooltip.less b/src/modules/ui/directives/infoTooltip/infoTooltip.less new file mode 100644 index 0000000000..e4bb679512 --- /dev/null +++ b/src/modules/ui/directives/infoTooltip/infoTooltip.less @@ -0,0 +1,78 @@ +@import (reference) 'config'; +@import (reference) 'icons'; +@import (reference) '../../../app/less/typography'; + +w-info-tooltip { + width: 16px; + height: 16px; + display: block; + position: relative; + cursor: pointer; + background: @information-icon center no-repeat; + + &:hover { + .tooltip { + display: flex; + align-items: center; + } + } + + .tooltip { + display: none; + position: absolute; + bottom: 100%; + padding: 5px 0 5px 10px; + transform: translate(calc(-50%~'+ 8px'), -6px); + z-index: 2; + border-radius: @border-radius; + background: @color-basic-700; + + &-content { + color: @color-white; + font-size: @font-size-caption-2; + max-width: 240px; + max-height: 150px; + overflow: auto; + display: block; + padding-right: 10px; + } + + &::before { + position: absolute; + bottom: -3px; + left: calc(50% ~'- 5px'); + width: 10px; + height: 10px; + content: ''; + transform-origin: center; + transform: rotate(45deg); + background: @color-basic-700; + z-index: -1; + } + + &:hover { + display: flex; + } + } +} + +@media screen and (max-width: 480px) { + w-info-tooltip { + right: auto; + left: 20px; + + .tooltip { + width: 36px; + right: auto; + left: 10px; + transform: translate(0, 28px); + font-size: 0; + opacity: 0; + + &::after, + &::before { + display: none; + } + } + } +} diff --git a/src/modules/utils/modals/receive/Receive.html b/src/modules/utils/modals/receive/Receive.html index cc88a711cd..d44645b018 100644 --- a/src/modules/utils/modals/receive/Receive.html +++ b/src/modules/utils/modals/receive/Receive.html @@ -79,8 +79,8 @@ -
-
+
+
-
-
+
+
-
diff --git a/src/modules/utils/modals/tutorialModals/tutorialModals.less b/src/modules/utils/modals/tutorialModals/tutorialModals.less index 6c78cc327c..34bd43d10b 100644 --- a/src/modules/utils/modals/tutorialModals/tutorialModals.less +++ b/src/modules/utils/modals/tutorialModals/tutorialModals.less @@ -2,20 +2,6 @@ @import (reference) 'icons'; @import (reference) '../../../app/less/typography'; -.icon-information { - position: absolute; - display: block; - right: 150px; - top: 43px; - background: @information-icon center no-repeat; - width: 16px; - height: 16px; - - &:hover + .tooltip { - display: inline-block; - } -} - .flex-cols { display: flex; flex-wrap: wrap; @@ -60,53 +46,7 @@ } } -.tooltip { - display: none; - position: absolute; - padding: 0 10px; - top: 0; - right: 158px; - transform-origin: center; - transform: translate(50%, 8px); - z-index: 2; - padding-bottom: 20px; - color: @color-white; - font-size: @font-size-caption-2; - line-height: 28px; - cursor: pointer; - - &::before { - position: absolute; - bottom: 17px; - left: calc(50% ~'- 5px'); - width: 10px; - height: 10px; - content: ''; - transform-origin: center; - transform: rotate(45deg); - background: @color-basic-700; - z-index: -1; - } - - &::after { - border-radius: @border-radius; - position: absolute; - background: @color-basic-700; - width: 100%; - height: 28px; - content: ''; - left: 0; - top: 0; - z-index: -1; - } - - &:hover { - display: inline-block; - } -} - body md-dialog.tutorial-modals { - .mobile-only { display: none; } @@ -211,23 +151,4 @@ body md-dialog.tutorial-modals { body w-button.mobile-mid-fsize > *.big { font-size: 14px; } - - .icon-information { - right: auto; - left: 20px; - } - - .tooltip { - width: 36px; - right: auto; - left: 10px; - transform: translate(0, 28px); - font-size: 0; - opacity: 0; - - &::after, - &::before { - display: none; - } - } } diff --git a/src/modules/wallet/modules/leasing/templates/leasing.html b/src/modules/wallet/modules/leasing/templates/leasing.html index 2b723d97f8..904dc87140 100644 --- a/src/modules/wallet/modules/leasing/templates/leasing.html +++ b/src/modules/wallet/modules/leasing/templates/leasing.html @@ -1,7 +1,6 @@
-
diff --git a/src/modules/welcome/templates/welcome.html b/src/modules/welcome/templates/welcome.html index 5b3952efb5..d623d6608a 100644 --- a/src/modules/welcome/templates/welcome.html +++ b/src/modules/welcome/templates/welcome.html @@ -1,9 +1,4 @@ - - - + From 66c8d4c23b84f0463267c80f1776ae50e0638c8a Mon Sep 17 00:00:00 2001 From: uiskander Date: Thu, 28 Mar 2019 19:44:21 +0300 Subject: [PATCH 007/150] CLIENT-1784: tooltip to component --- src/modules/app/less/app.less | 9 ---- src/modules/create/templates/create.html | 4 +- src/modules/desktop/less/desktop.less | 1 - src/modules/desktop/templates/desktop.html | 4 +- src/modules/restore/less/restore.less | 1 - src/modules/restore/templates/restore.html | 4 +- src/modules/stand/controller/StandCtrl.js | 7 +-- src/modules/stand/templates/stand.html | 10 ++-- .../ui/directives/infoTooltip/InfoTooltip.js | 8 ++-- .../directives/infoTooltip/infoTooltip.html | 5 +- .../directives/infoTooltip/infoTooltip.less | 46 ++++++------------- .../modals/tutorialModals/tutorialModals.less | 28 +++++++++++ src/modules/welcome/templates/welcome.html | 4 +- 13 files changed, 69 insertions(+), 62 deletions(-) diff --git a/src/modules/app/less/app.less b/src/modules/app/less/app.less index f2d1e175c0..6d419559a8 100644 --- a/src/modules/app/less/app.less +++ b/src/modules/app/less/app.less @@ -649,15 +649,6 @@ md-toolbar:not(.md-menu-toolbar) { } } - -.important-information { - position: absolute; - right: 150px; - top: 43px; -} - - - w-permit { display: block; } diff --git a/src/modules/create/templates/create.html b/src/modules/create/templates/create.html index 1335d0ef4a..bd194289d2 100644 --- a/src/modules/create/templates/create.html +++ b/src/modules/create/templates/create.html @@ -1,3 +1,5 @@ - + + + diff --git a/src/modules/desktop/less/desktop.less b/src/modules/desktop/less/desktop.less index a53d137a96..13c9526dbd 100644 --- a/src/modules/desktop/less/desktop.less +++ b/src/modules/desktop/less/desktop.less @@ -30,7 +30,6 @@ w-checkbox-submit { vertical-align: top; - margin-right: 10px; } &__button { diff --git a/src/modules/desktop/templates/desktop.html b/src/modules/desktop/templates/desktop.html index 09f71d8889..ea53138875 100644 --- a/src/modules/desktop/templates/desktop.html +++ b/src/modules/desktop/templates/desktop.html @@ -1,7 +1,9 @@
- + + +
diff --git a/src/modules/restore/less/restore.less b/src/modules/restore/less/restore.less index 56c0811cb4..05b27808dc 100644 --- a/src/modules/restore/less/restore.less +++ b/src/modules/restore/less/restore.less @@ -62,7 +62,6 @@ body.restore { } } } - } } diff --git a/src/modules/restore/templates/restore.html b/src/modules/restore/templates/restore.html index 14f37a8ba4..f87a03b424 100644 --- a/src/modules/restore/templates/restore.html +++ b/src/modules/restore/templates/restore.html @@ -1,5 +1,7 @@
- + + + diff --git a/src/modules/stand/controller/StandCtrl.js b/src/modules/stand/controller/StandCtrl.js index f724467451..569bdd2425 100644 --- a/src/modules/stand/controller/StandCtrl.js +++ b/src/modules/stand/controller/StandCtrl.js @@ -15,12 +15,12 @@ super($scope); - const seed = "merry evil keep lost fox tech absent trololo both field get input div cosmic" + const seed = 'merry evil keep lost fox tech absent trololo both field get input div cosmic'; /** * @type {string} */ this.tab = 'info'; - this.qrData = 'Keep on waving, we\`ll take care of the bad guys' + this.qrData = 'Keep on waving, we`ll take care of the bad guys'; /** * @type {boolean} */ @@ -36,9 +36,6 @@ * @type {string} */ this.seed = seed; - // this.observeOnce('form', () => { - // this.form.invalid.$setTouched(true); - // }); } } diff --git a/src/modules/stand/templates/stand.html b/src/modules/stand/templates/stand.html index 0f9bfba1f8..6899ae5237 100644 --- a/src/modules/stand/templates/stand.html +++ b/src/modules/stand/templates/stand.html @@ -266,7 +266,6 @@

Errors

-

Empty block

@@ -283,9 +282,14 @@

Loader

-

Information tooltip

+

Tooltip

- +
+ Important information + + Hi, I'm Tooltip. I need a relative container + +
diff --git a/src/modules/ui/directives/infoTooltip/InfoTooltip.js b/src/modules/ui/directives/infoTooltip/InfoTooltip.js index 0f345f2384..42fb1489b6 100644 --- a/src/modules/ui/directives/infoTooltip/InfoTooltip.js +++ b/src/modules/ui/directives/infoTooltip/InfoTooltip.js @@ -3,7 +3,7 @@ const controller = function (Base, $scope, $element) { - class infoTooltipController extends Base { + class InfoTooltipController extends Base { constructor() { super(); @@ -25,13 +25,13 @@ } $postLink() { - $element.on('mouseover', () => this.hoverIn()); - $element.on('mouseout', () => this.hoverOut()); + $element.find('i').on('mouseover', () => this.hoverIn()); + $element.find('i').on('mouseout', () => this.hoverOut()); } } - return new HelpIconController(); + return new InfoTooltipController(); }; controller.$inject = ['Base', '$scope', '$element']; diff --git a/src/modules/ui/directives/infoTooltip/infoTooltip.html b/src/modules/ui/directives/infoTooltip/infoTooltip.html index 26b3a7a391..65dbf78b40 100644 --- a/src/modules/ui/directives/infoTooltip/infoTooltip.html +++ b/src/modules/ui/directives/infoTooltip/infoTooltip.html @@ -1,3 +1,2 @@ -
- -
+ +
diff --git a/src/modules/ui/directives/infoTooltip/infoTooltip.less b/src/modules/ui/directives/infoTooltip/infoTooltip.less index e4bb679512..5095703e5d 100644 --- a/src/modules/ui/directives/infoTooltip/infoTooltip.less +++ b/src/modules/ui/directives/infoTooltip/infoTooltip.less @@ -3,17 +3,18 @@ @import (reference) '../../../app/less/typography'; w-info-tooltip { - width: 16px; - height: 16px; - display: block; - position: relative; - cursor: pointer; - background: @information-icon center no-repeat; + .information-icon { + width: 16px; + height: 16px; + display: block; + background: @information-icon center no-repeat; + cursor: pointer; - &:hover { - .tooltip { - display: flex; - align-items: center; + &:hover { + & + .tooltip { + display: flex; + align-items: center; + } } } @@ -24,14 +25,16 @@ w-info-tooltip { padding: 5px 0 5px 10px; transform: translate(calc(-50%~'+ 8px'), -6px); z-index: 2; + cursor: pointer; border-radius: @border-radius; background: @color-basic-700; - &-content { + &__content { color: @color-white; font-size: @font-size-caption-2; max-width: 240px; max-height: 150px; + width: max-content; overflow: auto; display: block; padding-right: 10px; @@ -55,24 +58,3 @@ w-info-tooltip { } } } - -@media screen and (max-width: 480px) { - w-info-tooltip { - right: auto; - left: 20px; - - .tooltip { - width: 36px; - right: auto; - left: 10px; - transform: translate(0, 28px); - font-size: 0; - opacity: 0; - - &::after, - &::before { - display: none; - } - } - } -} diff --git a/src/modules/utils/modals/tutorialModals/tutorialModals.less b/src/modules/utils/modals/tutorialModals/tutorialModals.less index 34bd43d10b..d25d3911f0 100644 --- a/src/modules/utils/modals/tutorialModals/tutorialModals.less +++ b/src/modules/utils/modals/tutorialModals/tutorialModals.less @@ -2,6 +2,34 @@ @import (reference) 'icons'; @import (reference) '../../../app/less/typography'; +.welcome, +.create, +.restore, +.desktop { + .important-information { + position: absolute; + right: 0; + min-width: 170px; + top: 43px; + } + + @media screen and (max-width: 480px) { + w-change-language w-select { + right: 20px; + } + .important-information { + left: 20px; + right: auto; + .tooltip { + transform: translate(-10px, -6px); + &::before { + left: 13px; + } + } + } + } +} + .flex-cols { display: flex; flex-wrap: wrap; diff --git a/src/modules/welcome/templates/welcome.html b/src/modules/welcome/templates/welcome.html index d623d6608a..3678294e75 100644 --- a/src/modules/welcome/templates/welcome.html +++ b/src/modules/welcome/templates/welcome.html @@ -1,4 +1,6 @@ - + + + From 4f8ea764b01ad4908ab782d103b2d059b37bec51 Mon Sep 17 00:00:00 2001 From: uiskander Date: Thu, 28 Mar 2019 19:57:31 +0300 Subject: [PATCH 008/150] CLIENT-1784: tooltip to component --- src/modules/stand/less/stand.less | 24 +++--------- .../directives/infoTooltip/infoTooltip.less | 1 + .../modals/tutorialModals/tutorialModals.less | 39 ++++++++++--------- 3 files changed, 26 insertions(+), 38 deletions(-) diff --git a/src/modules/stand/less/stand.less b/src/modules/stand/less/stand.less index 64fea20dcf..b0fef7a2bd 100644 --- a/src/modules/stand/less/stand.less +++ b/src/modules/stand/less/stand.less @@ -1,11 +1,11 @@ @import (reference) 'config'; -html body .stand .hidden { - display: block !important; -} +html body.stand { + .hidden { + display: block !important; + } -.stand { - h1 { + h1 { color: grey; } @@ -99,19 +99,5 @@ html body .stand .hidden { min-height: 140px; justify-content: center; } - - - - - - - - w-tab > div { - //height: 141px; - //font-size: 100px; - //padding: 20px; - //border-bottom: 1px solid @color-basic-200; - //text-align: center; - } } } diff --git a/src/modules/ui/directives/infoTooltip/infoTooltip.less b/src/modules/ui/directives/infoTooltip/infoTooltip.less index 5095703e5d..71df82e885 100644 --- a/src/modules/ui/directives/infoTooltip/infoTooltip.less +++ b/src/modules/ui/directives/infoTooltip/infoTooltip.less @@ -10,6 +10,7 @@ w-info-tooltip { background: @information-icon center no-repeat; cursor: pointer; + &.hovered, &:hover { & + .tooltip { display: flex; diff --git a/src/modules/utils/modals/tutorialModals/tutorialModals.less b/src/modules/utils/modals/tutorialModals/tutorialModals.less index d25d3911f0..27642352c6 100644 --- a/src/modules/utils/modals/tutorialModals/tutorialModals.less +++ b/src/modules/utils/modals/tutorialModals/tutorialModals.less @@ -2,29 +2,30 @@ @import (reference) 'icons'; @import (reference) '../../../app/less/typography'; -.welcome, -.create, -.restore, -.desktop { - .important-information { - position: absolute; - right: 0; - min-width: 170px; - top: 43px; - } +.important-information { + position: absolute; + right: 0; + min-width: 170px; + top: 43px; +} - @media screen and (max-width: 480px) { +@media screen and (max-width: 480px) { + .welcome, + .create, + .restore, + .desktop { w-change-language w-select { right: 20px; } - .important-information { - left: 20px; - right: auto; - .tooltip { - transform: translate(-10px, -6px); - &::before { - left: 13px; - } + } + + .important-information { + left: 20px; + right: auto; + .tooltip { + transform: translate(-10px, -6px); + &::before { + left: 13px; } } } From b477cf0e897e1c8f5d5a471c3192597b4e9d14ac Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Fri, 29 Mar 2019 18:44:18 +0300 Subject: [PATCH 009/150] CLIENT-1246: edit addversions logic --- src/modules/utils/services/whatsNew.js | 29 +++++++++++++------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/modules/utils/services/whatsNew.js b/src/modules/utils/services/whatsNew.js index 6f03479114..13287f5c84 100644 --- a/src/modules/utils/services/whatsNew.js +++ b/src/modules/utils/services/whatsNew.js @@ -6,9 +6,8 @@ * @param {INotification} notification * @param {User} user * @param {Migration} migration - * @param {app.utils} utils */ - const factory = function (notification, user, migration, utils) { + const factory = function (notification, user, migration) { const MIGRATION_LIST = [ '1.0.0', @@ -39,16 +38,16 @@ '1.2.0' ]; - /** - * @param {string|Array} version - */ - function addVersions(version) { - const versions = user.getSetting('whatsNewList').slice(); - utils.toArray(version).forEach((version) => { - versions.push(version); - }); - user.setSetting('whatsNewList', versions); - } + // /** + // * @param {string|Array} version + // */ + // function addVersions(version) { + // const versions = user.getSetting('whatsNewList').slice(); + // utils.toArray(version).forEach((version) => { + // versions.push(version); + // }); + // user.setSetting('whatsNewList', versions); + // } function removeVersion(version) { const versions = user.getSetting('whatsNewList').slice(); @@ -71,7 +70,6 @@ const notShownUpdates = user.getSetting('whatsNewList'); const lastOpenVersion = user.getSetting('lastOpenVersion'); const newVersionList = migration.migrateFrom(lastOpenVersion || WavesApp.version, MIGRATION_LIST); - migration.sort(unique(newVersionList, notShownUpdates)).forEach((version) => { notification.info({ ns: 'app.utils', @@ -87,15 +85,16 @@ } }, -1); }); + // addVersions(newVersionList); - addVersions(newVersionList); user.setSetting('lastOpenVersion', WavesApp.version); + user.setSetting('whatsNewList', newVersionList); }); return Object.create(null); }; - factory.$inject = ['notification', 'user', 'migration', 'utils']; + factory.$inject = ['notification', 'user', 'migration']; angular.module('app.utils').factory('whatsNew', factory); })(); From 4266cc5b75c85a5c933b145166f4d7b402aa39c1 Mon Sep 17 00:00:00 2001 From: uiskander Date: Fri, 29 Mar 2019 19:40:03 +0300 Subject: [PATCH 010/150] CLIENT-1784: add expandable block component, some refactoring --- src/modules/app/less/app-icons.less | 1 - src/modules/app/less/app.less | 7 +- src/modules/restore/less/restore.less | 35 +++++---- src/modules/stand/controller/StandCtrl.js | 1 + src/modules/stand/less/stand.less | 13 +++- src/modules/stand/templates/stand.html | 37 ++++++++- src/modules/tokens/less/tokens.less | 1 - .../ui/directives/copyWrap/copyWrap.less | 6 ++ .../expandableBlock/ExpandableBlock.js | 11 +++ .../expandableBlock/expandableBlock.html | 7 ++ .../expandableBlock/expandableBlock.less | 63 +++++++++++++++ src/modules/ui/directives/input/input.less | 1 + src/modules/utils/modals/receive/Receive.html | 4 +- src/modules/utils/modals/receive/Receive.less | 13 ---- .../directives/leasingBlock/leasingBlock.html | 6 +- .../directives/leasingBlock/leasingBlock.less | 68 +++++++--------- .../wallet/modules/leasing/less/leasing.less | 78 +------------------ .../modules/leasing/templates/leasing.html | 44 +++++------ 18 files changed, 215 insertions(+), 181 deletions(-) create mode 100644 src/modules/ui/directives/expandableBlock/ExpandableBlock.js create mode 100644 src/modules/ui/directives/expandableBlock/expandableBlock.html create mode 100644 src/modules/ui/directives/expandableBlock/expandableBlock.less diff --git a/src/modules/app/less/app-icons.less b/src/modules/app/less/app-icons.less index 00f3fbe799..45a548f312 100644 --- a/src/modules/app/less/app-icons.less +++ b/src/modules/app/less/app-icons.less @@ -402,4 +402,3 @@ .keeper-icon { background: url(/img/icons/keeper-icon.svg) center no-repeat; } - diff --git a/src/modules/app/less/app.less b/src/modules/app/less/app.less index 6d419559a8..1b9ae14ad2 100644 --- a/src/modules/app/less/app.less +++ b/src/modules/app/less/app.less @@ -33,7 +33,8 @@ body.restore, body.import, body.ledger, body.tokens, -body.wallet { +body.wallet, +body.stand { .scroll(); } @@ -338,6 +339,10 @@ w-sign-button, overflow: hidden; } +.overflow { + overflow: auto; +} + .flex-column-center { width: 100%; height: 100%; diff --git a/src/modules/restore/less/restore.less b/src/modules/restore/less/restore.less index 05b27808dc..4726101462 100644 --- a/src/modules/restore/less/restore.less +++ b/src/modules/restore/less/restore.less @@ -28,28 +28,13 @@ body.restore { resize: vertical; } - .address-block-info { - background-color: @color-disabled-50; - border-top: 1px solid @color-basic-200; - height: 76px; - display: flex; - flex-direction: row; - padding: 18px 14px; - - .avatar-fake { - width: 40px; - height: 40px; - border-radius: 100%; - background-color: @color-basic-100; - } - - .address-block { + .address { + &-block { height: 30px; position: relative; top: -5px; .address { - &.empty { position: relative; top: 3px; @@ -60,6 +45,22 @@ body.restore { } } } + + &-block-info { + background-color: @color-disabled-50; + border-top: 1px solid @color-basic-200; + height: 76px; + display: flex; + flex-direction: row; + padding: 18px 14px; + } + + .avatar-fake { + width: 40px; + height: 40px; + border-radius: 100%; + background-color: @color-basic-100; + } } } } diff --git a/src/modules/stand/controller/StandCtrl.js b/src/modules/stand/controller/StandCtrl.js index 569bdd2425..2b8b6a65c3 100644 --- a/src/modules/stand/controller/StandCtrl.js +++ b/src/modules/stand/controller/StandCtrl.js @@ -21,6 +21,7 @@ */ this.tab = 'info'; this.qrData = 'Keep on waving, we`ll take care of the bad guys'; + this.info = this.dataCopy = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; /** * @type {boolean} */ diff --git a/src/modules/stand/less/stand.less b/src/modules/stand/less/stand.less index b0fef7a2bd..72e5d6a810 100644 --- a/src/modules/stand/less/stand.less +++ b/src/modules/stand/less/stand.less @@ -68,14 +68,25 @@ html body.stand { border-right: 1px dashed @color-basic-200; } + .column2 { + background: @color-basic-50; + .relative-wrapper { + background: @color-white; + } + } + .unit-checkbox { width: 300px !important; } + .qr-wrapper, .relative-wrapper { + background: @color-white; position: relative; border: 1px dashed @color-basic-200; - height: 140px; + min-height: 100px; + padding: 20px 0; + border-radius: @border-radius; } ._internal-error { diff --git a/src/modules/stand/templates/stand.html b/src/modules/stand/templates/stand.html index 6899ae5237..a65c850541 100644 --- a/src/modules/stand/templates/stand.html +++ b/src/modules/stand/templates/stand.html @@ -26,17 +26,18 @@

Buttons

- - Small + + Tiny
- - Tiny + + Small
+ Medium @@ -164,6 +165,14 @@

Inputs

+ + {{$ctrl.dataCopy}} + + + +
+
@@ -326,8 +335,28 @@

QR Code

+
+ +

Expandable block

+ + + 🙈 + +
+

Modal window killer

+ +
+ +
+
diff --git a/src/modules/tokens/less/tokens.less b/src/modules/tokens/less/tokens.less index dcbc3be16c..b52e243e81 100644 --- a/src/modules/tokens/less/tokens.less +++ b/src/modules/tokens/less/tokens.less @@ -42,7 +42,6 @@ body.tokens { } textarea { - resize: vertical; min-height: 77px; max-height: 300px; } diff --git a/src/modules/ui/directives/copyWrap/copyWrap.less b/src/modules/ui/directives/copyWrap/copyWrap.less index 48dcf34248..a604338e9a 100644 --- a/src/modules/ui/directives/copyWrap/copyWrap.less +++ b/src/modules/ui/directives/copyWrap/copyWrap.less @@ -22,6 +22,12 @@ w-copy-wrap { max-width: calc(100% ~'- 45px'); } + &.overflow { + .container { + overflow: auto; + } + } + .copy-icon { border-left: 1px solid @color-basic-200; flex-basis: 40px; diff --git a/src/modules/ui/directives/expandableBlock/ExpandableBlock.js b/src/modules/ui/directives/expandableBlock/ExpandableBlock.js new file mode 100644 index 0000000000..8036787aec --- /dev/null +++ b/src/modules/ui/directives/expandableBlock/ExpandableBlock.js @@ -0,0 +1,11 @@ +(function () { + 'use strict'; + + angular.module('app.ui').component('wExpandableBlock', { + bindings: { + title: '<' + }, + templateUrl: 'modules/ui/directives/expandableBlock/expandableBlock.html', + transclude: true + }); +})(); diff --git a/src/modules/ui/directives/expandableBlock/expandableBlock.html b/src/modules/ui/directives/expandableBlock/expandableBlock.html new file mode 100644 index 0000000000..f18ec9ba5d --- /dev/null +++ b/src/modules/ui/directives/expandableBlock/expandableBlock.html @@ -0,0 +1,7 @@ +
+ +
+ +
+
diff --git a/src/modules/ui/directives/expandableBlock/expandableBlock.less b/src/modules/ui/directives/expandableBlock/expandableBlock.less new file mode 100644 index 0000000000..0d5871617e --- /dev/null +++ b/src/modules/ui/directives/expandableBlock/expandableBlock.less @@ -0,0 +1,63 @@ +@import (reference) "../../../app/less/app-icons"; +@import (reference) '../../../app/less/typography'; +@import (reference) 'config'; + +w-expandable-block { + .expandable-block { + position: relative; + overflow: hidden; + border-radius: @border-radius; + background-color: @color-white; + box-shadow: @shadow-type-1; + + &__title { + display: flex; + width: 100%; + height: 39px; + align-items: center; + color: @color-basic-700; + padding: 0 20px; + font-family: @font-roboto-medium; + } + + &__trigger { + .icon-dex-arrow(); + background-color: @color-basic-50; + top: 10px; + width: 20px; + height: 20px; + cursor: pointer; + transition: transform 0.3s ease-in-out, all 0.3s; + border-radius: 2px; + position: absolute; + z-index: 3; + right: 12px; + + &:hover { + background-color: @color-basic-100; + } + } + + &__container { + height: 0; + transition: .4s; + overflow: hidden; + padding: 0 20px; + border-color: transparent; + } + + &.active { + .expandable-block { + &__container { + height: auto; + border-top: 1px solid @color-basic-100; + padding: 20px; + } + + &__trigger { + transform: rotate(-180deg) + } + } + } + } +} diff --git a/src/modules/ui/directives/input/input.less b/src/modules/ui/directives/input/input.less index 6eab58ca45..af584d0967 100644 --- a/src/modules/ui/directives/input/input.less +++ b/src/modules/ui/directives/input/input.less @@ -186,6 +186,7 @@ w-input { } &[textarea="true"] { + resize: vertical; &.large textarea { min-height: 300px; diff --git a/src/modules/utils/modals/receive/Receive.html b/src/modules/utils/modals/receive/Receive.html index d44645b018..706cd2f9bd 100644 --- a/src/modules/utils/modals/receive/Receive.html +++ b/src/modules/utils/modals/receive/Receive.html @@ -68,7 +68,7 @@
- {{$ctrl.gatewayAddress}} @@ -161,7 +161,7 @@
- {{$ctrl.sendLink}} diff --git a/src/modules/utils/modals/receive/Receive.less b/src/modules/utils/modals/receive/Receive.less index 46b181cb23..d7608387fb 100644 --- a/src/modules/utils/modals/receive/Receive.less +++ b/src/modules/utils/modals/receive/Receive.less @@ -164,19 +164,6 @@ md-dialog.modal-receive { max-height: auto; } - .receive-crypto, - .receive-invoice { - w-copy-wrap { - .container { - display: flex; - align-items: center; - width: 100%; - white-space: nowrap; - overflow: auto; - } - } - } - .receive-user-status { position: relative; min-height: 130px; diff --git a/src/modules/wallet/modules/leasing/directives/leasingBlock/leasingBlock.html b/src/modules/wallet/modules/leasing/directives/leasingBlock/leasingBlock.html index 4cd264c807..f2c54b7d0c 100644 --- a/src/modules/wallet/modules/leasing/directives/leasingBlock/leasingBlock.html +++ b/src/modules/wallet/modules/leasing/directives/leasingBlock/leasingBlock.html @@ -1,2 +1,4 @@ -
{{::$ctrl.title}}
-
\ No newline at end of file +
+
{{::$ctrl.title}}
+
+
diff --git a/src/modules/wallet/modules/leasing/directives/leasingBlock/leasingBlock.less b/src/modules/wallet/modules/leasing/directives/leasingBlock/leasingBlock.less index f2d99cedf4..754141d35f 100644 --- a/src/modules/wallet/modules/leasing/directives/leasingBlock/leasingBlock.less +++ b/src/modules/wallet/modules/leasing/directives/leasingBlock/leasingBlock.less @@ -1,53 +1,43 @@ -@import (reference) 'config'; @import (reference) '../../../../../app/less/typography'; +@import (reference) 'config'; w-leasing-block { display: block; - width: 100%; - border-radius: @border-radius; - background-color: @color-white; - box-shadow: @shadow-type-1; - .leasing-block-title { - display: flex; + .leasing-block { + display: block; width: 100%; - height: 39px; - align-items: center; - color: @color-disabled-900; - border-bottom: 1px solid @color-disabled-100; - padding: 0 20px; - } + border-radius: @border-radius; + background-color: @color-white; + box-shadow: @shadow-type-1; - .leasing-block-content { - padding: 20px; + &__title { + height: 20px; + display: flex; + align-items: center; + padding: 0 20px; + z-index: 2; + position: relative; + color: @color-basic-900; + font-family: @font-roboto-medium; + } - .balance-container { - font-size: 28px; - line-height: 34px; - font-weight: normal; + &__content { + padding: 0 20px 20px; - .int { - font-family: @font-roboto-regular; - } - .decimal { - font-family: @font-roboto-light; - } - } - } + .balance-container { + font-size: 28px; + line-height: 34px; + font-weight: normal; - &.noheader { - .leasing-block-title { - border-bottom: 0 none; - padding: 0 20px; - height: 20px; - justify-content: center; - font-weight: normal; - font-family: @font-roboto-regular; - } + .int { + font-family: @font-roboto-regular; + } - .leasing-block-content { - padding-top: 0; + .decimal { + font-family: @font-roboto-light; + } + } } - } } diff --git a/src/modules/wallet/modules/leasing/less/leasing.less b/src/modules/wallet/modules/leasing/less/leasing.less index 4b9b8a3c2a..00a64b0820 100644 --- a/src/modules/wallet/modules/leasing/less/leasing.less +++ b/src/modules/wallet/modules/leasing/less/leasing.less @@ -1,11 +1,9 @@ -@import (reference) '../../../../app/less/app-icons'; -@import (reference) '../../../../app/less/typography'; +@import (reference) "../../../../app/less/app-icons"; @import (reference) 'config'; @import (reference) 'icons'; @leftPanelWidth: 330px; @leftPanelRightMargin: 10px; -@height-transaction-header: 40px; .leasing-page { display: flex; @@ -22,19 +20,6 @@ margin-right: @leftPanelRightMargin; } - .transactions-title { - height: @height-transaction-header; - display: flex; - align-items: center; - padding: 0 20px; - background-color: @color-white; - border-top-left-radius: @border-radius; - border-top-right-radius: @border-radius; - border-bottom: 1px solid @color-basic-100; - z-index: 2; - position: relative; - } - .btn-wrap.btn-group { justify-content: flex-start; padding: 0; @@ -47,7 +32,6 @@ &:first-letter { text-transform: uppercase; } - } } @@ -77,7 +61,6 @@ } .legend-container { - .legend-item { position: relative; display: flex; @@ -132,63 +115,6 @@ background-image: @leasing-note-icon; } } - - w-leasing-block.leasingNote { - position: relative; - overflow: hidden; - - .leasing-block-title { - display: none; - } - - .transactions-title { - border: 0 none; - } - - .leasing-block-content { - padding: 0; - } - - i.collapse-trigger { - top: 10px; - width: 20px; - height: 20px; - cursor: pointer; - transition: transform 0.3s ease-in-out, all 0.3s; - border-radius: 2px; - background-repeat: no-repeat; - background-position: center center; - position: absolute; - z-index: 3; - right: 12px; - .icon-dex-arrow(); - background-color: @color-basic-50; - } - i.collapse-trigger:hover { - background-color: @color-basic-100; - } - div.collapse-container { - height: 0px; - transition: .4s; - overflow: hidden; - padding: 0 20px; - border-bottom: 0 none; - border-top: 0 none; - } - - &.active { - div.collapse-container { - height: auto; - border-top: 1px solid @color-basic-50; - padding: 20px; - } - - i.collapse-trigger { - transform: rotate(-180deg) - } - } - - } } @media screen and (max-width: @width-media-normal) { @@ -224,7 +150,7 @@ } } - .leasingNote { + .expandable-block { margin-bottom: 10px; } } diff --git a/src/modules/wallet/modules/leasing/templates/leasing.html b/src/modules/wallet/modules/leasing/templates/leasing.html index 904dc87140..e7047f250f 100644 --- a/src/modules/wallet/modules/leasing/templates/leasing.html +++ b/src/modules/wallet/modules/leasing/templates/leasing.html @@ -1,9 +1,9 @@
- -
- -
+ + +
@@ -28,28 +28,24 @@
- -
- -
- -
-
-
-
-
-
- - - -
-
+ + +
+
+
+
+
+ + + +
+
-
+
From 26d19e7ec918df7dad29c1af9e557a45b27cadee Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Fri, 5 Apr 2019 13:04:15 +0300 Subject: [PATCH 011/150] CLIENT-1800: add assetInfoHead component --- .../directives/assetInfoHead/AssetInfoHead.js | 93 +++++++++++++++++++ .../assetInfoHead/asset-info-head.html | 24 +++++ .../utils/modals/assetInfo/assetInfo.html | 1 + 3 files changed, 118 insertions(+) create mode 100644 src/modules/ui/directives/assetInfoHead/AssetInfoHead.js create mode 100644 src/modules/ui/directives/assetInfoHead/asset-info-head.html diff --git a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js new file mode 100644 index 0000000000..1839a8c0a3 --- /dev/null +++ b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js @@ -0,0 +1,93 @@ +(function () { + 'use strict'; + + /** + * @param Base + * @param $scope + * @param user + * @param waves + * @return {AssetInfoHead} + */ + const controller = function (Base, $scope, user, waves) { + + const ds = require('data-service'); + const { path } = require('ramda'); + const { STATUS_LIST } = require('@waves/oracle-data'); + + class AssetInfoHead extends Base { + + /** + * @param {object} + * @type {{this}} + */ + state; + /** + * @type {Signable} + */ + signable; + /** + * @type {number} + */ + step = 0; + /** + * @type {boolean} + */ + isVerified; + /** + * @type {boolean} + */ + isGateway; + /** + * @type {boolean} + */ + isSuspicious; + /** + * @type {string} + */ + assetName; + + $postLink() { + waves.node.assets.getAsset(this.assetId).then(asset => { + this.assetName = asset.displayName; + this.ticker = asset.ticker; + $scope.$apply(); + }); + const data = ds.dataManager.getOracleAssetData(this.assetId); + this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; + this.isGateway = path(['status'], data) === STATUS_LIST.GATEWAY; + this.isSuspicious = user.scam[this.assetId]; + this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; + + this.state = { assetId: this.assetId }; + } + + /** + * @param {Signable} signable + */ + onFillTxForm(signable) { + this.signable = signable; + const { assetId, script } = this.signable.getTxData(); + this.state = { assetId, script }; + this.step++; + } + + onConfirmBack() { + this.step--; + } + + } + + return new AssetInfoHead(); + }; + + controller.$inject = ['Base', '$scope', 'user', 'waves']; + + angular.module('app.ui') + .component('wAssetInfoHead', { + controller: controller, + templateUrl: 'modules/ui/directives/assetInfoHead/asset-info-head.html', + bindings: { + assetId: '@' + } + }); +})(); diff --git a/src/modules/ui/directives/assetInfoHead/asset-info-head.html b/src/modules/ui/directives/assetInfoHead/asset-info-head.html new file mode 100644 index 0000000000..fcad9a7bdf --- /dev/null +++ b/src/modules/ui/directives/assetInfoHead/asset-info-head.html @@ -0,0 +1,24 @@ +
+
+ + +
+

+ {{$ctrl.assetName}} + + + +

+ +
{{$ctrl.ticker}}
+
+ +
+ +
+
+ +
+
diff --git a/src/modules/utils/modals/assetInfo/assetInfo.html b/src/modules/utils/modals/assetInfo/assetInfo.html index c848ffdd13..ad4cb15751 100644 --- a/src/modules/utils/modals/assetInfo/assetInfo.html +++ b/src/modules/utils/modals/assetInfo/assetInfo.html @@ -1,4 +1,5 @@
+
Date: Fri, 5 Apr 2019 13:16:31 +0300 Subject: [PATCH 012/150] CLIENT-1800: replace component --- .../directives/assetInfoHead/AssetInfoHead.js | 3 +- .../utils/modals/assetInfo/assetInfo.html | 24 -------------- .../changeToken/change-token-modal.html | 27 ++-------------- .../utils/modals/sponsored/sponsored.html | 31 +------------------ 4 files changed, 5 insertions(+), 80 deletions(-) diff --git a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js index 1839a8c0a3..664a99896f 100644 --- a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js +++ b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js @@ -54,7 +54,8 @@ }); const data = ds.dataManager.getOracleAssetData(this.assetId); this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; - this.isGateway = path(['status'], data) === STATUS_LIST.GATEWAY; + // TODO this.isGateway = path(['status'], data) === STATUS_LIST.GATEWAY; + this.isGateway = path(['status'], data) === 3; this.isSuspicious = user.scam[this.assetId]; this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; diff --git a/src/modules/utils/modals/assetInfo/assetInfo.html b/src/modules/utils/modals/assetInfo/assetInfo.html index ad4cb15751..704eb17767 100644 --- a/src/modules/utils/modals/assetInfo/assetInfo.html +++ b/src/modules/utils/modals/assetInfo/assetInfo.html @@ -1,29 +1,5 @@
-
-
- - -
-

- {{::$ctrl.asset.name}} - - - -

- -
{{::$ctrl.ticker}}
-
- -
- -
-
- -
-
-
-
- - -
-

{{::$ctrl.asset.name}} - - -

- -
- {{::$ctrl.ticker}} -
-
- -
- -
-
- -
-
+
@@ -122,7 +99,7 @@

{{::$ctrl.asset.name}}

+ class="error-400">
-
-
- - -
-

{{::$ctrl.asset.name}} - - -

- -
- asd{{::$ctrl.ticker}} -
-
- -
- -
-
- -
-
+
From b3559617aa8061102584cc4b4ae461eaacdb6c42 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Fri, 5 Apr 2019 15:50:41 +0300 Subject: [PATCH 013/150] CLIENT-1800: add constant --- src/modules/ui/directives/assetInfoHead/AssetInfoHead.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js index 664a99896f..1d49f47859 100644 --- a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js +++ b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js @@ -13,6 +13,7 @@ const ds = require('data-service'); const { path } = require('ramda'); const { STATUS_LIST } = require('@waves/oracle-data'); + const GATEWAY = 3; class AssetInfoHead extends Base { @@ -54,8 +55,7 @@ }); const data = ds.dataManager.getOracleAssetData(this.assetId); this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; - // TODO this.isGateway = path(['status'], data) === STATUS_LIST.GATEWAY; - this.isGateway = path(['status'], data) === 3; + this.isGateway = path(['status'], data) === GATEWAY; this.isSuspicious = user.scam[this.assetId]; this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; From ae00b421fbe7fa53c889d86ce41b44ed728799f4 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Fri, 5 Apr 2019 16:29:59 +0300 Subject: [PATCH 014/150] CLIENT-1800: fix --- .../setAssetScriptFrom.html | 30 +------------------ .../modals/setAssetScript/setAssetScript.html | 29 +----------------- 2 files changed, 2 insertions(+), 57 deletions(-) diff --git a/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html b/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html index 2b7334c165..bf5cbc384f 100644 --- a/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html +++ b/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html @@ -1,34 +1,6 @@ -
-
- - -
-

- {{::$ctrl.asset.name}} - - - -

- -
{{::$ctrl.ticker}}
-
- -
- -
-
-
-
+
diff --git a/src/modules/utils/modals/setAssetScript/setAssetScript.html b/src/modules/utils/modals/setAssetScript/setAssetScript.html index d34743e8da..0a9cf0a4e4 100644 --- a/src/modules/utils/modals/setAssetScript/setAssetScript.html +++ b/src/modules/utils/modals/setAssetScript/setAssetScript.html @@ -11,34 +11,7 @@ -
-
- - -
-

- {{$ctrl.assetName}} - - - -

-
{{$ctrl.ticker}}
-
- -
- -
-
-
-
+
From 49362f6086838455c1e8713f17a2ff927b3989f1 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Mon, 8 Apr 2019 16:46:33 +0300 Subject: [PATCH 015/150] CLIENT-1246: doesn't show whats new, after rollback --- src/modules/utils/services/Migration.js | 62 ++++++++++++------------- src/modules/utils/services/whatsNew.js | 37 +++++++++------ 2 files changed, 53 insertions(+), 46 deletions(-) diff --git a/src/modules/utils/services/Migration.js b/src/modules/utils/services/Migration.js index 0f1304cfbe..06c35486a7 100644 --- a/src/modules/utils/services/Migration.js +++ b/src/modules/utils/services/Migration.js @@ -4,70 +4,70 @@ const factory = function () { - class Migration { + const migration = { - migrateFrom(version, versionList) { + migrateFrom: (version, versionList) => { return versionList - .filter(Migration.getCurrentVersionFilter(version)) - .sort(Migration._comparator); - } + .filter(migration.getCurrentVersionFilter(version)) + .sort(migration._comparator); + }, - sort(versionList) { - return versionList.slice().sort(Migration._comparator); - } + sort: (versionList) => { + return versionList.slice().sort(migration._comparator); + }, /** * @param {string} v1 * @param {string} v2 * @return {boolean} */ - static lt(v1, v2) { - const result = Migration._comparator(v1, v2); + lt: (v1, v2) => { + const result = migration._comparator(v1, v2); return result < 0; - } + }, /** * @param {string} v1 * @param {string} v2 * @return {boolean} */ - static lte(v1, v2) { - const result = Migration._comparator(v1, v2); + lte: (v1, v2) => { + const result = migration._comparator(v1, v2); return result <= 0; - } + }, /** * @param {string} v1 * @param {string} v2 * @return {boolean} */ - static gt(v1, v2) { - const result = Migration._comparator(v1, v2); + gt: (v1, v2) => { + const result = migration._comparator(v1, v2); return result > 0; - } + }, /** * @param {string} v1 * @param {string} v2 * @return {boolean} */ - static gte(v1, v2) { - const result = Migration._comparator(v1, v2); + gte: (v1, v2) => { + const result = migration._comparator(v1, v2); return result >= 0; - } + }, /** * @param {string} lastVersion * @return {Function} */ - static getCurrentVersionFilter(lastVersion) { + getCurrentVersionFilter: (lastVersion) => { return function (version) { return ( - Migration.gt(version, lastVersion) && - Migration.lte(version, WavesApp.version) + migration.gt(version, lastVersion) && + migration.lte(version, WavesApp.version) ); }; - } + }, /** * @param {string} v1 @@ -75,7 +75,7 @@ * @return {number} * @private */ - static _comparator(v1, v2) { + _comparator: (v1, v2) => { const v1Beta = v1.includes('beta'); const v2Beta = v2.includes('beta'); @@ -86,8 +86,8 @@ return 1; } - v1 = Migration._parse(v1); - v2 = Migration._parse(v2); + v1 = migration._parse(v1); + v2 = migration._parse(v2); for (let i = 0; i < v1.length; i++) { const part1 = v1[i]; @@ -102,15 +102,15 @@ } return 0; - } + }, - static _parse(version) { + _parse: (version) => { return version.replace(/[^0-9.]/g, '').split('.').map(Number); } - } + }; - return new Migration(); + return migration; }; angular.module('app.utils').factory('migration', factory); diff --git a/src/modules/utils/services/whatsNew.js b/src/modules/utils/services/whatsNew.js index 13287f5c84..c05d72dc4c 100644 --- a/src/modules/utils/services/whatsNew.js +++ b/src/modules/utils/services/whatsNew.js @@ -7,7 +7,7 @@ * @param {User} user * @param {Migration} migration */ - const factory = function (notification, user, migration) { + const factory = function (notification, user, migration, utils) { const MIGRATION_LIST = [ '1.0.0', @@ -38,16 +38,16 @@ '1.2.0' ]; - // /** - // * @param {string|Array} version - // */ - // function addVersions(version) { - // const versions = user.getSetting('whatsNewList').slice(); - // utils.toArray(version).forEach((version) => { - // versions.push(version); - // }); - // user.setSetting('whatsNewList', versions); - // } + /** + * @param {string|Array} version + */ + function addVersions(version) { + const versions = user.getSetting('whatsNewList').slice(); + utils.toArray(version).forEach((version) => { + versions.push(version); + }); + user.setSetting('whatsNewList', versions); + } function removeVersion(version) { const versions = user.getSetting('whatsNewList').slice(); @@ -67,9 +67,17 @@ } user.onLogin().then(() => { - const notShownUpdates = user.getSetting('whatsNewList'); + const notShownUpdates = user.getSetting('whatsNewList') + .filter(version => { + if (migration.gt(version, WavesApp.version)) { + removeVersion(version); + return false; + } + return true; + }); const lastOpenVersion = user.getSetting('lastOpenVersion'); const newVersionList = migration.migrateFrom(lastOpenVersion || WavesApp.version, MIGRATION_LIST); + migration.sort(unique(newVersionList, notShownUpdates)).forEach((version) => { notification.info({ ns: 'app.utils', @@ -85,16 +93,15 @@ } }, -1); }); - // addVersions(newVersionList); + addVersions(newVersionList); user.setSetting('lastOpenVersion', WavesApp.version); - user.setSetting('whatsNewList', newVersionList); }); return Object.create(null); }; - factory.$inject = ['notification', 'user', 'migration']; + factory.$inject = ['notification', 'user', 'migration', 'utils']; angular.module('app.utils').factory('whatsNew', factory); })(); From f6a206bed8a5c18d6cc2d8f27b7b2bf93b338523 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Tue, 9 Apr 2019 17:17:08 +0300 Subject: [PATCH 016/150] CLIENT-1800: fix --- .../directives/assetInfoHead/AssetInfoHead.js | 19 +++------- .../setAssetScriptFrom.html | 2 +- .../setAssetScript/SetAssetScriptModalCtrl.js | 35 ++----------------- .../modals/setAssetScript/setAssetScript.html | 4 +-- 4 files changed, 10 insertions(+), 50 deletions(-) diff --git a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js index 1d49f47859..9aff06f59b 100644 --- a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js +++ b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js @@ -47,6 +47,10 @@ */ assetName; + constructor() { + super($scope); + } + $postLink() { waves.node.assets.getAsset(this.assetId).then(asset => { this.assetName = asset.displayName; @@ -61,21 +65,6 @@ this.state = { assetId: this.assetId }; } - - /** - * @param {Signable} signable - */ - onFillTxForm(signable) { - this.signable = signable; - const { assetId, script } = this.signable.getTxData(); - this.state = { assetId, script }; - this.step++; - } - - onConfirmBack() { - this.step--; - } - } return new AssetInfoHead(); diff --git a/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html b/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html index bf5cbc384f..715f3d9053 100644 --- a/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html +++ b/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html @@ -1,6 +1,6 @@ - +
diff --git a/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js b/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js index 6ed8b178b9..8d8e47801e 100644 --- a/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js +++ b/src/modules/utils/modals/setAssetScript/SetAssetScriptModalCtrl.js @@ -1,11 +1,7 @@ (function () { 'use strict'; - const controller = function (Base, $scope, user, waves) { - - const ds = require('data-service'); - const { path } = require('ramda'); - const { STATUS_LIST } = require('@waves/oracle-data'); + const controller = function (Base, $scope) { class SetAssetScriptModalCtrl extends Base { @@ -22,35 +18,10 @@ * @type {number} */ step = 0; - /** - * @type {boolean} - */ - isVerified; - /** - * @type {boolean} - */ - isGateway; - /** - * @type {boolean} - */ - isSuspicious; - /** - * @type {string} - */ - assetName; + constructor(assetId) { super($scope); - waves.node.assets.getAsset(assetId).then(asset => { - this.assetName = asset.displayName; - this.ticker = asset.ticker; - $scope.$apply(); - }); - const data = ds.dataManager.getOracleAssetData(assetId); - this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; - this.isGateway = path(['status'], data) === 3; - this.isSuspicious = user.scam[assetId]; - this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; this.state = { assetId }; } @@ -74,7 +45,7 @@ return new SetAssetScriptModalCtrl(this.locals); }; - controller.$inject = ['Base', '$scope', 'user', 'waves']; + controller.$inject = ['Base', '$scope']; angular.module('app.utils').controller('SetAssetScriptModalCtrl', controller); })(); diff --git a/src/modules/utils/modals/setAssetScript/setAssetScript.html b/src/modules/utils/modals/setAssetScript/setAssetScript.html index 0a9cf0a4e4..0e345a9743 100644 --- a/src/modules/utils/modals/setAssetScript/setAssetScript.html +++ b/src/modules/utils/modals/setAssetScript/setAssetScript.html @@ -11,8 +11,8 @@ - -
+ +
From 314cc4dfb700e0575715b48e34a87da62325e4cb Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Tue, 9 Apr 2019 17:19:06 +0300 Subject: [PATCH 017/150] CLIENT-1800: fix --- src/modules/ui/directives/assetInfoHead/AssetInfoHead.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js index 9aff06f59b..5609f47743 100644 --- a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js +++ b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js @@ -65,6 +65,7 @@ this.state = { assetId: this.assetId }; } + } return new AssetInfoHead(); From a2562534d8be28f261ffe47d6ef8408cdf3d5c1b Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Tue, 9 Apr 2019 18:53:10 +0300 Subject: [PATCH 018/150] CLIENT-1809: change data transaction --- .../transactionInfo/transactionInfo.less | 30 +++++++++++++++++++ .../transactionInfo/types/data/data-info.html | 17 +++++++++-- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index 5446549314..886fae7e13 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -192,6 +192,17 @@ w-transaction-info-header + w-transaction-info-general { &-border-ts { border-top: 1px solid @color-basic-100; } + + &-data { + .txinfo__row { + &:first-child { + border-top: 0; + } + &:last-child { + border-bottom: 1px solid @color-basic-100; + } + } + } } @@ -359,6 +370,25 @@ w-transaction-info-header + w-transaction-info-general { .status-label { margin-top: -4px; } + + &__item { + display: flex; + flex: 1 1 0; + overflow: hidden; + + span { + text-overflow: ellipsis; + overflow: hidden; + } + + .txinfo__key { + padding-right: 0; + } + + &:last-child { + justify-content: flex-end; + } + } } @media screen and (max-width: 540px) { diff --git a/src/modules/ui/directives/transactionInfo/types/data/data-info.html b/src/modules/ui/directives/transactionInfo/types/data/data-info.html index dd77e94b70..2b4475b142 100644 --- a/src/modules/ui/directives/transactionInfo/types/data/data-info.html +++ b/src/modules/ui/directives/transactionInfo/types/data/data-info.html @@ -1,9 +1,20 @@ -
-
-
{{::$ctrl.transaction.stringifiedData}}
+
+
+
Key
+
Type
+
Value
+
+
+
{{transaction.key}}
+
{{transaction.type}}
+
{{transaction.value}}
+
+ + + From 0d62ddb1012547c805c792a1b26438fb30eeb819 Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Wed, 10 Apr 2019 14:49:15 +0300 Subject: [PATCH 019/150] CLIENT-1809: change data transaction --- .../transactionInfo/transactionInfo.less | 14 +++++++++----- .../transactionInfo/types/data/data-info.html | 18 ++++++++++-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index 886fae7e13..122960ca9f 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -64,6 +64,13 @@ w-transaction-info-header + w-transaction-info-general { padding-top: 30px; border-top: 1px solid @color-basic-100; } + + &-scrolled { + max-height: 248px; + overflow: auto; + margin-right: -13px; + padding-right: 13px; + } } &__lead { @@ -101,7 +108,7 @@ w-transaction-info-header + w-transaction-info-general { padding: 13px 0; border-top: 1px dashed @color-basic-100; - &:first-child { + &:first-child:not(.txinfo__row-header) { border-top: 1px solid @color-basic-100; } @@ -195,11 +202,8 @@ w-transaction-info-header + w-transaction-info-general { &-data { .txinfo__row { - &:first-child { - border-top: 0; - } &:last-child { - border-bottom: 1px solid @color-basic-100; + border-bottom: 1px dashed @color-basic-100; } } } diff --git a/src/modules/ui/directives/transactionInfo/types/data/data-info.html b/src/modules/ui/directives/transactionInfo/types/data/data-info.html index 2b4475b142..3b646b7ca5 100644 --- a/src/modules/ui/directives/transactionInfo/types/data/data-info.html +++ b/src/modules/ui/directives/transactionInfo/types/data/data-info.html @@ -1,13 +1,15 @@
-
-
Key
-
Type
-
Value
+
+
+
+
-
-
{{transaction.key}}
-
{{transaction.type}}
-
{{transaction.value}}
+
+
+
{{transaction.key}}
+
{{transaction.type}}
+
{{transaction.value}}
+
From de0713ef287d8d12791ef06e9c77382229b2f858 Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Wed, 10 Apr 2019 16:34:59 +0300 Subject: [PATCH 020/150] CLIENT-1809: change fix change data transaction --- .../ui/directives/transactionInfo/transactionInfo.less | 5 +---- .../ui/directives/transactionInfo/types/data/data-info.html | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index 122960ca9f..b9ace387c2 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -380,12 +380,9 @@ w-transaction-info-header + w-transaction-info-general { flex: 1 1 0; overflow: hidden; - span { + .txinfo__unit { text-overflow: ellipsis; overflow: hidden; - } - - .txinfo__key { padding-right: 0; } diff --git a/src/modules/ui/directives/transactionInfo/types/data/data-info.html b/src/modules/ui/directives/transactionInfo/types/data/data-info.html index 3b646b7ca5..efd807474b 100644 --- a/src/modules/ui/directives/transactionInfo/types/data/data-info.html +++ b/src/modules/ui/directives/transactionInfo/types/data/data-info.html @@ -6,9 +6,9 @@
-
{{transaction.key}}
-
{{transaction.type}}
-
{{transaction.value}}
+
{{transaction.key}}
+
{{transaction.type}}
+
{{transaction.value}}
From 75e715ac559e7407bdb3c9e9f74e6211d6034518 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Wed, 10 Apr 2019 20:30:09 +0300 Subject: [PATCH 021/150] CLIENT-1800: fix binding --- .../directives/assetInfoHead/AssetInfoHead.js | 28 +++++++++++-------- .../assetInfoHead/asset-info-head.html | 4 +-- .../setAssetScriptFrom.html | 2 +- .../utils/modals/assetInfo/assetInfo.html | 2 +- .../changeToken/change-token-modal.html | 2 +- .../modals/setAssetScript/setAssetScript.html | 2 +- .../utils/modals/sponsored/sponsored.html | 2 +- 7 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js index 5609f47743..fd2b287ad9 100644 --- a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js +++ b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js @@ -52,18 +52,22 @@ } $postLink() { - waves.node.assets.getAsset(this.assetId).then(asset => { - this.assetName = asset.displayName; - this.ticker = asset.ticker; - $scope.$apply(); - }); - const data = ds.dataManager.getOracleAssetData(this.assetId); - this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; - this.isGateway = path(['status'], data) === GATEWAY; - this.isSuspicious = user.scam[this.assetId]; - this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; + const getAssetInfo = () => { + waves.node.assets.getAsset(this.assetId).then(asset => { + this.assetName = asset.displayName; + this.ticker = asset.ticker; + $scope.$apply(); + }); + const data = ds.dataManager.getOracleAssetData(this.assetId); + this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; + this.isGateway = path(['status'], data) === GATEWAY; + this.isSuspicious = user.scam[this.assetId]; + this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; - this.state = { assetId: this.assetId }; + this.state = { assetId: this.assetId }; + }; + getAssetInfo(); + this.observe(this.assetId, getAssetInfo); } } @@ -78,7 +82,7 @@ controller: controller, templateUrl: 'modules/ui/directives/assetInfoHead/asset-info-head.html', bindings: { - assetId: '@' + assetId: '<' } }); })(); diff --git a/src/modules/ui/directives/assetInfoHead/asset-info-head.html b/src/modules/ui/directives/assetInfoHead/asset-info-head.html index fcad9a7bdf..74f6b78097 100644 --- a/src/modules/ui/directives/assetInfoHead/asset-info-head.html +++ b/src/modules/ui/directives/assetInfoHead/asset-info-head.html @@ -1,6 +1,6 @@
- @@ -16,7 +16,7 @@

- +

diff --git a/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html b/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html index 715f3d9053..bad96a478a 100644 --- a/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html +++ b/src/modules/ui/directives/setAssetScriptForm/setAssetScriptFrom.html @@ -1,6 +1,6 @@ - +
diff --git a/src/modules/utils/modals/assetInfo/assetInfo.html b/src/modules/utils/modals/assetInfo/assetInfo.html index 704eb17767..4fe1b40481 100644 --- a/src/modules/utils/modals/assetInfo/assetInfo.html +++ b/src/modules/utils/modals/assetInfo/assetInfo.html @@ -1,5 +1,5 @@
- +
- +
diff --git a/src/modules/utils/modals/setAssetScript/setAssetScript.html b/src/modules/utils/modals/setAssetScript/setAssetScript.html index 0e345a9743..f00a912a5c 100644 --- a/src/modules/utils/modals/setAssetScript/setAssetScript.html +++ b/src/modules/utils/modals/setAssetScript/setAssetScript.html @@ -11,7 +11,7 @@ - +
diff --git a/src/modules/utils/modals/sponsored/sponsored.html b/src/modules/utils/modals/sponsored/sponsored.html index 028dd36a96..a841672aa7 100644 --- a/src/modules/utils/modals/sponsored/sponsored.html +++ b/src/modules/utils/modals/sponsored/sponsored.html @@ -1,7 +1,7 @@
- +
From 5862e050ffb657781a484c482a86bcbf71517910 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Thu, 11 Apr 2019 11:30:31 +0300 Subject: [PATCH 022/150] CLIENT-1800: fix --- .../directives/assetInfoHead/AssetInfoHead.js | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js index fd2b287ad9..f9aa0e3b2a 100644 --- a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js +++ b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js @@ -47,27 +47,27 @@ */ assetName; - constructor() { - super($scope); + $postLink() { + this._getAssetInfo(); + this.observe('assetId', this._getAssetInfo); } - $postLink() { - const getAssetInfo = () => { - waves.node.assets.getAsset(this.assetId).then(asset => { - this.assetName = asset.displayName; - this.ticker = asset.ticker; - $scope.$apply(); - }); - const data = ds.dataManager.getOracleAssetData(this.assetId); - this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; - this.isGateway = path(['status'], data) === GATEWAY; - this.isSuspicious = user.scam[this.assetId]; - this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; + /* + ** private + */ + _getAssetInfo() { + waves.node.assets.getAsset(this.assetId).then(asset => { + this.assetName = asset.displayName; + this.ticker = asset.ticker; + $scope.$apply(); + }); + const data = ds.dataManager.getOracleAssetData(this.assetId); + this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; + this.isGateway = path(['status'], data) === GATEWAY; + this.isSuspicious = user.scam[this.assetId]; + this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; - this.state = { assetId: this.assetId }; - }; - getAssetInfo(); - this.observe(this.assetId, getAssetInfo); + this.state = { assetId: this.assetId }; } } From 036bf21761045f36af3c6d917e28b15d942262d8 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Thu, 11 Apr 2019 11:54:44 +0300 Subject: [PATCH 023/150] CLIENT-1800: fix jsdoc --- src/modules/ui/directives/assetInfoHead/AssetInfoHead.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js index f9aa0e3b2a..957f19e3ca 100644 --- a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js +++ b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js @@ -52,8 +52,8 @@ this.observe('assetId', this._getAssetInfo); } - /* - ** private + /** + * @private */ _getAssetInfo() { waves.node.assets.getAsset(this.assetId).then(asset => { From 80c6db7e76ac984d44f761c4527bb2fa4a8a8847 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Fri, 12 Apr 2019 16:34:33 +0300 Subject: [PATCH 024/150] CLIENT-1432: add export 10k transaction --- data-service/api/transactions/transactions.ts | 14 +++++----- .../waves/node/content/Transactions.js | 5 ++-- .../controllers/TransactionsCtrl.js | 26 ++++++++++++++++--- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/data-service/api/transactions/transactions.ts b/data-service/api/transactions/transactions.ts index 234053834e..f2e047869f 100644 --- a/data-service/api/transactions/transactions.ts +++ b/data-service/api/transactions/transactions.ts @@ -22,13 +22,13 @@ import { pipe, prop, uniqBy, tap } from 'ramda'; import { ExchangeTxFilters } from '@waves/data-service-client-js'; -export function list(address: string, limit = 100): Promise> { - return request({ url: `${configGet('node')}/transactions/address/${address}/limit/${limit}` }) - .then(pipe( - prop('0'), - uniqBy(prop('id')) as any, - )) - .then(transactions => parseTx(transactions as any, false)); +export function list(address: string, limit = 100, after: string): Promise> { + return request({ + url: `${configGet('node')}/transactions/address/${address}/limit/${limit}${after ? `?after=${after}` : ''}` + }).then(pipe( + prop('0'), + uniqBy(prop('id')) as any, + )).then(transactions => parseTx(transactions as any, false)); } export function getExchangeTxList(options: ExchangeTxFilters = Object.create(null)): Promise> { diff --git a/src/modules/app/services/waves/node/content/Transactions.js b/src/modules/app/services/waves/node/content/Transactions.js index 4275001600..243a1dec28 100644 --- a/src/modules/app/services/waves/node/content/Transactions.js +++ b/src/modules/app/services/waves/node/content/Transactions.js @@ -61,11 +61,12 @@ /** * Get transactions list by user * @param {number} [limit] + * @param {string} [after] * @return {Promise} */ @decorators.cachable(1) - list(limit = 1000) { - return ds.api.transactions.list(user.address, limit) + list(limit = 1000, after) { + return ds.api.transactions.list(user.address, limit, after) .then(list => list.map(this._pipeTransaction())); } diff --git a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js index cce05e387a..3b83de8193 100644 --- a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js +++ b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js @@ -9,7 +9,7 @@ * @param {IPollCreate} createPoll * @return {TransactionsCtrl} */ - const controller = function (Base, $scope, transactionsCsvGen, waves, createPoll) { + const controller = function (user, Base, $scope, transactionsCsvGen, waves, createPoll) { const analytics = require('@waves/event-sender'); @@ -52,7 +52,27 @@ exportTransactions() { // analytics.push('TransactionsPage', `TransactionsPage.CSV.${WavesApp.type}`, 'download'); analytics.send({ name: 'Transactions Export Click', target: 'ui' }); - transactionsCsvGen.generate(this.transactions); + const scamListProm = ds.fetch(`${user.getSetting('scamListUrl')}?${WavesApp.version}-${Date.now()}`); + const MAX_LIMIT = 1000; + const allTransactions = []; + + /** + * @returns {void} + */ + const getSeries = async (after = '') => { + const transactions = await waves.node.transactions.list(MAX_LIMIT, after); + allTransactions.push(...transactions); + + if (transactions.length < MAX_LIMIT || allTransactions.length > 10000) { + const scamList = (await scamListProm).split('\n'); + transactionsCsvGen.generate(allTransactions.filter(el => !scamList.includes(el.assetId))); + } else { + getSeries(transactions[transactions.length - 1].id); + } + + }; + + getSeries(); } _getTxList() { @@ -124,7 +144,7 @@ return new TransactionsCtrl(); }; - controller.$inject = ['Base', '$scope', 'transactionsCsvGen', 'waves', 'createPoll']; + controller.$inject = ['user', 'Base', '$scope', 'transactionsCsvGen', 'waves', 'createPoll']; angular.module('app.wallet.transactions').controller('TransactionsCtrl', controller); })(); From 8f66155b3a15449e041879353136aa8e023cd268 Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Fri, 12 Apr 2019 17:59:25 +0300 Subject: [PATCH 025/150] CLIENT-1661: change set asset script --- .../utils/modals/setAssetScript/setAssetScript.html | 6 +++--- .../utils/modals/setAssetScript/setAssetScript.less | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/modules/utils/modals/setAssetScript/setAssetScript.html b/src/modules/utils/modals/setAssetScript/setAssetScript.html index d34743e8da..b989c2fe05 100644 --- a/src/modules/utils/modals/setAssetScript/setAssetScript.html +++ b/src/modules/utils/modals/setAssetScript/setAssetScript.html @@ -19,7 +19,7 @@ class="asset-modal__logo">
-

+

{{$ctrl.assetName}} @@ -27,7 +27,7 @@

-

+

{{$ctrl.ticker}}
@@ -40,7 +40,7 @@

-
+
diff --git a/src/modules/utils/modals/setAssetScript/setAssetScript.less b/src/modules/utils/modals/setAssetScript/setAssetScript.less index c40d0830d2..d0f1d6b894 100644 --- a/src/modules/utils/modals/setAssetScript/setAssetScript.less +++ b/src/modules/utils/modals/setAssetScript/setAssetScript.less @@ -101,3 +101,16 @@ } } } + +.warning { + &-plate { + text-align: center; + } + + &-text { + display: inline-block; + padding: 13px 12px; + border-radius: @border-radius; + border: 1px dashed @color-warning-400; + } +} From fe5e41964c400e7480b60e57fa254d03571097d6 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Mon, 15 Apr 2019 15:38:58 +0300 Subject: [PATCH 026/150] CLIENT-1432: add Blob --- .../controllers/TransactionsCtrl.js | 20 ++++++++++++------- .../services/TransactionsCsvGen.js | 5 +++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js index 3b83de8193..9f71f55ec9 100644 --- a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js +++ b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js @@ -2,6 +2,7 @@ 'use strict'; /** + * @param {User} user * @param Base * @param {$rootScope.Scope} $scope * @param {TransactionsCsvGen} transactionsCsvGen @@ -52,7 +53,8 @@ exportTransactions() { // analytics.push('TransactionsPage', `TransactionsPage.CSV.${WavesApp.type}`, 'download'); analytics.send({ name: 'Transactions Export Click', target: 'ui' }); - const scamListProm = ds.fetch(`${user.getSetting('scamListUrl')}?${WavesApp.version}-${Date.now()}`); + + const scamList = Object.keys(user.scam); const MAX_LIMIT = 1000; const allTransactions = []; @@ -60,12 +62,16 @@ * @returns {void} */ const getSeries = async (after = '') => { - const transactions = await waves.node.transactions.list(MAX_LIMIT, after); - allTransactions.push(...transactions); - - if (transactions.length < MAX_LIMIT || allTransactions.length > 10000) { - const scamList = (await scamListProm).split('\n'); - transactionsCsvGen.generate(allTransactions.filter(el => !scamList.includes(el.assetId))); + let loadFailed = false; + const transactions = await waves.node.transactions.list(MAX_LIMIT, after) + .catch(() => { + loadFailed = true; + return []; + }); + allTransactions.push(...transactions.filter(el => !scamList.includes(el.assetId))); + + if (transactions.length < MAX_LIMIT || allTransactions.length > 10000 || loadFailed) { + transactionsCsvGen.generate(allTransactions); } else { getSeries(transactions[transactions.length - 1].id); } diff --git a/src/modules/wallet/modules/transactions/services/TransactionsCsvGen.js b/src/modules/wallet/modules/transactions/services/TransactionsCsvGen.js index 3890e20f9e..68a93c3602 100644 --- a/src/modules/wallet/modules/transactions/services/TransactionsCsvGen.js +++ b/src/modules/wallet/modules/transactions/services/TransactionsCsvGen.js @@ -113,9 +113,10 @@ if (window.navigator && typeof window.navigator.msSaveOrOpenBlob === 'function') { this._downloadInMsEdge(csv, name); } else { - const content = encodeURI(`data:text/csv;charset=utf-8,${csv}`); + const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' }); + const url = URL.createObjectURL(blob); const link = document.createElement('a'); - link.setAttribute('href', content); + link.setAttribute('href', url); link.setAttribute('download', name); link.setAttribute('target', '_blank'); link.style.position = 'absolute'; From bf955ae16e20e763534960887bc4f2908676d001 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Mon, 15 Apr 2019 16:53:01 +0300 Subject: [PATCH 027/150] CLIENT-1432: fix filter scam --- .../controllers/TransactionsCtrl.js | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js index 9f71f55ec9..8f2d2df0b9 100644 --- a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js +++ b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js @@ -54,7 +54,6 @@ // analytics.push('TransactionsPage', `TransactionsPage.CSV.${WavesApp.type}`, 'download'); analytics.send({ name: 'Transactions Export Click', target: 'ui' }); - const scamList = Object.keys(user.scam); const MAX_LIMIT = 1000; const allTransactions = []; @@ -62,18 +61,19 @@ * @returns {void} */ const getSeries = async (after = '') => { - let loadFailed = false; - const transactions = await waves.node.transactions.list(MAX_LIMIT, after) - .catch(() => { - loadFailed = true; - return []; - }); - allTransactions.push(...transactions.filter(el => !scamList.includes(el.assetId))); - - if (transactions.length < MAX_LIMIT || allTransactions.length > 10000 || loadFailed) { + let transactions; + try { + transactions = await waves.node.transactions.list(MAX_LIMIT, after); + } catch (e) { + transactions = []; + } + + allTransactions.push(...transactions.filter(el => !user.scam[el.assetId])); + + if (transactions.length < MAX_LIMIT || allTransactions.length > 1000) { transactionsCsvGen.generate(allTransactions); } else { - getSeries(transactions[transactions.length - 1].id); + getSeries(transactions[transactions.length - 900].id); } }; From 5613e6cff832550884ace9f12960230d6265245c Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Mon, 15 Apr 2019 16:54:21 +0300 Subject: [PATCH 028/150] CLIENT-1432: getSeries fix --- .../wallet/modules/transactions/controllers/TransactionsCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js index 8f2d2df0b9..268faa9dd4 100644 --- a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js +++ b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js @@ -73,7 +73,7 @@ if (transactions.length < MAX_LIMIT || allTransactions.length > 1000) { transactionsCsvGen.generate(allTransactions); } else { - getSeries(transactions[transactions.length - 900].id); + getSeries(transactions[transactions.length - 1].id); } }; From 87b3aabd4cf2cb9917822da2bf0bad4a00805da3 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Mon, 15 Apr 2019 18:40:05 +0300 Subject: [PATCH 029/150] CLIENT-1432: fix promise --- .../controllers/TransactionsCtrl.js | 25 +++++++++---------- .../transactions/templates/transactions.html | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js index 268faa9dd4..10990d9e23 100644 --- a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js +++ b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js @@ -50,17 +50,13 @@ this.observe('limit', () => poll.restart()); } - exportTransactions() { + exportTransactions(maxTransactions = 10000) { // analytics.push('TransactionsPage', `TransactionsPage.CSV.${WavesApp.type}`, 'download'); analytics.send({ name: 'Transactions Export Click', target: 'ui' }); - const MAX_LIMIT = 1000; - const allTransactions = []; - /** - * @returns {void} - */ - const getSeries = async (after = '') => { + const getSeriesTransactions = async (allTransactions = [], after = '') => { + let transactions; try { transactions = await waves.node.transactions.list(MAX_LIMIT, after); @@ -68,17 +64,20 @@ transactions = []; } - allTransactions.push(...transactions.filter(el => !user.scam[el.assetId])); + allTransactions = allTransactions.concat(transactions.filter(el => !user.scam[el.assetId])); - if (transactions.length < MAX_LIMIT || allTransactions.length > 1000) { - transactionsCsvGen.generate(allTransactions); + if (transactions.length < MAX_LIMIT || allTransactions.length > maxTransactions) { + return allTransactions; } else { - getSeries(transactions[transactions.length - 1].id); + return getSeriesTransactions(allTransactions, transactions[transactions.length - 1].id); } - }; - getSeries(); + const promiseGetTransactions = getSeriesTransactions(); + promiseGetTransactions.then((allTransactions) => { + transactionsCsvGen.generate(allTransactions); + }); + return promiseGetTransactions; } _getTxList() { diff --git a/src/modules/wallet/modules/transactions/templates/transactions.html b/src/modules/wallet/modules/transactions/templates/transactions.html index de73b4e3b0..758593a74d 100644 --- a/src/modules/wallet/modules/transactions/templates/transactions.html +++ b/src/modules/wallet/modules/transactions/templates/transactions.html @@ -55,7 +55,7 @@ - + From 68214371f4438de370b91ee41027851331a1107a Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Mon, 15 Apr 2019 18:45:32 +0300 Subject: [PATCH 030/150] CLIENT-1432: fix arguments --- .../modules/transactions/controllers/TransactionsCtrl.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js index 10990d9e23..741bed8134 100644 --- a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js +++ b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js @@ -55,7 +55,7 @@ analytics.send({ name: 'Transactions Export Click', target: 'ui' }); const MAX_LIMIT = 1000; - const getSeriesTransactions = async (allTransactions = [], after = '') => { + const getSeriesTransactions = async ({ allTransactions = [], after = '' }) => { let transactions; try { @@ -69,7 +69,10 @@ if (transactions.length < MAX_LIMIT || allTransactions.length > maxTransactions) { return allTransactions; } else { - return getSeriesTransactions(allTransactions, transactions[transactions.length - 1].id); + return getSeriesTransactions({ + allTransactions, + after: transactions[transactions.length - 1].id + }); } }; From 58c0a7205f55c32501af177b59577675fd56e941 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Mon, 15 Apr 2019 19:03:42 +0300 Subject: [PATCH 031/150] CLIENT-1432: fix defalt value --- .../wallet/modules/transactions/controllers/TransactionsCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js index 741bed8134..f3c6f751b8 100644 --- a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js +++ b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js @@ -55,7 +55,7 @@ analytics.send({ name: 'Transactions Export Click', target: 'ui' }); const MAX_LIMIT = 1000; - const getSeriesTransactions = async ({ allTransactions = [], after = '' }) => { + const getSeriesTransactions = async ({ allTransactions = [], after = '' } = {}) => { let transactions; try { From 045243f684272ca746366bd5fe8ee775cd0a14e0 Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Tue, 16 Apr 2019 13:34:22 +0300 Subject: [PATCH 032/150] CLIENT-1809: change data transaction --- .../directives/transactionInfo/transactionInfo.less | 11 +++++++++++ .../directives/transactionInfo/types/data/DataInfo.js | 8 ++++++++ .../transactionInfo/types/data/data-info.html | 6 +++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index b9ace387c2..6ee8dee97c 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -390,6 +390,17 @@ w-transaction-info-header + w-transaction-info-general { justify-content: flex-end; } } + + &__show { + &-fields { + margin-bottom: -1px; + padding-bottom: 10px; + } + + &-text { + cursor: pointer; + } + } } @media screen and (max-width: 540px) { diff --git a/src/modules/ui/directives/transactionInfo/types/data/DataInfo.js b/src/modules/ui/directives/transactionInfo/types/data/DataInfo.js index 7c543ce060..dd424a086e 100644 --- a/src/modules/ui/directives/transactionInfo/types/data/DataInfo.js +++ b/src/modules/ui/directives/transactionInfo/types/data/DataInfo.js @@ -13,6 +13,10 @@ * @type {Signable} */ signable; + /** + * @type {boolean} + */ + isShowAllFields = false; $postLink() { @@ -24,6 +28,10 @@ }); } + getShownFields() { + return this.isShowAllFields ? this.transaction.data : this.transaction.data.slice(0, 3); + } + } return new DataInfo(); diff --git a/src/modules/ui/directives/transactionInfo/types/data/data-info.html b/src/modules/ui/directives/transactionInfo/types/data/data-info.html index efd807474b..a9f6a8c08b 100644 --- a/src/modules/ui/directives/transactionInfo/types/data/data-info.html +++ b/src/modules/ui/directives/transactionInfo/types/data/data-info.html @@ -5,12 +5,16 @@
-
+
{{transaction.key}}
{{transaction.type}}
{{transaction.value}}
+
+ + +
Date: Tue, 16 Apr 2019 14:45:33 +0300 Subject: [PATCH 033/150] CLIENT-1809: change data transaction --- .../ui/directives/transactionInfo/types/data/data-info.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ui/directives/transactionInfo/types/data/data-info.html b/src/modules/ui/directives/transactionInfo/types/data/data-info.html index a9f6a8c08b..2f7548139f 100644 --- a/src/modules/ui/directives/transactionInfo/types/data/data-info.html +++ b/src/modules/ui/directives/transactionInfo/types/data/data-info.html @@ -13,7 +13,7 @@
- +
From 43531e071afda958d7f5a643ea3b27d308cc346c Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Tue, 16 Apr 2019 18:55:58 +0300 Subject: [PATCH 034/150] CLIENT-1762: fix --- .../modals/sendAsset/components/singleSend/SingleSend.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/utils/modals/sendAsset/components/singleSend/SingleSend.js b/src/modules/utils/modals/sendAsset/components/singleSend/SingleSend.js index b8680828cf..afa1d235c6 100644 --- a/src/modules/utils/modals/sendAsset/components/singleSend/SingleSend.js +++ b/src/modules/utils/modals/sendAsset/components/singleSend/SingleSend.js @@ -280,16 +280,17 @@ this.receive(utils.observe(this.tx, 'attachment'), this._updateWavesTxObject, this); this.observe('mirror', this._onChangeAmountMirror); - - this._currentHasCommission(); - this._onChangeBaseAssets(); - this._updateGatewayDetails(); }; if (!this.state.moneyHash) { this.receiveOnce(utils.observe(this.state, 'moneyHash'), onHasMoneyHash); } else { onHasMoneyHash(); } + this.receive(utils.observe(this.state, 'moneyHash'), () => { + this._currentHasCommission(); + this._onChangeBaseAssets(); + this._updateGatewayDetails(); + }); } onSignCoinomatStart() { From 371ddd234b88de4352ac975eb5d939334df5093f Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Wed, 17 Apr 2019 12:59:50 +0300 Subject: [PATCH 035/150] CIENT-1831: change fix color border --- src/modules/ui/directives/input/input.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/ui/directives/input/input.less b/src/modules/ui/directives/input/input.less index 6eab58ca45..51eb978287 100644 --- a/src/modules/ui/directives/input/input.less +++ b/src/modules/ui/directives/input/input.less @@ -165,7 +165,7 @@ w-input { } &.ng-touched { - &.ng-valid:not(:focus):not(.focus) { + &.ng-valid:not(:focus):not(.focus):not(.ng-empty) { border-color: @color-success-300; } &.ng-invalid:not(:focus):not(.focus) { @@ -250,7 +250,7 @@ w-input { form.ng-submitted { input[type="text"], input[type="password"], input[type="number"], textarea { - &.ng-invalid:not(.embed):not(:focus):not(.focus):not(.no-validate) { + &.ng-touched.ng-invalid:not(.embed):not(:focus):not(.focus):not(.no-validate) { border-color: @color-error-200; } } From 673d37d71fa3f3d88a55664fa769b50e9f945691 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Wed, 17 Apr 2019 14:05:43 +0300 Subject: [PATCH 036/150] CLIENT-1563: add anim --- .../dex/directives/dexMyOrders/myOrders.html | 2 +- .../dex/directives/dexMyOrders/myOrders.less | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/modules/dex/directives/dexMyOrders/myOrders.html b/src/modules/dex/directives/dexMyOrders/myOrders.html index ca67f7298f..ae0e5bf3c6 100644 --- a/src/modules/dex/directives/dexMyOrders/myOrders.html +++ b/src/modules/dex/directives/dexMyOrders/myOrders.html @@ -19,7 +19,7 @@ -
+
diff --git a/src/modules/dex/directives/dexMyOrders/myOrders.less b/src/modules/dex/directives/dexMyOrders/myOrders.less index 80b7c7a52d..da9ff3a751 100644 --- a/src/modules/dex/directives/dexMyOrders/myOrders.less +++ b/src/modules/dex/directives/dexMyOrders/myOrders.less @@ -8,6 +8,26 @@ w-dex-my-orders { overflow: hidden; overflow-x: auto; + /* ngRepeat animation*/ + + .repeatItemTransition.ng-leave { + transition: ease-in-out 0.4s; + } + + + .repeatItemTransition.ng-enter, + .repeatItemTransition.ng-leave.ng-leave-active { + opacity: 0; + max-height: 0; + } + + .repeatItemTransition.ng-leave, + .repeatItemTransition.ng-enter.ng-enter-active { + opacity: 1; + max-height: 30px; + } + + //end .centered { position: absolute; width: 100%; @@ -258,6 +278,12 @@ w-dex-my-orders { .order-row { position: relative; + max-height: 69px; + + &.ng-leave.ng-leave-active { + opacity: 0; + max-height: 0; + } &:not(:first-child) { &::before { From 52b299521bf9a13944e346d43336d633d3e38f8b Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Wed, 17 Apr 2019 16:59:03 +0300 Subject: [PATCH 037/150] CLIENT-1563: add anim --- .../dex/directives/dexMyOrders/DexMyOrders.js | 6 +++--- .../dex/directives/dexMyOrders/myOrders.html | 2 +- .../dex/directives/dexMyOrders/myOrders.less | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/modules/dex/directives/dexMyOrders/DexMyOrders.js b/src/modules/dex/directives/dexMyOrders/DexMyOrders.js index 3ccab74218..c0ba344d95 100644 --- a/src/modules/dex/directives/dexMyOrders/DexMyOrders.js +++ b/src/modules/dex/directives/dexMyOrders/DexMyOrders.js @@ -217,8 +217,7 @@ /** * @param order */ - dropOrder(order) { - + dropOrder(order, element) { if (!permissionManager.isPermitted('CAN_CANCEL_ORDER')) { const $notify = $element.find('.js-order-notification'); DexMyOrders._animateNotification($notify); @@ -226,7 +225,8 @@ } const dataPromise = this.dropOrderGetSignData(order); - + const row = element.closest('.order-row'); + row.classList.add('pre-leave'); dataPromise .then((signedTxData) => ds.cancelOrder(signedTxData, order.amount.asset.id, order.price.asset.id)) .then(() => { diff --git a/src/modules/dex/directives/dexMyOrders/myOrders.html b/src/modules/dex/directives/dexMyOrders/myOrders.html index ae0e5bf3c6..4b8afddfcf 100644 --- a/src/modules/dex/directives/dexMyOrders/myOrders.html +++ b/src/modules/dex/directives/dexMyOrders/myOrders.html @@ -74,7 +74,7 @@
-
diff --git a/src/modules/dex/directives/dexMyOrders/myOrders.less b/src/modules/dex/directives/dexMyOrders/myOrders.less index da9ff3a751..d6ef152687 100644 --- a/src/modules/dex/directives/dexMyOrders/myOrders.less +++ b/src/modules/dex/directives/dexMyOrders/myOrders.less @@ -10,6 +10,7 @@ w-dex-my-orders { /* ngRepeat animation*/ + .repeatItemTransition.ng-enter, .repeatItemTransition.ng-leave { transition: ease-in-out 0.4s; } @@ -24,7 +25,20 @@ w-dex-my-orders { .repeatItemTransition.ng-leave, .repeatItemTransition.ng-enter.ng-enter-active { opacity: 1; + + &.pre-leave { + opacity: 0.3; + } + max-height: 30px; + + @media screen and (max-width: 1024px) { + max-height: 69px; + } + } + + .pre-leave { + opacity: 0.3; } //end From 990c267de284a7e3274b62c65b614cbd275282d4 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Wed, 17 Apr 2019 17:48:51 +0300 Subject: [PATCH 038/150] CLIENT-1829: init oracle for tokenomica, edit getOracleData for different oracles --- data-service/classes/DataManager.ts | 14 +++++++------- data-service/config.ts | 1 + src/index.hbs | 1 + src/modules/app/app.js | 1 + src/modules/app/initialize/AppConfig.js | 1 + .../utils/modals/assetInfo/AssetInfoCtrl.js | 4 +++- src/modules/utils/modals/assetInfo/assetInfo.html | 1 + ts-scripts/interface.d.ts | 1 + ts-scripts/meta.json | 1 + ts-scripts/utils.ts | 3 ++- 10 files changed, 19 insertions(+), 9 deletions(-) diff --git a/data-service/classes/DataManager.ts b/data-service/classes/DataManager.ts index f5e611b83b..adfc61aa68 100644 --- a/data-service/classes/DataManager.ts +++ b/data-service/classes/DataManager.ts @@ -60,11 +60,10 @@ export class DataManager { return this.pollControl.getPollHash().aliases.lastData || []; } - public getOracleAssetData(id: string): TProviderAsset & { provider: string } { + public getOracleAssetData(id: string, oracle: string): TProviderAsset & { provider: string } { let pollHash = this.pollControl.getPollHash(); - const lastData = path(['oracle', 'lastData'], pollHash); + const lastData = path([oracle, 'lastData'], pollHash); const assets = lastData && lastData.assets || Object.create(null); - const WavesApp = (window as any).WavesApp; const gateways = { @@ -135,10 +134,9 @@ export class DataManager { }; } - private _getPollOracleApi(): IPollAPI { + private _getPollOracleApi(address: string): IPollAPI { return { get: () => { - const address = get('oracleAddress'); return address ? getOracleData(address) : Promise.resolve({ assets: Object.create(null) }) as any; }, set: () => null @@ -149,7 +147,8 @@ export class DataManager { const balance = new Poll(this._getPollBalanceApi(), 1000); const orders = new Poll(this._getPollOrdersApi(), 1000); const aliases = new Poll(this._getPollAliasesApi(), 10000); - const oracle = new Poll(this._getPollOracleApi(), 30000); + const oracle = new Poll(this._getPollOracleApi(get('oracleAddress')), 30000); + const oracleTokenomica = new Poll(this._getPollOracleApi(get('oracleTokenomica')), 30000); change.on((key) => { if (key === 'oracleAddress') { @@ -157,7 +156,7 @@ export class DataManager { } }); - return { balance, orders, aliases, oracle }; + return { balance, orders, aliases, oracle, oracleTokenomica }; } } @@ -167,6 +166,7 @@ type TPollHash = { orders: Poll>; aliases: Poll>; oracle: Poll + oracleTokenomica: Poll } export interface IOracleAsset { diff --git a/data-service/config.ts b/data-service/config.ts index e0412abfde..9398f59fbe 100644 --- a/data-service/config.ts +++ b/data-service/config.ts @@ -70,4 +70,5 @@ export interface IConfigParams { minimalSeedLength: number; remappedAssetNames: IHash; oracleAddress: string; + oracleTokenomica: string; } diff --git a/src/index.hbs b/src/index.hbs index 53e3706c3d..00970dea66 100644 --- a/src/index.hbs +++ b/src/index.hbs @@ -367,6 +367,7 @@ }, modules: [], oracle: config.oracle, + oracleTokenomica: config.oracleTokenomica, minAliasLength: 4, maxAliasLength: 30, maxAddressLength: 45, diff --git a/src/modules/app/app.js b/src/modules/app/app.js index e256f9c831..24b86522f2 100644 --- a/src/modules/app/app.js +++ b/src/modules/app/app.js @@ -137,6 +137,7 @@ * @typedef {object} IWavesApp * @property {string} name * @property {string} oracle + * @property {string} oracleTokenomica * @property {string} version * @property {string} type * @property {string} origin diff --git a/src/modules/app/initialize/AppConfig.js b/src/modules/app/initialize/AppConfig.js index ce2249d42d..5253bee9c0 100644 --- a/src/modules/app/initialize/AppConfig.js +++ b/src/modules/app/initialize/AppConfig.js @@ -7,6 +7,7 @@ ds.config.setConfig(WavesApp.network); ds.config.set('remappedAssetNames', WavesApp.remappedAssetNames); + ds.config.set('oracleTokenomica', WavesApp.oracleTokenomica); class AppConfig { diff --git a/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js b/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js index 33f1214e2e..fe2585335b 100644 --- a/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js +++ b/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js @@ -36,9 +36,11 @@ this.totalBalance = null; this.transactions = []; this.transactionsPending = true; - const data = ds.dataManager.getOracleAssetData(asset.id); + const data = ds.dataManager.getOracleAssetData(asset.id, 'oracle'); + const tokenomikaData = ds.dataManager.getOracleAssetData(asset.id, 'oracleTokenomica'); this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; this.isGateway = path(['status'], data) === 3; + this.isTokenomica = path(['status'], tokenomikaData) === STATUS_LIST.VERIFIED; this.isSuspicious = user.scam[this.asset.id]; this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; diff --git a/src/modules/utils/modals/assetInfo/assetInfo.html b/src/modules/utils/modals/assetInfo/assetInfo.html index 5627977cd6..ee29cabd01 100644 --- a/src/modules/utils/modals/assetInfo/assetInfo.html +++ b/src/modules/utils/modals/assetInfo/assetInfo.html @@ -10,6 +10,7 @@

{{::$ctrl.asset.name}} +

diff --git a/ts-scripts/interface.d.ts b/ts-scripts/interface.d.ts index a82aa11ff5..c4080495b3 100644 --- a/ts-scripts/interface.d.ts +++ b/ts-scripts/interface.d.ts @@ -51,6 +51,7 @@ export interface IHash { export interface IConfItem { oracle: string; + oracleTokenomica: string; apiVersion: string; code: string; bankRecipient: string; diff --git a/ts-scripts/meta.json b/ts-scripts/meta.json index 6e77613c6b..1c09c95d19 100644 --- a/ts-scripts/meta.json +++ b/ts-scripts/meta.json @@ -234,6 +234,7 @@ }, "mainnet": { "oracle": "3P6t5mKGwVDkyjFhtUqw4NnecyC3DRpLfkw", + "oracleTokenomica": "3P5yz6NiyBoT3KWBrc1iwQeMAen56FcMGTW", "apiVersion": "v0", "bankRecipient": "3P7qtv5Z7AMhwyvf5sM6nLuWWypyjVKb7Us", "code": "W", diff --git a/ts-scripts/utils.ts b/ts-scripts/utils.ts index 97a3118768..bc869e02a8 100644 --- a/ts-scripts/utils.ts +++ b/ts-scripts/utils.ts @@ -221,7 +221,7 @@ export async function getBuildParams(param: IPrepareHTMLOptions) { const isWeb = type === 'web'; const isProduction = buildType && buildType === 'min'; const matcherPriorityList = connection === 'mainnet' ? MAINNET_DATA : TESTNET_DATA; - const { origin, oracle, feeConfigUrl, bankRecipient } = config; + const { origin, oracle, feeConfigUrl, bankRecipient, oracleTokenomica } = config; return { pack, @@ -229,6 +229,7 @@ export async function getBuildParams(param: IPrepareHTMLOptions) { origin, analyticsIframe, oracle, + oracleTokenomica, domain, styles, scripts, From 1269df7d7bf9673ba621f3b9f3155495d5af7dba Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Wed, 17 Apr 2019 18:11:52 +0300 Subject: [PATCH 039/150] CLIENT-1563: add fast anim --- .../dex/directives/dexMyOrders/DexMyOrders.js | 2 ++ .../dex/directives/dexMyOrders/myOrders.less | 23 +++++++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/modules/dex/directives/dexMyOrders/DexMyOrders.js b/src/modules/dex/directives/dexMyOrders/DexMyOrders.js index c0ba344d95..c144692a3b 100644 --- a/src/modules/dex/directives/dexMyOrders/DexMyOrders.js +++ b/src/modules/dex/directives/dexMyOrders/DexMyOrders.js @@ -230,6 +230,7 @@ dataPromise .then((signedTxData) => ds.cancelOrder(signedTxData, order.amount.asset.id, order.price.asset.id)) .then(() => { + row.classList.add('force-leave'); const canceledOrder = this.orders.find(whereEq({ id: order.id })); canceledOrder.state = 'Canceled'; notification.info({ @@ -242,6 +243,7 @@ } }) .catch(e => { + row.classList.remove('pre-leave'); const error = utils.parseError(e); notification.error({ ns: 'app.dex', diff --git a/src/modules/dex/directives/dexMyOrders/myOrders.less b/src/modules/dex/directives/dexMyOrders/myOrders.less index d6ef152687..acc0ee6e43 100644 --- a/src/modules/dex/directives/dexMyOrders/myOrders.less +++ b/src/modules/dex/directives/dexMyOrders/myOrders.less @@ -37,8 +37,23 @@ w-dex-my-orders { } } - .pre-leave { + .repeatItemTransition.pre-leave { + transition: opacity 0.4s; opacity: 0.3; + max-height: 30px; + + @media screen and (max-width: 1024px) { + max-height: 69px; + } + + &.force-leave { + transition: ease-in-out 0.4s; + opacity: 0; + max-height: 0; + @media screen and (max-width: 1024px) { + max-height: 0 !important; + } + } } //end @@ -292,12 +307,6 @@ w-dex-my-orders { .order-row { position: relative; - max-height: 69px; - - &.ng-leave.ng-leave-active { - opacity: 0; - max-height: 0; - } &:not(:first-child) { &::before { From b725c351595ad9906afd09d55eb5fa9b2749d824 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Wed, 17 Apr 2019 18:44:44 +0300 Subject: [PATCH 040/150] CLIENT-1563: add prepere anim --- src/modules/dex/directives/dexMyOrders/DexMyOrders.js | 6 +++++- src/modules/dex/directives/dexMyOrders/myOrders.html | 3 ++- src/modules/dex/directives/dexMyOrders/myOrders.less | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/modules/dex/directives/dexMyOrders/DexMyOrders.js b/src/modules/dex/directives/dexMyOrders/DexMyOrders.js index c144692a3b..a4d5466ad1 100644 --- a/src/modules/dex/directives/dexMyOrders/DexMyOrders.js +++ b/src/modules/dex/directives/dexMyOrders/DexMyOrders.js @@ -68,6 +68,10 @@ * @type {boolean} */ loadingError = false; + /** + * @type {boolean} + */ + showAnims = false; constructor() { @@ -273,7 +277,7 @@ if (needApply) { $scope.$apply(); } - + this.showAnims = true; return null; } diff --git a/src/modules/dex/directives/dexMyOrders/myOrders.html b/src/modules/dex/directives/dexMyOrders/myOrders.html index 4b8afddfcf..976f0e7c79 100644 --- a/src/modules/dex/directives/dexMyOrders/myOrders.html +++ b/src/modules/dex/directives/dexMyOrders/myOrders.html @@ -19,7 +19,8 @@
-
+
diff --git a/src/modules/dex/directives/dexMyOrders/myOrders.less b/src/modules/dex/directives/dexMyOrders/myOrders.less index acc0ee6e43..edca1552a3 100644 --- a/src/modules/dex/directives/dexMyOrders/myOrders.less +++ b/src/modules/dex/directives/dexMyOrders/myOrders.less @@ -25,6 +25,7 @@ w-dex-my-orders { .repeatItemTransition.ng-leave, .repeatItemTransition.ng-enter.ng-enter-active { opacity: 1; + pointer-events: none; &.pre-leave { opacity: 0.3; @@ -41,6 +42,7 @@ w-dex-my-orders { transition: opacity 0.4s; opacity: 0.3; max-height: 30px; + pointer-events: none; @media screen and (max-width: 1024px) { max-height: 69px; From 56ead022a532ad7a863f687731142bd008818b9b Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Thu, 18 Apr 2019 11:26:56 +0300 Subject: [PATCH 041/150] CLIENT-1432: add notification --- .../modules/transactions/controllers/TransactionsCtrl.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js index f3c6f751b8..64ce50add9 100644 --- a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js +++ b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js @@ -8,9 +8,10 @@ * @param {TransactionsCsvGen} transactionsCsvGen * @param {Waves} waves * @param {IPollCreate} createPoll + * @param {INotification} notification * @return {TransactionsCtrl} */ - const controller = function (user, Base, $scope, transactionsCsvGen, waves, createPoll) { + const controller = function (user, Base, $scope, transactionsCsvGen, waves, createPoll, notification) { const analytics = require('@waves/event-sender'); @@ -62,6 +63,10 @@ transactions = await waves.node.transactions.list(MAX_LIMIT, after); } catch (e) { transactions = []; + notification.error({ + ns: 'app.wallet.transactions', + title: { literal: 'exportError' } + }); } allTransactions = allTransactions.concat(transactions.filter(el => !user.scam[el.assetId])); @@ -152,7 +157,7 @@ return new TransactionsCtrl(); }; - controller.$inject = ['user', 'Base', '$scope', 'transactionsCsvGen', 'waves', 'createPoll']; + controller.$inject = ['user', 'Base', '$scope', 'transactionsCsvGen', 'waves', 'createPoll', 'notification']; angular.module('app.wallet.transactions').controller('TransactionsCtrl', controller); })(); From b01a552288197672dd0de984574a88295b086cc8 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 18 Apr 2019 11:44:50 +0300 Subject: [PATCH 042/150] CLIENT-1536: add-api-address-field-and-helpers --- .../utils/modals/settings/SettingsCtrl.js | 8 +++++-- .../utils/modals/settings/settings.html | 23 +++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/modules/utils/modals/settings/SettingsCtrl.js b/src/modules/utils/modals/settings/SettingsCtrl.js index 264a96241a..49090cd5a4 100644 --- a/src/modules/utils/modals/settings/SettingsCtrl.js +++ b/src/modules/utils/modals/settings/SettingsCtrl.js @@ -59,6 +59,7 @@ shownKey = false; node = ''; matcher = ''; + api = ''; scamListUrl = ''; withScam = false; theme = user.getSetting('theme'); @@ -96,6 +97,7 @@ this.syncSettings({ node: 'network.node', matcher: 'network.matcher', + api: 'network.api', logoutAfterMin: 'logoutAfterMin', scamListUrl: 'scamListUrl', withScam: 'withScam', @@ -165,10 +167,11 @@ } }); - this.observe(['node', 'matcher'], () => { + this.observe(['node', 'matcher', 'api'], () => { ds.config.setConfig({ node: this.node, - matcher: this.matcher + matcher: this.matcher, + api: this.api }); }); @@ -216,6 +219,7 @@ this.withScam = false; this.scamListUrl = WavesApp.network.scamListUrl; this.assetsOracle = WavesApp.oracle; + this.api = WavesApp.network.api; } showPairingWithMobile() { diff --git a/src/modules/utils/modals/settings/settings.html b/src/modules/utils/modals/settings/settings.html index 758ce2fec1..5df673206c 100644 --- a/src/modules/utils/modals/settings/settings.html +++ b/src/modules/utils/modals/settings/settings.html @@ -178,8 +178,11 @@
-
+
+ +
+
@@ -188,8 +191,11 @@
-
+
+ +
+
@@ -266,6 +272,19 @@ +
+
+ + +
+
+ + +
+
+
+
+
From 4b52586d0e8fb947fbbff8a23258001dd7af7b97 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Thu, 18 Apr 2019 13:12:44 +0300 Subject: [PATCH 043/150] CLIENT-1432: fix --- .../transactions/controllers/TransactionsCtrl.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js index 64ce50add9..c16ac46079 100644 --- a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js +++ b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js @@ -62,11 +62,20 @@ try { transactions = await waves.node.transactions.list(MAX_LIMIT, after); } catch (e) { + if (!allTransactions.length) { + notification.error({ + ns: 'app.wallet.transactions', + title: { literal: 'exportError' } + }); + return []; + } + transactions = []; notification.error({ ns: 'app.wallet.transactions', title: { literal: 'exportError' } }); + } allTransactions = allTransactions.concat(transactions.filter(el => !user.scam[el.assetId])); @@ -83,7 +92,9 @@ const promiseGetTransactions = getSeriesTransactions(); promiseGetTransactions.then((allTransactions) => { - transactionsCsvGen.generate(allTransactions); + if (allTransactions.length) { + transactionsCsvGen.generate(allTransactions); + } }); return promiseGetTransactions; } From 026257714eefb943a0048299c808410462f85d06 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 18 Apr 2019 13:16:01 +0300 Subject: [PATCH 044/150] CLIENT-1536: fix some helpers --- .../utils/modals/settings/settings.html | 32 ++++++++----------- .../utils/modals/settings/settings.less | 5 +++ 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/modules/utils/modals/settings/settings.html b/src/modules/utils/modals/settings/settings.html index 5df673206c..4e9c0c0077 100644 --- a/src/modules/utils/modals/settings/settings.html +++ b/src/modules/utils/modals/settings/settings.html @@ -178,11 +178,8 @@
-
+
- -
-
@@ -191,11 +188,8 @@
-
+
- -
-
@@ -258,29 +252,29 @@ -
+
- - + +
-
- + -
+
-
+
- - + +
+
- + -
+
diff --git a/src/modules/utils/modals/settings/settings.less b/src/modules/utils/modals/settings/settings.less index 63a62903c2..225c33b2ab 100644 --- a/src/modules/utils/modals/settings/settings.less +++ b/src/modules/utils/modals/settings/settings.less @@ -255,6 +255,11 @@ md-dialog.settings-modal { } .asset-verification { + z-index: 3; + position: relative; + } + + .asset-api { z-index: 2; position: relative; } From 6474b714db74d1f8b833577ffd451cea103b05b3 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 18 Apr 2019 13:33:15 +0300 Subject: [PATCH 045/150] CLIENT-1536: fix helpers type --- src/modules/utils/modals/settings/settings.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/utils/modals/settings/settings.html b/src/modules/utils/modals/settings/settings.html index 4e9c0c0077..8686418c54 100644 --- a/src/modules/utils/modals/settings/settings.html +++ b/src/modules/utils/modals/settings/settings.html @@ -259,7 +259,7 @@
- +
@@ -273,7 +273,7 @@
- +
From 98828a57d00f4ec75b8017bed871781de7fac7a6 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Thu, 18 Apr 2019 17:14:22 +0300 Subject: [PATCH 046/150] CLIENT-1829: refactor oracles --- data-service/classes/DataManager.ts | 20 ++++++++-------- data-service/config.ts | 3 ++- src/index.hbs | 6 +++-- src/modules/app/app.js | 3 +-- src/modules/app/initialize/AppConfig.js | 2 +- src/modules/app/services/DefaultSettings.js | 2 +- src/modules/app/services/User.js | 2 +- .../ui/directives/assetLogo/AssetLogo.js | 3 ++- .../utils/modals/assetInfo/AssetInfoCtrl.js | 21 +++++++++-------- .../utils/modals/settings/SettingsCtrl.js | 23 ++++++++++--------- .../utils/modals/settings/settings.html | 2 +- .../directives/portfolioRow/PortfolioRow.js | 16 ++++++++----- .../portfolio/directives/portfolioRow/row.hbs | 3 +++ ts-scripts/interface.d.ts | 3 +-- ts-scripts/meta.json | 6 +++-- ts-scripts/utils.ts | 5 ++-- 16 files changed, 66 insertions(+), 54 deletions(-) diff --git a/data-service/classes/DataManager.ts b/data-service/classes/DataManager.ts index adfc61aa68..683fc624dd 100644 --- a/data-service/classes/DataManager.ts +++ b/data-service/classes/DataManager.ts @@ -60,9 +60,9 @@ export class DataManager { return this.pollControl.getPollHash().aliases.lastData || []; } - public getOracleAssetData(id: string, oracle: string): TProviderAsset & { provider: string } { + public getOracleAssetData(id: string, oracleName: string = 'oracleWaves'): TProviderAsset & { provider: string } { let pollHash = this.pollControl.getPollHash(); - const lastData = path([oracle, 'lastData'], pollHash); + const lastData = path([oracleName, 'lastData'], pollHash); const assets = lastData && lastData.assets || Object.create(null); const WavesApp = (window as any).WavesApp; @@ -96,7 +96,7 @@ export class DataManager { description: descriptionHash[id] }; - if (id === 'WAVES') { + if (id === 'WAVES' && oracleName === 'oracleWaves') { return { status: STATUS_LIST.VERIFIED, description: descriptionHash.WAVES } as any; } @@ -107,8 +107,8 @@ export class DataManager { return assets[id] ? { ...assets[id], provider: lastData.oracle.name } : null; } - public getOracleData() { - return this.pollControl.getPollHash().oracle.lastData; + public getOracleData(oracleName: string) { + return this.pollControl.getPollHash()[oracleName].lastData; } private _getPollBalanceApi(): IPollAPI> { @@ -147,16 +147,16 @@ export class DataManager { const balance = new Poll(this._getPollBalanceApi(), 1000); const orders = new Poll(this._getPollOrdersApi(), 1000); const aliases = new Poll(this._getPollAliasesApi(), 10000); - const oracle = new Poll(this._getPollOracleApi(get('oracleAddress')), 30000); + const oracleWaves = new Poll(this._getPollOracleApi(get('oracleWaves')), 30000); const oracleTokenomica = new Poll(this._getPollOracleApi(get('oracleTokenomica')), 30000); change.on((key) => { - if (key === 'oracleAddress') { - oracle.restart(); + if (key === 'oracleWaves') { + oracleWaves.restart(); } }); - return { balance, orders, aliases, oracle, oracleTokenomica }; + return { balance, orders, aliases, oracleWaves, oracleTokenomica }; } } @@ -165,7 +165,7 @@ type TPollHash = { balance: Poll>; orders: Poll>; aliases: Poll>; - oracle: Poll + oracleWaves: Poll oracleTokenomica: Poll } diff --git a/data-service/config.ts b/data-service/config.ts index 9398f59fbe..3904d36fab 100644 --- a/data-service/config.ts +++ b/data-service/config.ts @@ -69,6 +69,7 @@ export interface IConfigParams { assets: IHash; minimalSeedLength: number; remappedAssetNames: IHash; - oracleAddress: string; + // oracleAddress: string; + oracleWaves: string; oracleTokenomica: string; } diff --git a/src/index.hbs b/src/index.hbs index 00970dea66..1980f65817 100644 --- a/src/index.hbs +++ b/src/index.hbs @@ -366,8 +366,10 @@ defaultResolution: '60' }, modules: [], - oracle: config.oracle, - oracleTokenomica: config.oracleTokenomica, + oracles: { + waves: config.oracles.waves, + tokenomica: config.oracles.tokenomica + }, minAliasLength: 4, maxAliasLength: 30, maxAddressLength: 45, diff --git a/src/modules/app/app.js b/src/modules/app/app.js index 24b86522f2..c6ae86f9bf 100644 --- a/src/modules/app/app.js +++ b/src/modules/app/app.js @@ -136,8 +136,7 @@ /** * @typedef {object} IWavesApp * @property {string} name - * @property {string} oracle - * @property {string} oracleTokenomica + * @property {object} oracles * @property {string} version * @property {string} type * @property {string} origin diff --git a/src/modules/app/initialize/AppConfig.js b/src/modules/app/initialize/AppConfig.js index 5253bee9c0..79e699f623 100644 --- a/src/modules/app/initialize/AppConfig.js +++ b/src/modules/app/initialize/AppConfig.js @@ -7,7 +7,7 @@ ds.config.setConfig(WavesApp.network); ds.config.set('remappedAssetNames', WavesApp.remappedAssetNames); - ds.config.set('oracleTokenomica', WavesApp.oracleTokenomica); + ds.config.set('oracleTokenomica', WavesApp.oracles.tokenomica); class AppConfig { diff --git a/src/modules/app/services/DefaultSettings.js b/src/modules/app/services/DefaultSettings.js index cbc8b29857..09ae614c1e 100644 --- a/src/modules/app/services/DefaultSettings.js +++ b/src/modules/app/services/DefaultSettings.js @@ -42,7 +42,7 @@ needReadNewTerms: false, lastInterval: WavesApp.dex.defaultResolution, baseAssetId: WavesApp.defaultAssets.USD, - assetsOracle: WavesApp.oracle, + oracleWaves: WavesApp.oracles.waves, events: Object.create(null), lng: 'en', send: { diff --git a/src/modules/app/services/User.js b/src/modules/app/services/User.js index 93b55f1f5a..4c4e34b6e5 100644 --- a/src/modules/app/services/User.js +++ b/src/modules/app/services/User.js @@ -555,7 +555,7 @@ ds.config.set(key, this._settings.get(`network.${key}`)); }); - ds.config.set('oracleAddress', this.getSetting('assetsOracle')); + ds.config.set('oracleWaves', this.getSetting('oracleWaves')); ds.app.login(data.address, data.api); diff --git a/src/modules/ui/directives/assetLogo/AssetLogo.js b/src/modules/ui/directives/assetLogo/AssetLogo.js index 129a7def7a..3c94775520 100644 --- a/src/modules/ui/directives/assetLogo/AssetLogo.js +++ b/src/modules/ui/directives/assetLogo/AssetLogo.js @@ -128,7 +128,8 @@ */ _addLogo() { if (this.assetId) { - const data = ds.dataManager.getOracleAssetData(this.assetId); + const data = ds.dataManager.getOracleAssetData(this.assetId) || + ds.dataManager.getOracleAssetData(this.assetId, 'oracleTokenomica'); if (data && data.logo) { $element.find('.asset__logo') .addClass('custom') diff --git a/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js b/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js index fe2585335b..80d94696cc 100644 --- a/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js +++ b/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js @@ -36,20 +36,21 @@ this.totalBalance = null; this.transactions = []; this.transactionsPending = true; - const data = ds.dataManager.getOracleAssetData(asset.id, 'oracle'); - const tokenomikaData = ds.dataManager.getOracleAssetData(asset.id, 'oracleTokenomica'); - this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; - this.isGateway = path(['status'], data) === 3; - this.isTokenomica = path(['status'], tokenomikaData) === STATUS_LIST.VERIFIED; + const dataOracleWaves = ds.dataManager.getOracleAssetData(asset.id); + const dataOracleTokenomica = ds.dataManager.getOracleAssetData(asset.id, 'oracleTokenomica'); + this.isVerified = path(['status'], dataOracleWaves) === STATUS_LIST.VERIFIED; + this.isGateway = path(['status'], dataOracleWaves) === 3; + this.isTokenomica = path(['status'], dataOracleTokenomica) === STATUS_LIST.VERIFIED; this.isSuspicious = user.scam[this.asset.id]; - this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; + this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious || this.isTokenomica; // this.ticker = path(['ticker'], data); // TODO STEP 2 this.ticker = asset.ticker; // TODO STEP 2 - this.link = path(['link'], data); - this.email = path(['email'], data); - this.provider = this.isVerified && path(['provider'], data) || null; - this.description = path(['description', 'en'], data) || asset.description; + const dataOracle = dataOracleWaves || dataOracleTokenomica; + this.link = path(['link'], dataOracle); + this.email = path(['email'], dataOracle); + this.provider = this.isVerified && path(['provider'], dataOracle) || null; + this.description = path(['description', 'en'], dataOracle) || asset.description; this.withScam = null; this.spam = []; diff --git a/src/modules/utils/modals/settings/SettingsCtrl.js b/src/modules/utils/modals/settings/SettingsCtrl.js index 264a96241a..dcc4c03655 100644 --- a/src/modules/utils/modals/settings/SettingsCtrl.js +++ b/src/modules/utils/modals/settings/SettingsCtrl.js @@ -51,7 +51,7 @@ user.setSetting('advancedMode', mode); } - assetsOracle = ''; + oracleWaves = ''; tab = 'general'; address = user.address; publicKey = user.publicKey; @@ -78,7 +78,8 @@ supportLinkName = WavesApp.network.support.replace(/^https?:\/\//, ''); blockHeight = 0; assetsOracleTmp = ''; - oracleData = path(['oracle'], ds.dataManager.getOracleData()); + oracleWavesData = path(['oracle'], ds.dataManager.getOracleData('oracleWaves')); + // oracleWavesData = path(['oracle'], ds.dataManager.getOracleData('oracleWaves')); oracleError = false; oraclePending = false; oracleSuccess = false; @@ -101,10 +102,10 @@ withScam: 'withScam', theme: 'theme', candle: 'candle', - assetsOracle: 'assetsOracle' + oracleWaves: 'oracleWaves' }); - this.assetsOracleTmp = this.assetsOracle; + this.assetsOracleTmp = this.oracleWaves; storage.load('openClientMode').then(mode => { this.openClientMode = mode; @@ -121,9 +122,9 @@ ); }); - this.observe('assetsOracle', () => { - ds.config.set('oracleAddress', this.assetsOracle); - this.assetsOracleTmp = this.assetsOracle; + this.observe('oracleWaves', () => { + ds.config.set('oracleWaves', this.oracleWaves); + this.assetsOracleTmp = this.oracleWaves; }); this.observe('assetsOracleTmp', () => { @@ -132,9 +133,9 @@ ds.api.data.getOracleData(address) .then(data => { if (data.oracle) { - this.oracleData = data.oracle; - ds.config.set('oracleAddress', address); - this.assetsOracle = this.assetsOracleTmp; + this.oracleWavesData = data.oracle; + ds.config.set('oracleWaves', address); + this.oracleWaves = this.assetsOracleTmp; this.oracleError = false; this.oracleSuccess = true; setTimeout(() => { @@ -215,7 +216,7 @@ this.matcher = WavesApp.network.matcher; this.withScam = false; this.scamListUrl = WavesApp.network.scamListUrl; - this.assetsOracle = WavesApp.oracle; + this.oracleWaves = WavesApp.oracles.waves; } showPairingWithMobile() { diff --git a/src/modules/utils/modals/settings/settings.html b/src/modules/utils/modals/settings/settings.html index 758ce2fec1..04496d5909 100644 --- a/src/modules/utils/modals/settings/settings.html +++ b/src/modules/utils/modals/settings/settings.html @@ -209,7 +209,7 @@ {{$ctrl.oracleData.name}}
- {{$ctrl.assetsOracle}} + {{$ctrl.oracleWaves}}
diff --git a/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js b/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js index ac609d6414..d69b23c5c0 100644 --- a/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js +++ b/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js @@ -227,15 +227,19 @@ 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 data = ds.dataManager.getOracleAssetData(this.balance.asset.id); - const logo = data && data.logo; - this.isVerifiedOrGateway = data && data.status >= STATUS_LIST.VERIFIED; + const dataOracleWaves = ds.dataManager.getOracleAssetData(this.balance.asset.id); + const dataOracleTokenomica = ds.dataManager + .getOracleAssetData(this.balance.asset.id, 'oracleTokenomica'); + const dataOracle = dataOracleWaves || dataOracleTokenomica; + const logo = dataOracle && dataOracle.logo; + this.isVerifiedOrGateway = dataOracleWaves && dataOracleWaves.status >= STATUS_LIST.VERIFIED; const html = template({ canSetAssetScript: this._isMyAsset && this.isSmart, isSmart: this.isSmart, - isVerified: data && data.status === STATUS_LIST.VERIFIED, - isGateway: data && data.status === 3, + isVerified: dataOracleWaves && dataOracleWaves.status === STATUS_LIST.VERIFIED, + isGateway: dataOracleWaves && dataOracleWaves.status === 3, + isTokenomica: dataOracleTokenomica && dataOracleTokenomica.status === STATUS_LIST.VERIFIED, assetIconPath: logo || ASSET_IMAGES_MAP[this.balance.asset.id], firstAssetChar, canBurn: !this._isWaves, @@ -320,7 +324,7 @@ 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()) === STATUS_LIST.VERIFIED; + path(statusPath, ds.dataManager.getOracleData('oracleWaves')) === STATUS_LIST.VERIFIED; } diff --git a/src/modules/wallet/modules/portfolio/directives/portfolioRow/row.hbs b/src/modules/wallet/modules/portfolio/directives/portfolioRow/row.hbs index c3cf374172..ce14d5e700 100644 --- a/src/modules/wallet/modules/portfolio/directives/portfolioRow/row.hbs +++ b/src/modules/wallet/modules/portfolio/directives/portfolioRow/row.hbs @@ -19,6 +19,9 @@ {{#if isGateway}} {{/if}} + {{#if isTokenomica}} + + {{/if}} {{#if isSpam}} {{/if}} diff --git a/ts-scripts/interface.d.ts b/ts-scripts/interface.d.ts index c4080495b3..b5468ec007 100644 --- a/ts-scripts/interface.d.ts +++ b/ts-scripts/interface.d.ts @@ -50,8 +50,7 @@ export interface IHash { } export interface IConfItem { - oracle: string; - oracleTokenomica: string; + oracles: object; apiVersion: string; code: string; bankRecipient: string; diff --git a/ts-scripts/meta.json b/ts-scripts/meta.json index 1c09c95d19..3a4ce9b27a 100644 --- a/ts-scripts/meta.json +++ b/ts-scripts/meta.json @@ -233,8 +233,10 @@ } }, "mainnet": { - "oracle": "3P6t5mKGwVDkyjFhtUqw4NnecyC3DRpLfkw", - "oracleTokenomica": "3P5yz6NiyBoT3KWBrc1iwQeMAen56FcMGTW", + "oracles": { + "waves": "3P6t5mKGwVDkyjFhtUqw4NnecyC3DRpLfkw", + "tokenomica": "3P5yz6NiyBoT3KWBrc1iwQeMAen56FcMGTW" + }, "apiVersion": "v0", "bankRecipient": "3P7qtv5Z7AMhwyvf5sM6nLuWWypyjVKb7Us", "code": "W", diff --git a/ts-scripts/utils.ts b/ts-scripts/utils.ts index bc869e02a8..8650541c8e 100644 --- a/ts-scripts/utils.ts +++ b/ts-scripts/utils.ts @@ -221,15 +221,14 @@ export async function getBuildParams(param: IPrepareHTMLOptions) { const isWeb = type === 'web'; const isProduction = buildType && buildType === 'min'; const matcherPriorityList = connection === 'mainnet' ? MAINNET_DATA : TESTNET_DATA; - const { origin, oracle, feeConfigUrl, bankRecipient, oracleTokenomica } = config; + const { origin, oracles, feeConfigUrl, bankRecipient } = config; return { pack, isWeb, origin, analyticsIframe, - oracle, - oracleTokenomica, + oracles, domain, styles, scripts, From 335e97d106a6d602ed02b7c9058a01be28f584fe Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Thu, 18 Apr 2019 18:54:54 +0300 Subject: [PATCH 047/150] CLIENT-1432: add literals --- .../modules/transactions/controllers/TransactionsCtrl.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js index c16ac46079..fdd82266da 100644 --- a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js +++ b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js @@ -65,7 +65,8 @@ if (!allTransactions.length) { notification.error({ ns: 'app.wallet.transactions', - title: { literal: 'exportError' } + title: { literal: 'errors.download.title' }, + body: { literal: 'errors.download.body' } }); return []; } @@ -73,7 +74,8 @@ transactions = []; notification.error({ ns: 'app.wallet.transactions', - title: { literal: 'exportError' } + title: { literal: 'errors.complete.title' }, + body: { literal: 'errors.complete.body' } }); } From 9f9b1e422b15aed37ac011f61a51c47255c65d42 Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Thu, 18 Apr 2019 19:04:54 +0300 Subject: [PATCH 048/150] CLIENT-1832: refactoring app.less --- .../containerAlertNotification.less | 7 + src/modules/app/less/app.less | 828 +++--------------- src/modules/app/less/classes.less | 109 +++ src/modules/app/services/state/state.less | 15 + src/modules/ui/directives/button/button.less | 48 + src/modules/ui/directives/chart/chart.less | 27 + .../ui/directives/checkbox/checkbox.less | 65 ++ .../ui/directives/emptyBlock/emptyBlock.less | 19 + .../ui/directives/errorBlock/errorBlock.less | 25 + .../inputContainer/inputContainer.less | 4 + .../ui/directives/leftMenu/leftMenu.less | 4 + src/modules/ui/directives/permit/permit.less | 3 + src/modules/ui/directives/qrCode/qrCode.less | 23 + .../directives/qrCodeRead/qrCodeReader.less | 9 - src/modules/ui/directives/radio/radio.less | 2 +- .../ui/directives/signButton/sign-button.less | 4 + .../directives/transaction/transactions.less | 48 + .../transaction-info-json.html | 2 +- .../transactionInfo/transactionInfo.less | 20 + .../transactionInfo/types/data/data-info.html | 2 +- .../utils/modals/assetInfo/assetInfo.less | 58 ++ .../utils/modals/gateway/gatewaySign.html | 2 +- src/modules/utils/modals/modal.less | 63 ++ .../utils/modals/settings/settings.html | 2 +- .../utils/modals/settings/settings.less | 2 +- src/modules/wallet/less/wallet.less | 22 + .../assets/directives/asset/asset.less | 10 + .../wallet/modules/assets/less/assets.less | 22 + .../modules/portfolio/less/portfolio.less | 18 + 29 files changed, 718 insertions(+), 745 deletions(-) create mode 100644 src/modules/app/less/classes.less create mode 100644 src/modules/app/services/state/state.less create mode 100644 src/modules/ui/directives/chart/chart.less create mode 100644 src/modules/ui/directives/permit/permit.less create mode 100644 src/modules/ui/directives/signButton/sign-button.less diff --git a/src/modules/app/directives/containerAlertNotification/containerAlertNotification.less b/src/modules/app/directives/containerAlertNotification/containerAlertNotification.less index 3620f0f290..90b075f657 100644 --- a/src/modules/app/directives/containerAlertNotification/containerAlertNotification.less +++ b/src/modules/app/directives/containerAlertNotification/containerAlertNotification.less @@ -101,6 +101,13 @@ w-container-alert-notification { } } +.notifications { + position: absolute; + right: 10px; + bottom: 10px; + z-index: 10000; +} + // Top notifications .notifications-top { width: 100%; diff --git a/src/modules/app/less/app.less b/src/modules/app/less/app.less index f8df0d089a..c144a0b389 100644 --- a/src/modules/app/less/app.less +++ b/src/modules/app/less/app.less @@ -2,6 +2,14 @@ @import (reference) 'app-icons'; @import (reference) '../../app/less/typography'; +* { + box-sizing: border-box; +} + +*:focus { + outline: none; +} + html, body { width: 100%; @@ -10,53 +18,6 @@ body { overflow: auto; color: @color-disabled-900; background-color: @color-basic-100; - - .notifications { - position: absolute; - right: 10px; - bottom: 10px; - z-index: 10000; - } -} - -::selection { - background: @selection-bg; -} - -::-moz-selection { - background: @selection-bg; -} - -body.welcome, -body.create, -body.restore, -body.import, -body.ledger, -body.tokens, -body.wallet { - .scroll(); -} -body.tokens, - -body.dex, -body.dex-demo { - .scroll-dex(); -} - -ui-view[name="main"] { - display: block; - width: 100%; - height: 100%; - overflow: auto; - background-color: @color-white; -} - -html body .hidden { - display: none !important; -} - -.text-center { - text-align: center; } a { @@ -80,294 +41,101 @@ select:-webkit-autofill:focus { transition: background-color 5000s ease-in-out 0s; } -.waves-logo { - width: 100px; - height: 21px; - background-image: @waves-logo-icon; - background-repeat: no-repeat; - display: block; - margin: 40px auto 80px auto; -} - -md-input-container { - transform: translate3d(0, 0, 0); -} - -* { - box-sizing: border-box; -} - -*:focus { - outline: none; -} - -pre { - margin: 0; - font-family: 'Arial', sans-serif; - font-size: 14px; -} - -.break-all { - word-break: break-all; -} - -.no-user-select { - user-select: none; -} - -w-error-block, -w-empty-block { - width: 100%; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - text-align: center; - - .icon { - background-image: @empty-icon; - background-repeat: no-repeat; - background-position: center center; - width: 100px; - height: 100px; - margin: 0 auto 10px auto; - } -} - -w-error-block { - .icon { - background-image: @error-icon; - } -} - -.ghost { - opacity: 0 !important; -} - -.link { - .footnote-1(); - color: @color-submit-300; - cursor: pointer; -} - -.center { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - height: 100%; - width: 100%; -} - -.relative { - position: relative; -} - -.absolute { - position: absolute; +::selection { + background: @selection-bg; } -w-scroll-box { - display: flex; - flex-direction: column; - overflow: auto; - height: 100%; - background: @color-white; +::-moz-selection { + background: @selection-bg; } -.status-label, -.status-label-min { - width: auto; - padding: 4px 11px; - border-radius: @border-radius; - text-transform: uppercase; - color: @color-submit-400; - background-color: @color-bluebar-200; - margin: -1px 0 0 6px; - white-space: nowrap; - - &.success, - &.confirmed { - background: @color-success-50; - color: @color-success-400; - } - - &.warning, - &.unconfirmed { - background: rgba(255, 175, 0, 0.1); - color: @color-warning-500; - } - - &.error, - &.cancelled { - background: rgba(239, 72, 41, 0.1); - color: @color-error-500; +body.welcome, +body.create, +body.restore, +body.import, +body.ledger, +body.tokens, +body.wallet { + ::-webkit-scrollbar { + width: 4px; + height: 4px; } - &.active { - color: @color-submit-400; - background-color: @color-bluebar-200; + :hover::-webkit-scrollbar { + display: block; } - &.inactive { - background-color: @asset-label-suspicious; - color: @color-black; + ::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 3px @color-basic-100; + -webkit-border-radius: 0; + border-radius: 0; } -} - -.status-label-min { - .caption-3(); - padding: 3px 6px; - margin-top: 4px; - border-radius: @border-radius / 2; - text-transform: uppercase; -} - -.qr-wrapper { - transition: all .3s; - height: auto; - w-qr-code { - display: block; - margin: @qr-margin; - text-align: center; - width: 200px; - height: 200px; - overflow: hidden; - transition: all .3s; - box-shadow: 0 0 0 5px #FFF; - border-radius: 1px; - - .qr-code-wrap, - img { - width: 200px; - height: 200px; - transition: all .3s; - cursor: pointer; - } + ::-webkit-scrollbar-thumb { + -webkit-border-radius: 0; + border-radius: 0; + background: @color-basic-100; + -webkit-box-shadow: inset 0 0 3px @color-basic-500; } - &.zoomed-in { - w-qr-code { - width: 400px; - height: 400px; - - .qr-code-wrap, - img { - width: 400px; - height: 400px; - } - } + ::-webkit-scrollbar-thumb:window-inactive { + background: @color-basic-200; } } -.code-wrapper { - border: 1px dashed @color-basic-200; - border-radius: @border-radius; - background: @color-basic-50; - height: auto; - max-height: 300px; - word-break: break-all; - padding: 17px; - display: block; - overflow: scroll; - - &-vertical { - overflow-y: auto; - overflow-x: hidden; - pre { - white-space: normal; - } +body.tokens, +body.dex, +body.dex-demo { + ::-webkit-scrollbar { + width: 5px; + height: 5px; + border-radius: 50%; } -} -.input-toggle { - display: flex; - align-items: center; - - w-checkbox-submit { - display: none; + :hover::-webkit-scrollbar { + display: block; } - w-checkbox-submit + label { - width: 40px; - height: 20px; - border: 1px solid @color-basic-200; + ::-webkit-scrollbar-thumb { + border-radius: 6px; background: @color-basic-200; - border-radius: 10px; - display: block; - position: relative; - transition: .3s; - - &:hover { - border: 1px solid @input-toggle-bg-hover; - background: @input-toggle-bg-hover; - } - - &::before { - transition: .3s; - background: @color-white; - width: 18px; - height: 18px; - content: ''; - position: absolute; - left: 0; - top: 0; - border-radius: 50%; - display: block; - } + box-shadow: inset -1px 0 0px 1px @color-white; } - &.active { - w-checkbox-submit + label { - border: 1px solid @color-submit-400; - background: @color-submit-400; - - &::before { - transform: translateX(20px); - } - } + ::-webkit-scrollbar-thumb:window-inactive { + background: @color-basic-200; } } -w-sign-button, -.block { +ui-view[name="main"] { display: block; -} - -.overflow-h { - overflow: hidden; -} - -.flex-column-center { width: 100%; height: 100%; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; + overflow: auto; + background-color: @color-white; } -.flex-column-center-min { - width: 100%; +.waves-logo { + width: 100px; + height: 21px; + background-image: @waves-logo-icon; + background-repeat: no-repeat; + display: block; + margin: 40px auto 80px auto; +} + +w-scroll-box { display: flex; flex-direction: column; - justify-content: center; - align-items: center; + overflow: auto; + height: 100%; + background: @color-white; } -.sleep-block { - width: 100%; - height: 100%; - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; - background-color: @color-black; - opacity: 0; - transition: opacity 2s; - z-index: 100000; +.btn-active() { + cursor: default; + background-color: @color-disabled-100; + color: @color-black; } .main-content { @@ -387,186 +155,6 @@ w-sign-button, } } -.wallet.assets { - .main-content .content { - width: calc(100% ~'- 70px'); - height: calc(100% ~'- 70px'); - padding: @padding-main-layout; - overflow-y: auto; - top: 70px; - right: 0; - bottom: 0; - } -} - -.asset-modal { - height: 100%; - - &__head { - padding-top: @padding-main-layout * 4; - height: 170px; - position: relative; - } - - &__head-content { - display: flex; - } - - &__logo { - position: relative; - margin: 0 20px 0 0; - left: 0; - z-index: 1; - } - - &__name { - display: flex; - align-items: center; - margin: 0; - font-weight: normal; - } - - &__data { - display: flex; - flex-direction: column; - min-height: 65px; - justify-content: center; - } - - .chart-wrapper { - position: absolute; - opacity: 0.2; - height: 76px; - width: calc(100% ~'+ 80px'); - left: -40px; - bottom: 0; - border-bottom: 1px solid @color-submit-300; - - .interactive-stop { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - } - - .chart-tooltip, - .chart-legend { // Lib ng3-charts - display: none !important; - } - } -} - -.md-dialog-backdrop:nth-of-type(even) { - z-index: 81; -} - -.md-dialog-backdrop:nth-of-type(odd) { - z-index: 79; - opacity: 0.7; -} - -.md-dialog-container:first-child:nth-of-type(even) { - z-index: 75; -} - -.md-dialog-container:nth-of-type(odd) { - z-index: 82; -} - -._internal-error { - display: none; -} - -svg.chart { - .axis { - .tick line { - display: none; - } - .domain { - stroke: transparent; - } - - & > .tick > text { - fill: @color-disabled-700; - font-size: 13px; - } - } -} - -.md-dialog-container { - md-dialog { - box-shadow: none; - position: absolute; - max-height: 90%; - width: 540px; - background: @color-white; - color: @color-disabled-900; - - md-dialog-actions { - display: flex; - flex-direction: row; - justify-content: center; - } - } -} - -md-toolbar.md-default-theme:not(.md-menu-toolbar), -md-toolbar:not(.md-menu-toolbar) { - background-color: @color-white; - color: @color-black; - border-bottom: 1px solid @color-basic-200; -} - -.chart-legend { - display: none; - margin-left: 40px; - - .legend-item { - display: block; - height: 38px; - } -} - -.btn-wrap.btn-group { - box-sizing: border-box; - padding: 0; - display: flex; - flex-direction: row; - justify-content: center; - - .btn-active { - cursor: default; - background-color: @color-disabled-100; - color: @color-black; - } - - & > *:first-child .btn, & > .btn:first-child { - border-left: 1px solid @color-disabled-100; - border-bottom-left-radius: 5px; - border-top-left-radius: 5px; - } - - & > *:last-child .btn, & > .btn:last-child { - border-bottom-right-radius: 5px; - border-top-right-radius: 5px; - } - - .btn { - display: block; - box-sizing: border-box; - cursor: pointer; - padding: 4px 10px; - border-bottom: 1px solid @color-disabled-100; - border-top: 1px solid @color-disabled-100; - border-right: 1px solid @color-disabled-100; - - &:active { - .btn-active(); - } - } -} - .main { .main-content { background-color: @app-background; @@ -579,12 +167,36 @@ md-toolbar:not(.md-menu-toolbar) { } } -.flex { - display: flex; -} +@media screen and (max-width: 768px) { + + .main-content { + display: flex; + flex-direction: column; + + & > w-header { + order: 1; + } + & > w-left-menu { + order: 0; + } + & > div.content { + order: 2; + } -.flex-between { - justify-content: space-between; + .content { + overflow: auto; + height: 100%; + width: 100%; + position: relative; + right: auto; + left: 0; + top: 0; + bottom: auto; + margin: 0; + padding: 10px; + margin-top: 60px; + } + } } .content ui-view[name="mainContent"], @@ -633,247 +245,3 @@ md-toolbar:not(.md-menu-toolbar) { background: none transparent; } } - -w-permit { - display: block; -} - -.buttons-wrapper { - width: 100%; - display: flex; - justify-content: space-between; - align-items: center; - - w-button, - .fake-button { - flex-basis: 48%; - max-width: 48%; - } -} - -.hide-selection() { - background: none transparent; -} - -.nowrap { - white-space: nowrap; -} - -.ellipsis { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -} - -.pointer { - cursor: pointer; -} - -.assets-wrapper { - height: 100%; - min-height: 210px; -} - -.portfolio-list w-scroll-box { - overflow: auto; - min-height: calc(~'100vh - 207px'); - max-height: calc(~'100vh - 207px'); -} - -.info-block { - position: relative; - padding-left: 30px; - color: @color-basic-500; - - i { - position: absolute; - left: 0; - top: 2px; - } -} - -.unit-checkbox { - display: flex; - min-height: auto; - margin-bottom: 20px; - - w-checkbox-submit { - flex-grow: 0; - align-self: flex-start; - display: block; - } - - label { - flex-grow: 1; - } -} - -.asset { - &__wrapper { - display: flex; - align-items: center; - @media screen and (max-width: 768px) { - flex-direction: row; - } - } -} - -.scroll { - ::-webkit-scrollbar { - width: 4px; - height: 4px; - } - - :hover::-webkit-scrollbar { - display: block; - } - - ::-webkit-scrollbar-track { - -webkit-box-shadow: inset 0 0 3px @color-basic-100; - -webkit-border-radius: 0; - border-radius: 0; - } - - ::-webkit-scrollbar-thumb { - -webkit-border-radius: 0; - border-radius: 0; - background: @color-basic-100; - -webkit-box-shadow: inset 0 0 3px @color-basic-500; - } - - ::-webkit-scrollbar-thumb:window-inactive { - background: @color-basic-200; - } -} - -.scroll-dex { - ::-webkit-scrollbar { - width: 5px; - height: 5px; - border-radius: 50%; - } - - :hover::-webkit-scrollbar { - display: block; - } - - ::-webkit-scrollbar-thumb { - border-radius: 6px; - background: @color-basic-200; - box-shadow: inset -1px 0 0px 1px @color-white; - } - - ::-webkit-scrollbar-thumb:window-inactive { - background: @color-basic-200; - } -} - -@media screen and (min-width: 1024px) { - w-left-menu w-responsive-menu { - min-height: 270px; - } -} - -@media screen and (max-width: 768px) { - - body { - - &.wallet.assets { - .main-content .content { - top: 0; - padding: 10px; - width: 100%; - height: calc(100% ~'- 50px'); - } - } - - &.wallet { - min-width: 100%; - } - - &.portfolio { - .portfolio-list { - w-scroll-box { - min-height: calc(100vh ~'- 130px'); - max-height: 100%; - } - } - } - } - - // end body - .assets-wrapper { - max-height: 100%; - overflow-y: visible; - overflow-x: visible; - } - - .main-content { - display: flex; - flex-direction: column; - - & > w-header { - order: 1; - } - & > w-left-menu { - order: 0; - } - & > div.content { - order: 2; - } - - .content { - overflow: auto; - height: 100%; - width: 100%; - position: relative; - right: auto; - left: 0; - top: 0; - bottom: auto; - margin: 0; - padding: 10px; - margin-top: 60px; - } - } -} - -@media screen and (max-width: 600px) { - .qr-wrapper { - &.zoomed-in { - w-qr-code { - width: 340px; - height: 340px; - - .qr-code-wrap, - img { - width: 340px; - height: 340px; - } - } - } - } -} - -@media screen and (max-width: 540px) { - .md-dialog-container { - md-dialog { - width: 100%; - max-width: 100%; - min-width: 360px; - height: 100%; - max-height: 100%; - left: 0; - top: 0; - transform-origin: center; - transform: translateY(0) translateX(0); - border-radius: 0; - - md-dialog-content { - padding: 20px 20px 0; - height: 100%; - color: @color-disabled-900; - } - } - } -} diff --git a/src/modules/app/less/classes.less b/src/modules/app/less/classes.less new file mode 100644 index 0000000000..0664992deb --- /dev/null +++ b/src/modules/app/less/classes.less @@ -0,0 +1,109 @@ +@import (reference) '../../app/less/typography'; + +.hidden { + display: none !important; +} + +.text-center { + text-align: center; +} + +.pre { + margin: 0; + font-family: 'Arial', sans-serif; + font-size: 14px; +} + +.break-all { + word-break: break-all; +} + +.no-user-select { + user-select: none; +} + +.ghost { + opacity: 0 !important; +} + +.link { + .footnote-1(); + color: @color-submit-300; + cursor: pointer; +} + +.center { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 100%; + width: 100%; +} + +.relative { + position: relative; +} + +.absolute { + position: absolute; +} +.overflow-h { + overflow: hidden; +} + +.flex-column-center { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.flex-column-center-min { + width: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} +._internal-error { + display: none; +} +.flex { + display: flex; +} + +.flex-between { + justify-content: space-between; +} +.nowrap { + white-space: nowrap; +} + +.ellipsis { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} + +.pointer { + cursor: pointer; +} + +.info-block { + position: relative; + padding-left: 30px; + color: @color-basic-500; + + i { + position: absolute; + left: 0; + top: 2px; + } +} + +.hide-selection { + background: none transparent; +} \ No newline at end of file diff --git a/src/modules/app/services/state/state.less b/src/modules/app/services/state/state.less new file mode 100644 index 0000000000..04037499ba --- /dev/null +++ b/src/modules/app/services/state/state.less @@ -0,0 +1,15 @@ +@import (reference) 'config'; + +.sleep-block { + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + background-color: @color-black; + opacity: 0; + transition: opacity 2s; + z-index: 100000; +} \ No newline at end of file diff --git a/src/modules/ui/directives/button/button.less b/src/modules/ui/directives/button/button.less index 4b51b7a60c..979fc7f25f 100644 --- a/src/modules/ui/directives/button/button.less +++ b/src/modules/ui/directives/button/button.less @@ -1,5 +1,6 @@ @import (reference) 'config'; @import (reference) 'icons'; +@import (reference) '../../../app/less/app'; @candy-animation: candyDotsAnimation 1.6s infinite ease-in-out; @candy-size: 10px; @@ -215,6 +216,19 @@ w-button { } } +.buttons-wrapper { + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + + w-button, + .fake-button { + flex-basis: 48%; + max-width: 48%; + } +} + //Candy effect w-button { w-loader { @@ -302,3 +316,37 @@ w-button > button { } } } + + +.btn-wrap.btn-group { + box-sizing: border-box; + padding: 0; + display: flex; + flex-direction: row; + justify-content: center; + + & > *:first-child .btn, & > .btn:first-child { + border-left: 1px solid @color-disabled-100; + border-bottom-left-radius: 5px; + border-top-left-radius: 5px; + } + + & > *:last-child .btn, & > .btn:last-child { + border-bottom-right-radius: 5px; + border-top-right-radius: 5px; + } + + .btn { + display: block; + box-sizing: border-box; + cursor: pointer; + padding: 4px 10px; + border-bottom: 1px solid @color-disabled-100; + border-top: 1px solid @color-disabled-100; + border-right: 1px solid @color-disabled-100; + + &:active { + .btn-active(); + } + } +} \ No newline at end of file diff --git a/src/modules/ui/directives/chart/chart.less b/src/modules/ui/directives/chart/chart.less new file mode 100644 index 0000000000..6714679cec --- /dev/null +++ b/src/modules/ui/directives/chart/chart.less @@ -0,0 +1,27 @@ +@import (reference) 'config'; + +.chart-legend { + display: none; + margin-left: 40px; + + .legend-item { + display: block; + height: 38px; + } +} + +svg.chart { + .axis { + .tick line { + display: none; + } + .domain { + stroke: transparent; + } + + & > .tick > text { + fill: @color-disabled-700; + font-size: 13px; + } + } +} \ No newline at end of file diff --git a/src/modules/ui/directives/checkbox/checkbox.less b/src/modules/ui/directives/checkbox/checkbox.less index eb2b30b4c3..fd5d328819 100644 --- a/src/modules/ui/directives/checkbox/checkbox.less +++ b/src/modules/ui/directives/checkbox/checkbox.less @@ -64,3 +64,68 @@ w-checkbox-switcher { height: 30px; overflow: hidden; } + +.unit-checkbox { + display: flex; + min-height: auto; + margin-bottom: 20px; + + w-checkbox-submit { + flex-grow: 0; + align-self: flex-start; + display: block; + } + + label { + flex-grow: 1; + } +} + +.input-toggle { + display: flex; + align-items: center; + + w-checkbox-submit { + display: none; + } + + w-checkbox-submit + label { + width: 40px; + height: 20px; + border: 1px solid @color-basic-200; + background: @color-basic-200; + border-radius: 10px; + display: block; + position: relative; + transition: .3s; + + &:hover { + border: 1px solid @input-toggle-bg-hover; + background: @input-toggle-bg-hover; + } + + &::before { + transition: .3s; + background: @color-white; + width: 18px; + height: 18px; + content: ''; + position: absolute; + left: 0; + top: 0; + border-radius: 50%; + display: block; + } + } + + &.active { + w-checkbox-submit + label { + border: 1px solid @color-submit-400; + background: @color-submit-400; + + &::before { + transform: translateX(20px); + } + } + } +} diff --git a/src/modules/ui/directives/emptyBlock/emptyBlock.less b/src/modules/ui/directives/emptyBlock/emptyBlock.less index e69de29bb2..1dd93e9f4b 100644 --- a/src/modules/ui/directives/emptyBlock/emptyBlock.less +++ b/src/modules/ui/directives/emptyBlock/emptyBlock.less @@ -0,0 +1,19 @@ +@import (reference) 'icons'; + +w-empty-block { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; + + .icon { + background-image: @empty-icon; + background-repeat: no-repeat; + background-position: center center; + width: 100px; + height: 100px; + margin: 0 auto 10px auto; + } +} \ No newline at end of file diff --git a/src/modules/ui/directives/errorBlock/errorBlock.less b/src/modules/ui/directives/errorBlock/errorBlock.less index e69de29bb2..3ce702d3b6 100644 --- a/src/modules/ui/directives/errorBlock/errorBlock.less +++ b/src/modules/ui/directives/errorBlock/errorBlock.less @@ -0,0 +1,25 @@ +@import (reference) 'icons'; + +w-error-block { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; + + .icon { + background-image: @empty-icon; + background-repeat: no-repeat; + background-position: center center; + width: 100px; + height: 100px; + margin: 0 auto 10px auto; + } +} + +w-error-block { + .icon { + background-image: @error-icon; + } +} \ No newline at end of file diff --git a/src/modules/ui/directives/inputContainer/inputContainer.less b/src/modules/ui/directives/inputContainer/inputContainer.less index 5eda8aa7b5..acbed109e0 100644 --- a/src/modules/ui/directives/inputContainer/inputContainer.less +++ b/src/modules/ui/directives/inputContainer/inputContainer.less @@ -61,3 +61,7 @@ w-input-container { } } } + +md-input-container { + transform: translate3d(0, 0, 0); +} diff --git a/src/modules/ui/directives/leftMenu/leftMenu.less b/src/modules/ui/directives/leftMenu/leftMenu.less index 65d399094d..53a9cf3df6 100644 --- a/src/modules/ui/directives/leftMenu/leftMenu.less +++ b/src/modules/ui/directives/leftMenu/leftMenu.less @@ -441,6 +441,10 @@ w-left-menu { } @media screen and (max-width: 1024px) { + w-left-menu w-responsive-menu { + min-height: 270px; + } + body.dex, body.dex-demo { w-left-menu { diff --git a/src/modules/ui/directives/permit/permit.less b/src/modules/ui/directives/permit/permit.less new file mode 100644 index 0000000000..574a8dcca3 --- /dev/null +++ b/src/modules/ui/directives/permit/permit.less @@ -0,0 +1,3 @@ +w-permit { + display: block; +} \ No newline at end of file diff --git a/src/modules/ui/directives/qrCode/qrCode.less b/src/modules/ui/directives/qrCode/qrCode.less index 2065602504..efab696f78 100644 --- a/src/modules/ui/directives/qrCode/qrCode.less +++ b/src/modules/ui/directives/qrCode/qrCode.less @@ -3,6 +3,12 @@ .qr-wrapper { transition: all .3s; height: auto; + position: relative; + min-height: 240px; + + .center { + height: auto; + } w-qr-code { display: block; @@ -37,3 +43,20 @@ } } } + +@media screen and (max-width: 600px) { + .qr-wrapper { + &.zoomed-in { + w-qr-code { + width: 340px; + height: 340px; + + .qr-code-wrap, + img { + width: 340px; + height: 340px; + } + } + } + } +} \ No newline at end of file diff --git a/src/modules/ui/directives/qrCodeRead/qrCodeReader.less b/src/modules/ui/directives/qrCodeRead/qrCodeReader.less index 407d30930e..ccb6a6037d 100644 --- a/src/modules/ui/directives/qrCodeRead/qrCodeReader.less +++ b/src/modules/ui/directives/qrCodeRead/qrCodeReader.less @@ -18,15 +18,6 @@ w-qr-code-read { } } -.qr-wrapper { - position: relative; - min-height: 240px; - - .center { - height: auto; - } -} - .camera-popup { display: none; position: relative; diff --git a/src/modules/ui/directives/radio/radio.less b/src/modules/ui/directives/radio/radio.less index b3bd85fcdf..de76b1f8c7 100644 --- a/src/modules/ui/directives/radio/radio.less +++ b/src/modules/ui/directives/radio/radio.less @@ -8,7 +8,7 @@ w-radio { } input:checked ~ label.btn.btn-radio { - .btn-wrap.btn-group .btn-active(); + .btn-active(); } } diff --git a/src/modules/ui/directives/signButton/sign-button.less b/src/modules/ui/directives/signButton/sign-button.less new file mode 100644 index 0000000000..7d86d5c45f --- /dev/null +++ b/src/modules/ui/directives/signButton/sign-button.less @@ -0,0 +1,4 @@ +w-sign-button, +.block { + display: block; +} \ No newline at end of file diff --git a/src/modules/ui/directives/transaction/transactions.less b/src/modules/ui/directives/transaction/transactions.less index 6c798e90df..5e8ea8eb71 100644 --- a/src/modules/ui/directives/transaction/transactions.less +++ b/src/modules/ui/directives/transaction/transactions.less @@ -3,6 +3,54 @@ @import (reference) 'config'; @import (reference) 'icons'; +.status-label, +.status-label-min { + width: auto; + padding: 4px 11px; + border-radius: @border-radius; + text-transform: uppercase; + color: @color-submit-400; + background-color: @color-bluebar-200; + margin: -1px 0 0 6px; + white-space: nowrap; + + &.success, + &.confirmed { + background: @color-success-50; + color: @color-success-400; + } + + &.warning, + &.unconfirmed { + background: rgba(255, 175, 0, 0.1); + color: @color-warning-500; + } + + &.error, + &.cancelled { + background: rgba(239, 72, 41, 0.1); + color: @color-error-500; + } + + &.active { + color: @color-submit-400; + background-color: @color-bluebar-200; + } + + &.inactive { + background-color: @asset-label-suspicious; + color: @color-black; + } +} + +.status-label-min { + .caption-3(); + padding: 3px 6px; + margin-top: 4px; + border-radius: @border-radius / 2; + text-transform: uppercase; +} + w-transaction .transaction { display: flex; flex-direction: row; diff --git a/src/modules/ui/directives/transactionInfo/transaction-info-json.html b/src/modules/ui/directives/transactionInfo/transaction-info-json.html index 90452aa641..3111257007 100644 --- a/src/modules/ui/directives/transactionInfo/transaction-info-json.html +++ b/src/modules/ui/directives/transactionInfo/transaction-info-json.html @@ -8,5 +8,5 @@
-
{{$ctrl.json}}
+
{{$ctrl.json}}
diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index 5446549314..b9c02648b7 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -361,6 +361,26 @@ w-transaction-info-header + w-transaction-info-general { } } +.code-wrapper { + border: 1px dashed @color-basic-200; + border-radius: @border-radius; + background: @color-basic-50; + height: auto; + max-height: 300px; + word-break: break-all; + padding: 17px; + display: block; + overflow: scroll; + + &-vertical { + overflow-y: auto; + overflow-x: hidden; + .pre { + white-space: normal; + } + } +} + @media screen and (max-width: 540px) { .txinfo { &__lead { diff --git a/src/modules/ui/directives/transactionInfo/types/data/data-info.html b/src/modules/ui/directives/transactionInfo/types/data/data-info.html index dd77e94b70..bdbd1a980d 100644 --- a/src/modules/ui/directives/transactionInfo/types/data/data-info.html +++ b/src/modules/ui/directives/transactionInfo/types/data/data-info.html @@ -1,6 +1,6 @@
-
{{::$ctrl.transaction.stringifiedData}}
+
{{::$ctrl.transaction.stringifiedData}}

-
{{::$ctrl.errorMessage}}
+
{{::$ctrl.errorMessage}}
diff --git a/src/modules/utils/modals/modal.less b/src/modules/utils/modals/modal.less index 39bbee2358..e262efc695 100644 --- a/src/modules/utils/modals/modal.less +++ b/src/modules/utils/modals/modal.less @@ -1,3 +1,5 @@ +@import (reference) 'config'; + md-dialog { md-toolbar { @@ -46,6 +48,47 @@ md-dialog { } } +.md-dialog-backdrop:nth-of-type(even) { + z-index: 81; +} + +.md-dialog-backdrop:nth-of-type(odd) { + z-index: 79; + opacity: 0.7; +} + +.md-dialog-container:first-child:nth-of-type(even) { + z-index: 75; +} + +.md-dialog-container:nth-of-type(odd) { + z-index: 82; +} + +.md-dialog-container { + md-dialog { + box-shadow: none; + position: absolute; + max-height: 90%; + width: 540px; + background: @color-white; + color: @color-disabled-900; + + md-dialog-actions { + display: flex; + flex-direction: row; + justify-content: center; + } + } +} + +md-toolbar.md-default-theme:not(.md-menu-toolbar), +md-toolbar:not(.md-menu-toolbar) { + background-color: @color-white; + color: @color-black; + border-bottom: 1px solid @color-basic-200; +} + @media screen and (max-width: 540px) { md-dialog { @@ -65,4 +108,24 @@ md-dialog { } } + .md-dialog-container { + md-dialog { + width: 100%; + max-width: 100%; + min-width: 360px; + height: 100%; + max-height: 100%; + left: 0; + top: 0; + transform-origin: center; + transform: translateY(0) translateX(0); + border-radius: 0; + + md-dialog-content { + padding: 20px 20px 0; + height: 100%; + color: @color-disabled-900; + } + } + } } diff --git a/src/modules/utils/modals/settings/settings.html b/src/modules/utils/modals/settings/settings.html index 758ce2fec1..cf2e19d13e 100644 --- a/src/modules/utils/modals/settings/settings.html +++ b/src/modules/utils/modals/settings/settings.html @@ -132,7 +132,7 @@ -
{{::$ctrl.phrase}}
+
{{::$ctrl.phrase}}
diff --git a/src/modules/utils/modals/settings/settings.less b/src/modules/utils/modals/settings/settings.less index 63a62903c2..9831b78556 100644 --- a/src/modules/utils/modals/settings/settings.less +++ b/src/modules/utils/modals/settings/settings.less @@ -333,7 +333,7 @@ md-dialog.settings-modal { } } - pre { + .pre { display: block; position: absolute; line-height: 1em; diff --git a/src/modules/wallet/less/wallet.less b/src/modules/wallet/less/wallet.less index 875c27597c..426c11bb6f 100644 --- a/src/modules/wallet/less/wallet.less +++ b/src/modules/wallet/less/wallet.less @@ -54,5 +54,27 @@ } } } + + &.assets { + .main-content .content { + width: calc(100% ~'- 70px'); + height: calc(100% ~'- 70px'); + padding: @padding-main-layout; + overflow-y: auto; + top: 70px; + right: 0; + bottom: 0; + } + } +} + +@media screen and (max-width: 768px) { + + body { + + &.wallet { + min-width: 100%; + } + } } diff --git a/src/modules/wallet/modules/assets/directives/asset/asset.less b/src/modules/wallet/modules/assets/directives/asset/asset.less index c8771374ad..de39036868 100644 --- a/src/modules/wallet/modules/assets/directives/asset/asset.less +++ b/src/modules/wallet/modules/assets/directives/asset/asset.less @@ -6,6 +6,16 @@ @asset-block-wide50: calc(~"50% - " @padding-main-layout); @asset-block-full: calc(~"100% - " @padding-main-layout); +.asset { + &__wrapper { + display: flex; + align-items: center; + @media screen and (max-width: 768px) { + flex-direction: row; + } + } +} + .new-asset, w-asset { box-sizing: border-box; diff --git a/src/modules/wallet/modules/assets/less/assets.less b/src/modules/wallet/modules/assets/less/assets.less index 20118701aa..560d0a4169 100644 --- a/src/modules/wallet/modules/assets/less/assets.less +++ b/src/modules/wallet/modules/assets/less/assets.less @@ -188,6 +188,11 @@ i.toggler { cursor: pointer; } +.assets-wrapper { + height: 100%; + min-height: 210px; +} + @media screen and (max-width: 768px) { .toolbar-balance-radio { display: none; @@ -273,6 +278,23 @@ i.toggler { } } + body { + + &.wallet.assets { + .main-content .content { + top: 0; + padding: 10px; + width: 100%; + height: calc(100% ~'- 50px'); + } + } + } + + .assets-wrapper { + max-height: 100%; + overflow-y: visible; + overflow-x: visible; + } } @media screen and (max-width: 560px) { diff --git a/src/modules/wallet/modules/portfolio/less/portfolio.less b/src/modules/wallet/modules/portfolio/less/portfolio.less index 6b4afad336..5912921b41 100644 --- a/src/modules/wallet/modules/portfolio/less/portfolio.less +++ b/src/modules/wallet/modules/portfolio/less/portfolio.less @@ -62,6 +62,12 @@ } } +.portfolio-list w-scroll-box { + overflow: auto; + min-height: calc(~'100vh - 207px'); + max-height: calc(~'100vh - 207px'); +} + .smart-table { &__mode-large { max-height: calc(100vh ~'- 142px'); @@ -381,6 +387,18 @@ } } } + + body { + + &.portfolio { + .portfolio-list { + w-scroll-box { + min-height: calc(100vh ~'- 130px'); + max-height: 100%; + } + } + } + } } //mobile From a784c112423f893ff0ab50adfe5a62dedecdc950 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Fri, 19 Apr 2019 12:49:26 +0300 Subject: [PATCH 049/150] CLIENT-1829: getOracleData in utils --- .../ui/directives/assetLogo/AssetLogo.js | 8 ++-- .../utils/modals/assetInfo/AssetInfoCtrl.js | 31 +++++++------- src/modules/utils/services/utils.js | 41 +++++++++++++++++++ ts-scripts/meta.json | 5 ++- 4 files changed, 65 insertions(+), 20 deletions(-) diff --git a/src/modules/ui/directives/assetLogo/AssetLogo.js b/src/modules/ui/directives/assetLogo/AssetLogo.js index 3c94775520..7c3468f2cb 100644 --- a/src/modules/ui/directives/assetLogo/AssetLogo.js +++ b/src/modules/ui/directives/assetLogo/AssetLogo.js @@ -128,12 +128,12 @@ */ _addLogo() { if (this.assetId) { - const data = ds.dataManager.getOracleAssetData(this.assetId) || - ds.dataManager.getOracleAssetData(this.assetId, 'oracleTokenomica'); - if (data && data.logo) { + const { logo } = utils.getDataFromOracles(this.assetId); + + if (logo) { $element.find('.asset__logo') .addClass('custom') - .css('backgroundImage', `url(${data.logo})`); + .css('backgroundImage', `url(${logo})`); return null; } waves.node.assets.getAsset(this.assetId) diff --git a/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js b/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js index 80d94696cc..19fa94a7a8 100644 --- a/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js +++ b/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js @@ -13,8 +13,6 @@ const controller = function (Base, $scope, user, createPoll, utils, waves) { const ds = require('data-service'); - const { path } = require('ramda'); - const { STATUS_LIST } = require('@waves/oracle-data'); class AssetInfoCtrl extends Base { @@ -36,21 +34,24 @@ this.totalBalance = null; this.transactions = []; this.transactionsPending = true; - const dataOracleWaves = ds.dataManager.getOracleAssetData(asset.id); - const dataOracleTokenomica = ds.dataManager.getOracleAssetData(asset.id, 'oracleTokenomica'); - this.isVerified = path(['status'], dataOracleWaves) === STATUS_LIST.VERIFIED; - this.isGateway = path(['status'], dataOracleWaves) === 3; - this.isTokenomica = path(['status'], dataOracleTokenomica) === STATUS_LIST.VERIFIED; - this.isSuspicious = user.scam[this.asset.id]; - this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious || this.isTokenomica; + + const { + isVerified, isGateway, isTokenomica, isSuspicious, + hasLabel, ticker, link, email, provider, description + } = utils.getDataFromOracles(asset); + + this.isVerified = isVerified; + this.isGateway = isGateway; + this.isTokenomica = isTokenomica; + this.isSuspicious = isSuspicious; + this.hasLabel = hasLabel; // this.ticker = path(['ticker'], data); // TODO STEP 2 - this.ticker = asset.ticker; // TODO STEP 2 - const dataOracle = dataOracleWaves || dataOracleTokenomica; - this.link = path(['link'], dataOracle); - this.email = path(['email'], dataOracle); - this.provider = this.isVerified && path(['provider'], dataOracle) || null; - this.description = path(['description', 'en'], dataOracle) || asset.description; + this.ticker = ticker; // TODO STEP 2 + this.link = link; + this.email = email; + this.provider = provider; + this.description = description || asset.description; this.withScam = null; this.spam = []; diff --git a/src/modules/utils/services/utils.js b/src/modules/utils/services/utils.js index c38d06abf4..42f7c3e520 100644 --- a/src/modules/utils/services/utils.js +++ b/src/modules/utils/services/utils.js @@ -11,6 +11,7 @@ const ds = require('data-service'); const { SIGN_TYPE } = require('@waves/signature-adapter'); const { Money, BigNumber } = require('@waves/data-entities'); + const { STATUS_LIST } = require('@waves/oracle-data'); const nullOrCb = (name, cb) => (val1, val2) => { const v1 = val1[name]; @@ -1052,6 +1053,46 @@ return `${stringNum}${postfix}`; }, + /** + * @name app.utils#getDataFromOracles + * @param {string} assetId + * @return {object} + */ + getDataFromOracles(assetId) { + /** + * @type {User} + */ + const user = $injector.get('user'); + const dataOracleWaves = ds.dataManager.getOracleAssetData(assetId); + const dataOracleTokenomica = ds.dataManager.getOracleAssetData(assetId, 'oracleTokenomica'); + const isVerified = path(['status'], dataOracleWaves) === STATUS_LIST.VERIFIED; + const isGateway = path(['status'], dataOracleWaves) === 3; + const isTokenomica = path(['status'], dataOracleTokenomica) === STATUS_LIST.VERIFIED; + const isSuspicious = user.scam[assetId]; + const hasLabel = isVerified || isGateway || isSuspicious || isTokenomica; + const ticker = path(['ticker'], dataOracle); + const dataOracle = dataOracleWaves || dataOracleTokenomica; + const link = path(['link'], dataOracle); + const email = path(['email'], dataOracle); + const logo = path(['logo'], dataOracle); + const provider = isVerified && path(['provider'], dataOracle) || null; + const description = path(['description', 'en'], dataOracle); + + return { + isVerified, + isGateway, + isTokenomica, + isSuspicious, + hasLabel, + ticker, + link, + email, + provider, + description, + logo + }; + }, + /** * @name app.utils#toArray * @param {*} some diff --git a/ts-scripts/meta.json b/ts-scripts/meta.json index 3a4ce9b27a..a173d4ec31 100644 --- a/ts-scripts/meta.json +++ b/ts-scripts/meta.json @@ -199,7 +199,10 @@ }, "configurations": { "testnet": { - "oracle": "3N5net4nzSeeqxPfGZrvVvnGavsinipQHbE", + "oracles": { + "waves": "3N5net4nzSeeqxPfGZrvVvnGavsinipQHbE", + "tokenomica": "3P5yz6NiyBoT3KWBrc1iwQeMAen56FcMGTW" + }, "apiVersion": "v0", "code": "T", "bankRecipient": "", From 03e91083c28cf949cf35c9718f213b7d4987080c Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Fri, 19 Apr 2019 13:52:04 +0300 Subject: [PATCH 050/150] CLIENT-1829: refactor get oracle data in components --- .../setAssetScriptForm/SetAssetScriptFrom.js | 19 +++++++++--------- .../utils/modals/assetInfo/AssetInfoCtrl.js | 5 +++-- .../changeToken/TokenChangeModalCtrl.js | 20 ++++++++++++------- .../changeToken/change-token-modal.html | 1 + .../modals/sponsored/SponsoredModalCtrl.js | 14 ++++++------- .../utils/modals/sponsored/sponsored.html | 4 ++++ src/modules/utils/services/utils.js | 6 ++++-- .../modules/assets/directives/asset/Asset.js | 15 ++++++-------- .../assets/directives/asset/asset.html | 3 +++ .../directives/portfolioRow/PortfolioRow.js | 16 +++++++-------- 10 files changed, 57 insertions(+), 46 deletions(-) diff --git a/src/modules/ui/directives/setAssetScriptForm/SetAssetScriptFrom.js b/src/modules/ui/directives/setAssetScriptForm/SetAssetScriptFrom.js index a4a0b3309f..9cca7e5332 100644 --- a/src/modules/ui/directives/setAssetScriptForm/SetAssetScriptFrom.js +++ b/src/modules/ui/directives/setAssetScriptForm/SetAssetScriptFrom.js @@ -3,9 +3,6 @@ const { SIGN_TYPE } = require('@waves/signature-adapter'); const { signature } = require('data-service'); - const { STATUS_LIST } = require('@waves/oracle-data'); - const { path } = require('ramda'); - const ds = require('data-service'); const $ = require('jquery'); /** @@ -15,7 +12,7 @@ * @param {User} user * @param {BalanceWatcher} balanceWatcher */ - const controller = function (Base, waves, $scope, user, balanceWatcher) { + const controller = function (Base, waves, $scope, user, balanceWatcher, utils) { const analytics = require('@waves/event-sender'); @@ -151,11 +148,13 @@ if (!asset.hasScript) { throw new Error('This asset has no script!'); } - const data = ds.dataManager.getOracleAssetData(asset.id); - this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; - this.isGateway = path(['status'], data) === 3; - this.isSuspicious = user.scam[asset.id]; - this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; + const { isVerified, isGateway, + isTokenomica, isSuspicious, hasLabel } = utils.getDataFromOracles(asset.id); + this.isVerified = isVerified; + this.isGateway = isGateway; + this.isTokenomica = isTokenomica; + this.isSuspicious = isSuspicious; + this.hasLabel = hasLabel; this.asset = asset; $scope.$apply(); }); @@ -197,7 +196,7 @@ return new SetAssetScriptFrom(); }; - controller.$inject = ['Base', 'waves', '$scope', 'user', 'balanceWatcher']; + controller.$inject = ['Base', 'waves', '$scope', 'user', 'balanceWatcher', 'utils']; angular.module('app.ui').component('wSetAssetScriptFrom', { bindings: { diff --git a/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js b/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js index 19fa94a7a8..e19cf25c99 100644 --- a/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js +++ b/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js @@ -38,7 +38,7 @@ const { isVerified, isGateway, isTokenomica, isSuspicious, hasLabel, ticker, link, email, provider, description - } = utils.getDataFromOracles(asset); + } = utils.getDataFromOracles(this.asset.id); this.isVerified = isVerified; this.isGateway = isGateway; @@ -47,9 +47,10 @@ this.hasLabel = hasLabel; // this.ticker = path(['ticker'], data); // TODO STEP 2 - this.ticker = ticker; // TODO STEP 2 + this.ticker = this.asset.ticker || ticker; // TODO STEP 2 this.link = link; this.email = email; + this.provider = provider; this.description = description || asset.description; diff --git a/src/modules/utils/modals/changeToken/TokenChangeModalCtrl.js b/src/modules/utils/modals/changeToken/TokenChangeModalCtrl.js index d04de3d5e4..40a86646d7 100644 --- a/src/modules/utils/modals/changeToken/TokenChangeModalCtrl.js +++ b/src/modules/utils/modals/changeToken/TokenChangeModalCtrl.js @@ -18,8 +18,6 @@ const analytics = require('@waves/event-sender'); const ds = require('data-service'); - const { path } = require('ramda'); - const { STATUS_LIST } = require('@waves/oracle-data'); class TokenChangeModalCtrl extends Base { @@ -71,11 +69,19 @@ */ this._waves = null; - const data = ds.dataManager.getOracleAssetData(money.asset.id); - this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; - this.isGateway = path(['status'], data) === 3; - this.ticker = money.asset.ticker; - this.description = path(['description', 'en'], data) || money.asset.description; + const { + isVerified, + isGateway, + isTokenomica, + ticker, + description + } = utils.getDataFromOracles(money.asset); + + this.isVerified = isVerified; + this.isGateway = isGateway; + this.isTokenomica = isTokenomica; + this.ticker = ticker || money.asset.ticker; + this.description = description || money.asset.description; const { TokenChangeModalCtrl = {} } = user.getThemeSettings(); diff --git a/src/modules/utils/modals/changeToken/change-token-modal.html b/src/modules/utils/modals/changeToken/change-token-modal.html index e5e8c4c435..d2aed06f24 100644 --- a/src/modules/utils/modals/changeToken/change-token-modal.html +++ b/src/modules/utils/modals/changeToken/change-token-modal.html @@ -11,6 +11,7 @@

{{::$ctrl.asset.name}} +

diff --git a/src/modules/utils/modals/sponsored/SponsoredModalCtrl.js b/src/modules/utils/modals/sponsored/SponsoredModalCtrl.js index 72f6e510f2..6b0aecbf13 100644 --- a/src/modules/utils/modals/sponsored/SponsoredModalCtrl.js +++ b/src/modules/utils/modals/sponsored/SponsoredModalCtrl.js @@ -15,7 +15,6 @@ const { SIGN_TYPE } = require('@waves/signature-adapter'); const { Money } = require('@waves/data-entities'); const ds = require('data-service'); - const { path } = require('ramda'); const analytics = require('@waves/event-sender'); class SponsoredModalCtrl extends Base { @@ -68,12 +67,13 @@ this.asset = asset; this.isCreateSponsored = isCreateSponsored; - const { STATUS_LIST } = require('@waves/oracle-data'); - const data = ds.dataManager.getOracleAssetData(asset.id); - this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; - this.isGateway = path(['status'], data) === 3; - this.ticker = asset.ticker; - this.description = path(['description', 'en'], data) || asset.description; + const { isVerified, isGateway, + isTokenomica, ticker, description } = utils.getDataFromOracles(this.balance.asset.id); + this.isVerified = isVerified; + this.isGateway = isGateway; + this.isTokenomica = isTokenomica; + this.ticker = ticker || asset.ticker; + this.description = description || asset.description; if (isEmpty(this.assetId)) { throw new Error('Wrong modal params!'); diff --git a/src/modules/utils/modals/sponsored/sponsored.html b/src/modules/utils/modals/sponsored/sponsored.html index 1e3e8ebd42..2c9424c5ef 100644 --- a/src/modules/utils/modals/sponsored/sponsored.html +++ b/src/modules/utils/modals/sponsored/sponsored.html @@ -17,6 +17,10 @@

{{::$ctrl.asset.name}} ng-if="$ctrl.isGateway" w-i18n-ns="app.utils" w-i18n="modal.assetInfo.gateway"> +

diff --git a/src/modules/utils/services/utils.js b/src/modules/utils/services/utils.js index 42f7c3e520..f04d132c45 100644 --- a/src/modules/utils/services/utils.js +++ b/src/modules/utils/services/utils.js @@ -1063,19 +1063,21 @@ * @type {User} */ const user = $injector.get('user'); - const dataOracleWaves = ds.dataManager.getOracleAssetData(assetId); + const dataOracleWaves = ds.dataManager.getOracleAssetData(assetId, 'oracleWaves'); const dataOracleTokenomica = ds.dataManager.getOracleAssetData(assetId, 'oracleTokenomica'); + const isVerified = path(['status'], dataOracleWaves) === STATUS_LIST.VERIFIED; const isGateway = path(['status'], dataOracleWaves) === 3; const isTokenomica = path(['status'], dataOracleTokenomica) === STATUS_LIST.VERIFIED; const isSuspicious = user.scam[assetId]; const hasLabel = isVerified || isGateway || isSuspicious || isTokenomica; const ticker = path(['ticker'], dataOracle); + const dataOracle = dataOracleWaves || dataOracleTokenomica; const link = path(['link'], dataOracle); const email = path(['email'], dataOracle); const logo = path(['logo'], dataOracle); - const provider = isVerified && path(['provider'], dataOracle) || null; + const provider = isVerified || isTokenomica && path(['provider'], dataOracleWaves) || null; const description = path(['description', 'en'], dataOracle); return { diff --git a/src/modules/wallet/modules/assets/directives/asset/Asset.js b/src/modules/wallet/modules/assets/directives/asset/Asset.js index 3d77b08bc1..c0a9d4a4cf 100644 --- a/src/modules/wallet/modules/assets/directives/asset/Asset.js +++ b/src/modules/wallet/modules/assets/directives/asset/Asset.js @@ -1,14 +1,10 @@ (function () { 'use strict'; - const { path } = require('ramda'); - const ds = require('data-service'); - const { STATUS_LIST } = require('@waves/oracle-data'); - /** * @return {Asset} */ - const controller = function () { + const controller = function (utils) { class Asset { @@ -20,9 +16,10 @@ } $postLink() { - const data = ds.dataManager.getOracleAssetData(this.balance.asset.id); - this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED || this.balance.asset.id === 'WAVES'; - this.isGateway = path(['status'], data) === 3; + const { isVerified, isGateway, isTokenomica } = utils.getDataFromOracles(this.balance.asset.id); + this.isVerified = isVerified; + this.isGateway = isGateway; + this.isTokenomica = isTokenomica; } isUnpinned() { @@ -34,7 +31,7 @@ return new Asset(); }; - controller.$inject = []; + controller.$inject = ['utils']; angular.module('app.wallet.assets').component('wAsset', { bindings: { diff --git a/src/modules/wallet/modules/assets/directives/asset/asset.html b/src/modules/wallet/modules/assets/directives/asset/asset.html index 6f1580dbd3..d1a094f164 100644 --- a/src/modules/wallet/modules/assets/directives/asset/asset.html +++ b/src/modules/wallet/modules/assets/directives/asset/asset.html @@ -11,6 +11,9 @@
+
+ +
item.asset.id === this.balance.asset.id) && !this._isWaves; - const dataOracleWaves = ds.dataManager.getOracleAssetData(this.balance.asset.id); - const dataOracleTokenomica = ds.dataManager - .getOracleAssetData(this.balance.asset.id, 'oracleTokenomica'); - const dataOracle = dataOracleWaves || dataOracleTokenomica; - const logo = dataOracle && dataOracle.logo; - this.isVerifiedOrGateway = dataOracleWaves && dataOracleWaves.status >= STATUS_LIST.VERIFIED; + const { isVerified, isGateway, + isTokenomica, logo } = utils.getDataFromOracles(this.balance.asset.id); + + this.isVerifiedOrGateway = isVerified && isGateway; const html = template({ canSetAssetScript: this._isMyAsset && this.isSmart, isSmart: this.isSmart, - isVerified: dataOracleWaves && dataOracleWaves.status === STATUS_LIST.VERIFIED, - isGateway: dataOracleWaves && dataOracleWaves.status === 3, - isTokenomica: dataOracleTokenomica && dataOracleTokenomica.status === STATUS_LIST.VERIFIED, + isVerified: isVerified, + isGateway: isGateway, + isTokenomica: isTokenomica, assetIconPath: logo || ASSET_IMAGES_MAP[this.balance.asset.id], firstAssetChar, canBurn: !this._isWaves, From 6ca12e24335153013a4fc2d1a2406aa00927cbcb Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Fri, 19 Apr 2019 15:14:56 +0300 Subject: [PATCH 051/150] CLIENT-1829: added tokenomica testnet address --- ts-scripts/meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-scripts/meta.json b/ts-scripts/meta.json index a173d4ec31..2268e5932f 100644 --- a/ts-scripts/meta.json +++ b/ts-scripts/meta.json @@ -201,7 +201,7 @@ "testnet": { "oracles": { "waves": "3N5net4nzSeeqxPfGZrvVvnGavsinipQHbE", - "tokenomica": "3P5yz6NiyBoT3KWBrc1iwQeMAen56FcMGTW" + "tokenomica": "3Mq2ikxDH6rV5VBUNX1Ef8Ag1Vjntbh4MvD" }, "apiVersion": "v0", "code": "T", From c382fa2e3fc047de52270f281c1d2c95f89f1259 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Fri, 19 Apr 2019 15:32:47 +0300 Subject: [PATCH 052/150] CLIENT-1829: remove comment --- src/modules/utils/modals/settings/SettingsCtrl.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/utils/modals/settings/SettingsCtrl.js b/src/modules/utils/modals/settings/SettingsCtrl.js index dcc4c03655..97f0e6143f 100644 --- a/src/modules/utils/modals/settings/SettingsCtrl.js +++ b/src/modules/utils/modals/settings/SettingsCtrl.js @@ -79,7 +79,6 @@ blockHeight = 0; assetsOracleTmp = ''; oracleWavesData = path(['oracle'], ds.dataManager.getOracleData('oracleWaves')); - // oracleWavesData = path(['oracle'], ds.dataManager.getOracleData('oracleWaves')); oracleError = false; oraclePending = false; oracleSuccess = false; From 22bb1d888fb314ad53d03f15f06e725dc7176a54 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Fri, 19 Apr 2019 16:40:03 +0300 Subject: [PATCH 053/150] CLIENT-1796: change time to text --- .../utils/modals/transactionInfo/transaction-info.modal.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/utils/modals/transactionInfo/transaction-info.modal.html b/src/modules/utils/modals/transactionInfo/transaction-info.modal.html index 61925b9e52..73f3fccf4c 100644 --- a/src/modules/utils/modals/transactionInfo/transaction-info.modal.html +++ b/src/modules/utils/modals/transactionInfo/transaction-info.modal.html @@ -25,7 +25,7 @@
- +
From 89cc669d4e1b4aeec5ec7774eb2519e7b5235717 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Fri, 19 Apr 2019 16:49:53 +0300 Subject: [PATCH 054/150] CLIENT-1796: remove other fixes --- src/modules/utils/modals/settings/SettingsCtrl.js | 6 +----- src/modules/utils/modals/settings/settings.html | 15 +-------------- src/modules/utils/modals/settings/settings.less | 5 ----- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/src/modules/utils/modals/settings/SettingsCtrl.js b/src/modules/utils/modals/settings/SettingsCtrl.js index 49090cd5a4..fa8fb7232a 100644 --- a/src/modules/utils/modals/settings/SettingsCtrl.js +++ b/src/modules/utils/modals/settings/SettingsCtrl.js @@ -59,7 +59,6 @@ shownKey = false; node = ''; matcher = ''; - api = ''; scamListUrl = ''; withScam = false; theme = user.getSetting('theme'); @@ -97,7 +96,6 @@ this.syncSettings({ node: 'network.node', matcher: 'network.matcher', - api: 'network.api', logoutAfterMin: 'logoutAfterMin', scamListUrl: 'scamListUrl', withScam: 'withScam', @@ -170,8 +168,7 @@ this.observe(['node', 'matcher', 'api'], () => { ds.config.setConfig({ node: this.node, - matcher: this.matcher, - api: this.api + matcher: this.matcher }); }); @@ -219,7 +216,6 @@ this.withScam = false; this.scamListUrl = WavesApp.network.scamListUrl; this.assetsOracle = WavesApp.oracle; - this.api = WavesApp.network.api; } showPairingWithMobile() { diff --git a/src/modules/utils/modals/settings/settings.html b/src/modules/utils/modals/settings/settings.html index 8686418c54..758ce2fec1 100644 --- a/src/modules/utils/modals/settings/settings.html +++ b/src/modules/utils/modals/settings/settings.html @@ -252,19 +252,6 @@
-
-
- - -
-
- - -
-
-
-
-
@@ -273,7 +260,7 @@
- +
diff --git a/src/modules/utils/modals/settings/settings.less b/src/modules/utils/modals/settings/settings.less index 225c33b2ab..63a62903c2 100644 --- a/src/modules/utils/modals/settings/settings.less +++ b/src/modules/utils/modals/settings/settings.less @@ -255,11 +255,6 @@ md-dialog.settings-modal { } .asset-verification { - z-index: 3; - position: relative; - } - - .asset-api { z-index: 2; position: relative; } From fdccd46563af8d17d0a53182a9ca8b16b7489df2 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Fri, 19 Apr 2019 17:07:18 +0300 Subject: [PATCH 055/150] CLIENT-1774: add delay --- data-service/broadcast/broadcast.ts | 5 ++- data-service/index.ts | 2 + data-service/store.ts | 66 +++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 data-service/store.ts diff --git a/data-service/broadcast/broadcast.ts b/data-service/broadcast/broadcast.ts index bb9e4edbbd..942efb1023 100644 --- a/data-service/broadcast/broadcast.ts +++ b/data-service/broadcast/broadcast.ts @@ -1,7 +1,8 @@ import { request } from '../utils/request'; import { parse } from '../api/matcher/getOrders'; import { get } from '../config'; -import { stringifyJSON } from "../utils/utils"; +import { addOrderToStore, removeOrderFromStore } from '../store'; +import { stringifyJSON } from '../utils/utils'; export function broadcast(data) { @@ -38,6 +39,7 @@ export function createOrderSend(txData) { filled: 0 }]); }) + .then(addOrderToStore); } export function cancelOrderSend(txData, amountId, priceId, type: 'cancel' | 'delete' = 'cancel') { @@ -52,6 +54,7 @@ export function cancelOrderSend(txData, amountId, priceId, type: 'cancel' | 'del body: stringifyJSON(txData) } }).then((data) => { + removeOrderFromStore({ id: txData.orderId }); return data; }); } diff --git a/data-service/index.ts b/data-service/index.ts index f9a47ef253..1df44601d8 100644 --- a/data-service/index.ts +++ b/data-service/index.ts @@ -21,6 +21,8 @@ import { TTimeType } from './utils/utils'; export { getAdapterByType, getAvailableList } from '@waves/signature-adapter'; export { Seed } from './classes/Seed'; export { assetStorage } from './utils/AssetStorage'; +export * from './store'; + export const wavesDataEntities = { ...wavesDataEntitiesModule }; diff --git a/data-service/store.ts b/data-service/store.ts new file mode 100644 index 0000000000..79cfd000f4 --- /dev/null +++ b/data-service/store.ts @@ -0,0 +1,66 @@ +import { toArray } from './utils/utils'; +import { IOrder } from './api/matcher/interface'; +import { pipe, concat, eqProps, uniqBy, prop, differenceWith, tap } from 'ramda'; + +export type TStore = Array>; + +const ordersStore: Array> = []; +const toRemoveOrders: Array> = []; + +function createAddStore(container: TStore, timeout: number) { + return (item: T | Array) => { + toArray(item).forEach((item) => { + const storeItem = { + data: item, + expiration: window.setTimeout(() => { + container.splice(container.indexOf(storeItem), 1); + }, timeout) + }; + container.push(storeItem); + }); + return item; + }; +} + +function removeFromStoreById(container: TStore, idKey: keyof T, item: Partial) { + const id = item[idKey]; + for (let i = container.length - 1; i >= 0; i--) { + if (container[i].data[idKey] === id) { + window.clearTimeout(container[i].expiration); + container.splice(i, 1); + break; + } + } +} + +function createClearStore(addContainer: TStore, addRemoveF: IRemoveOrderFunc>, idKey: keyof T) { + return (item: Partial | Array>) => { + toArray(item).forEach((item) => { + removeFromStoreById(addContainer, idKey, item); + }); + addRemoveF(item); + return item; + }; +} + +function createProcessStore(toAddContainer: TStore, toRemoveContainer: TStore, idKey: string): (list: Array) => Array { + return pipe( + list => concat(toAddContainer.map(prop('data')), list), + list => differenceWith(eqProps(idKey), list, toRemoveContainer.map(prop('data'))) as any, + uniqBy(prop(idKey) as any) + ); +} + +const addToRemoveStore = createAddStore(toRemoveOrders, 3000); +export const addOrderToStore = createAddStore(ordersStore, 3000); +export const removeOrderFromStore = createClearStore(ordersStore, addToRemoveStore, 'id'); +export const processOrdersWithStore = createProcessStore(ordersStore, toRemoveOrders, 'id'); + +export interface IStoreContainerItem { + data: T; + expiration: number; +} + +interface IRemoveOrderFunc { + (item: T | Array): T | Array; +} From 50b4070c4489a1809466a2efc00d9b8a9f8dd413 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Mon, 22 Apr 2019 11:44:34 +0300 Subject: [PATCH 056/150] CLIENT-1829: fix ticker from oracle --- src/modules/utils/services/utils.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/utils/services/utils.js b/src/modules/utils/services/utils.js index f04d132c45..8b482c9e83 100644 --- a/src/modules/utils/services/utils.js +++ b/src/modules/utils/services/utils.js @@ -1065,15 +1065,14 @@ const user = $injector.get('user'); const dataOracleWaves = ds.dataManager.getOracleAssetData(assetId, 'oracleWaves'); const dataOracleTokenomica = ds.dataManager.getOracleAssetData(assetId, 'oracleTokenomica'); - const isVerified = path(['status'], dataOracleWaves) === STATUS_LIST.VERIFIED; const isGateway = path(['status'], dataOracleWaves) === 3; const isTokenomica = path(['status'], dataOracleTokenomica) === STATUS_LIST.VERIFIED; const isSuspicious = user.scam[assetId]; const hasLabel = isVerified || isGateway || isSuspicious || isTokenomica; - const ticker = path(['ticker'], dataOracle); const dataOracle = dataOracleWaves || dataOracleTokenomica; + const ticker = path(['ticker'], dataOracle); const link = path(['link'], dataOracle); const email = path(['email'], dataOracle); const logo = path(['logo'], dataOracle); From 194aa8f32ff8a3acbc2fe682f9f3f9918fc72791 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Mon, 22 Apr 2019 12:39:35 +0300 Subject: [PATCH 057/150] CLIENT-1825: fix loading --- package-lock.json | 123 +++++++++++++++++++++++++++++-------- package.json | 5 +- ts-scripts/meta.json | 1 + vendors/require-modules.js | 1 + 4 files changed, 104 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 33d178b039..32d692a84d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "waves-client", - "version": "1.2.0", + "version": "1.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -245,6 +245,11 @@ "@types/babel-types": "*" } }, + "@types/base64-js": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/base64-js/-/base64-js-1.2.5.tgz", + "integrity": "sha1-WCskdhaabLpGCiFNR2x0REHYc9U=" + }, "@types/chokidar": { "version": "1.7.5", "resolved": "http://registry.npmjs.org/@types/chokidar/-/chokidar-1.7.5.tgz", @@ -441,6 +446,11 @@ "integrity": "sha1-fjbMv8cwJ43DOrS5CxEcoy5TJBA=", "dev": true }, + "@types/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", + "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" + }, "@types/mime": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", @@ -601,28 +611,41 @@ } }, "@waves/ledger": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@waves/ledger/-/ledger-3.2.0.tgz", - "integrity": "sha512-kT0NeAWwe59vRcsJjxdsbUO45Z6/dg7HcjQnMuZLbDKZD3CXF7vuQeRLUX16N4L7QwM4FH1Yv0HH9Rs+DlecnQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@waves/ledger/-/ledger-3.2.1.tgz", + "integrity": "sha512-qzYES2C7LT5PYqsPskfPw4XjI5AeEs8qyaK3+p/ObDMJbGvbQmqlC0LTsysZCamBJR5Rfxl6pOIOw2kLqOdCag==", "requires": { "@ledgerhq/hw-transport-u2f": "^4.24.0", "babel-polyfill": "^6.26.0" } }, + "@waves/marshall": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@waves/marshall/-/marshall-0.6.1.tgz", + "integrity": "sha512-/YLfMi664CCEqEFiju+eswFZxXg/TQZcVsb9Q7jDiLpESwno8qBDwikeLY5BIJ37g9t9JEc6TUIeUnGDoVE9TA==", + "requires": { + "@types/base64-js": "^1.2.5", + "@types/long": "^4.0.0", + "base64-js": "^1.3.0", + "long": "^4.0.0", + "parse-json-bignumber": "^0.1.2" + } + }, "@waves/oracle-data": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/@waves/oracle-data/-/oracle-data-0.0.6.tgz", "integrity": "sha512-1qxL22a8LRA38xxzmmJktdVdGTfz2d9SXr9SI2gPpCJSKYrKb7SNGbOE3TgIyCRY0fquOHMtkwXuKGRw+LsJoA==" }, "@waves/signature-adapter": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@waves/signature-adapter/-/signature-adapter-4.2.1.tgz", - "integrity": "sha512-Vmkx1EVJmdhU+Iol3EbKgnG7TpDwlSjVTKVk2pJ5781GVNWH1dSxs/yv9ni3jTDpWFND7OsfU9br/2/mm/WiKw==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@waves/signature-adapter/-/signature-adapter-4.3.3.tgz", + "integrity": "sha512-TJdJbckm0hoUd0OUAo0OjUTzV59fpktJrKvBJXay2yGLQU9siHF3GH3twKFKi3LJ65iOFr52enS+6FEvotep+A==", "requires": { "@types/ramda": "^0.25.46", "@waves/data-entities": "^1.6.3", - "@waves/ledger": "^3.0.1", - "@waves/signature-generator": "^5.0.0", + "@waves/ledger": "^3.2.1", + "@waves/marshall": "^0.6.1", + "@waves/signature-generator": "^5.0.1", "@waves/ts-types": "^0.2.0-beta-1", "ramda": "^0.25.0" }, @@ -632,6 +655,26 @@ "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.25.51.tgz", "integrity": "sha512-xcmtfHIgF9SYjhGdsZR1nQslxG4hu0cIpFfLQ4CWdw3KzHvl7ki1AzFLQUkbDTG42ZN3ZsQfdRzXRlkAvbIy5Q==" }, + "@waves/ledger": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@waves/ledger/-/ledger-3.2.1.tgz", + "integrity": "sha512-qzYES2C7LT5PYqsPskfPw4XjI5AeEs8qyaK3+p/ObDMJbGvbQmqlC0LTsysZCamBJR5Rfxl6pOIOw2kLqOdCag==", + "requires": { + "@ledgerhq/hw-transport-u2f": "^4.24.0", + "babel-polyfill": "^6.26.0" + } + }, + "@waves/signature-generator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@waves/signature-generator/-/signature-generator-5.0.1.tgz", + "integrity": "sha512-uYT0X1yl//joz7skzwsw2Z0QWn3s+Zm6pqWUtapnMg1AehZr1HqMi5Qgnx6X/oExDDnb/ot6T2D6KjJAHJ0TKg==", + "requires": { + "@types/crypto-js": "^3.1.43", + "@waves/data-entities": "^1.6.0", + "base64-js": "1.3.0", + "crypto-js": "3.1.9-1" + } + }, "@waves/ts-types": { "version": "0.2.0-beta-1", "resolved": "https://registry.npmjs.org/@waves/ts-types/-/ts-types-0.2.0-beta-1.tgz", @@ -770,6 +813,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -781,6 +825,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, + "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -1445,13 +1490,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true + "dev": true, + "optional": true }, "is-glob": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, + "optional": true, "requires": { "is-extglob": "^1.0.0" } @@ -5753,7 +5800,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -5774,12 +5822,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5794,17 +5844,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5921,7 +5974,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -5933,6 +5987,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5947,6 +6002,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -5954,12 +6010,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -5978,6 +6036,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -6058,7 +6117,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -6070,6 +6130,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6155,7 +6216,8 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -6191,6 +6253,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6210,6 +6273,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6253,12 +6317,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -6397,13 +6463,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true + "dev": true, + "optional": true }, "is-glob": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, + "optional": true, "requires": { "is-extglob": "^1.0.0" } @@ -9147,11 +9215,17 @@ "chalk": "^2.0.1" } }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.4.0", @@ -10250,7 +10324,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true + "dev": true, + "optional": true }, "is-glob": { "version": "2.0.1", diff --git a/package.json b/package.json index 180f4513d8..a82c29c7c2 100644 --- a/package.json +++ b/package.json @@ -96,9 +96,10 @@ "@waves/data-entities": "^1.10.1", "@waves/data-service-client-js": "^2.0.0", "@waves/event-sender": "^0.5.0-a4", - "@waves/ledger": "^3.2.0", + "@waves/ledger": "^3.2.1", + "@waves/marshall": "^0.6.1", "@waves/oracle-data": "^0.0.6", - "@waves/signature-adapter": "^4.2.1", + "@waves/signature-adapter": "^4.3.3", "@waves/signature-generator": "^5.0.0", "@waves/ts-types": "0.0.2", "@waves/waves-browser-bus": "^0.1.4", diff --git a/ts-scripts/meta.json b/ts-scripts/meta.json index 6e77613c6b..de179c3a78 100644 --- a/ts-scripts/meta.json +++ b/ts-scripts/meta.json @@ -4,6 +4,7 @@ "node_modules/parse-json-bignumber/dist/parse-json-bignumber.min.js", "node_modules/worker-wrapper/dist/WorkerWrapper.min.js", "node_modules/handlebars/dist/handlebars.min.js", + "node_modules/@waves/marshall/dist/min/waves-marshall.min.js", "node_modules/ramda/dist/ramda.min.js", "node_modules/mobile-detect/mobile-detect.min.js", "node_modules/handlebars/dist/handlebars.min.js", diff --git a/vendors/require-modules.js b/vendors/require-modules.js index 8847bc3802..c536c52bd5 100644 --- a/vendors/require-modules.js +++ b/vendors/require-modules.js @@ -6,6 +6,7 @@ 'bignumber.js': 'BigNumber', 'ts-api-validator': 'tsApiValidator', 'parse-json-bignumber': 'parseJsonBignumber', + '@waves/marshall': 'WavesMarshall', 'papaparse': 'Papa', 'waves-api': 'WavesAPI', 'identity-img': 'identityImg', From 6128ebee0ab6dd13908234bc601dc1d2e3bba101 Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Mon, 22 Apr 2019 13:25:03 +0300 Subject: [PATCH 058/150] CLIENT-1563: add amim delete order --- src/modules/dex/directives/dexMyOrders/myOrders.less | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/dex/directives/dexMyOrders/myOrders.less b/src/modules/dex/directives/dexMyOrders/myOrders.less index edca1552a3..4de2f55623 100644 --- a/src/modules/dex/directives/dexMyOrders/myOrders.less +++ b/src/modules/dex/directives/dexMyOrders/myOrders.less @@ -25,14 +25,13 @@ w-dex-my-orders { .repeatItemTransition.ng-leave, .repeatItemTransition.ng-enter.ng-enter-active { opacity: 1; + max-height: 30px; pointer-events: none; &.pre-leave { opacity: 0.3; } - max-height: 30px; - @media screen and (max-width: 1024px) { max-height: 69px; } From dc589b4490fb9675290b00b50f9be06a46a27cd3 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Mon, 22 Apr 2019 14:25:18 +0300 Subject: [PATCH 059/150] CLIENT-1829: --- data-service/classes/DataManager.ts | 10 ++++++++-- .../setAssetScriptForm/SetAssetScriptFrom.js | 9 +++++++-- src/modules/utils/services/utils.js | 19 ++++++++++++------- .../portfolio/controllers/PortfolioCtrl.js | 2 +- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/data-service/classes/DataManager.ts b/data-service/classes/DataManager.ts index 683fc624dd..bf8812f471 100644 --- a/data-service/classes/DataManager.ts +++ b/data-service/classes/DataManager.ts @@ -60,7 +60,7 @@ export class DataManager { return this.pollControl.getPollHash().aliases.lastData || []; } - public getOracleAssetData(id: string, oracleName: string = 'oracleWaves'): TProviderAsset & { provider: string } { + public getOracleAssetDataByOracleName(id: string, oracleName: string = 'oracleWaves'): TProviderAsset & { provider: string } { let pollHash = this.pollControl.getPollHash(); const lastData = path([oracleName, 'lastData'], pollHash); const assets = lastData && lastData.assets || Object.create(null); @@ -96,7 +96,7 @@ export class DataManager { description: descriptionHash[id] }; - if (id === 'WAVES' && oracleName === 'oracleWaves') { + if (id === 'WAVES') { return { status: STATUS_LIST.VERIFIED, description: descriptionHash.WAVES } as any; } @@ -107,6 +107,12 @@ export class DataManager { return assets[id] ? { ...assets[id], provider: lastData.oracle.name } : null; } + public getOraclesAssetData (id: string) { + const dataOracleWaves = this.getOracleAssetDataByOracleName(id, 'oracleWaves'); + const dataOracleTokenomica = this.getOracleAssetDataByOracleName(id, 'oracleTokenomica'); + return dataOracleWaves || dataOracleTokenomica; + } + public getOracleData(oracleName: string) { return this.pollControl.getPollHash()[oracleName].lastData; } diff --git a/src/modules/ui/directives/setAssetScriptForm/SetAssetScriptFrom.js b/src/modules/ui/directives/setAssetScriptForm/SetAssetScriptFrom.js index 9cca7e5332..140c1de2f0 100644 --- a/src/modules/ui/directives/setAssetScriptForm/SetAssetScriptFrom.js +++ b/src/modules/ui/directives/setAssetScriptForm/SetAssetScriptFrom.js @@ -148,8 +148,13 @@ if (!asset.hasScript) { throw new Error('This asset has no script!'); } - const { isVerified, isGateway, - isTokenomica, isSuspicious, hasLabel } = utils.getDataFromOracles(asset.id); + const { + isVerified, + isGateway, + isTokenomica, + isSuspicious, + hasLabel + } = utils.getDataFromOracles(asset.id); this.isVerified = isVerified; this.isGateway = isGateway; this.isTokenomica = isTokenomica; diff --git a/src/modules/utils/services/utils.js b/src/modules/utils/services/utils.js index 8b482c9e83..df75e20bea 100644 --- a/src/modules/utils/services/utils.js +++ b/src/modules/utils/services/utils.js @@ -1063,20 +1063,25 @@ * @type {User} */ const user = $injector.get('user'); - const dataOracleWaves = ds.dataManager.getOracleAssetData(assetId, 'oracleWaves'); - const dataOracleTokenomica = ds.dataManager.getOracleAssetData(assetId, 'oracleTokenomica'); - const isVerified = path(['status'], dataOracleWaves) === STATUS_LIST.VERIFIED; - const isGateway = path(['status'], dataOracleWaves) === 3; - const isTokenomica = path(['status'], dataOracleTokenomica) === STATUS_LIST.VERIFIED; + + const dataOracle = ds.dataManager.getOraclesAssetData(assetId); + + const isGateway = path(['status'], dataOracle) === 3; + + const isTokenomica = path(['status'], dataOracle) === STATUS_LIST.VERIFIED && + path(['provider'], dataOracle) === 'Tokenomica'; + + const isVerified = path(['status'], dataOracle) === STATUS_LIST.VERIFIED && + path(['provider'], dataOracle) !== 'Tokenomica'; + const isSuspicious = user.scam[assetId]; const hasLabel = isVerified || isGateway || isSuspicious || isTokenomica; - const dataOracle = dataOracleWaves || dataOracleTokenomica; const ticker = path(['ticker'], dataOracle); const link = path(['link'], dataOracle); const email = path(['email'], dataOracle); const logo = path(['logo'], dataOracle); - const provider = isVerified || isTokenomica && path(['provider'], dataOracleWaves) || null; + const provider = isVerified || isTokenomica && path(['provider'], dataOracle) || null; const description = path(['description', 'en'], dataOracle); return { diff --git a/src/modules/wallet/modules/portfolio/controllers/PortfolioCtrl.js b/src/modules/wallet/modules/portfolio/controllers/PortfolioCtrl.js index ccb5bf0da9..742e438457 100644 --- a/src/modules/wallet/modules/portfolio/controllers/PortfolioCtrl.js +++ b/src/modules/wallet/modules/portfolio/controllers/PortfolioCtrl.js @@ -309,7 +309,7 @@ }; }) .reduce((acc, item) => { - const oracleData = ds.dataManager.getOracleAssetData(item.asset.id); + const oracleData = ds.dataManager.getOraclesAssetData(item.asset.id); if (item.asset.sender === user.address) { acc.my.push(item); From 46251599988cf01a84d326d5102258b6049c6b8e Mon Sep 17 00:00:00 2001 From: vba2000 Date: Mon, 22 Apr 2019 15:39:12 +0300 Subject: [PATCH 060/150] CLIENT-1825: fix ledger --- package-lock.json | 152 +++++++++++++----------- package.json | 2 +- src/modules/app/initialize/AppConfig.js | 4 +- ts-scripts/meta.json | 6 +- 4 files changed, 86 insertions(+), 78 deletions(-) diff --git a/package-lock.json b/package-lock.json index 32d692a84d..d50b1eb9c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -114,6 +114,27 @@ } } }, + "@babel/polyfill": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.3.tgz", + "integrity": "sha512-rkv8WIvJshA5Ev8iNMGgz5WZkRtgtiPexiT7w5qevGTuT7ZBfM3de9ox1y9JR5/OXb/sWGBbWlHNa7vQKqku3Q==", + "requires": { + "core-js": "^2.6.5", + "regenerator-runtime": "^0.13.2" + }, + "dependencies": { + "core-js": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", + "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" + }, + "regenerator-runtime": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" + } + } + }, "@babel/template": { "version": "7.0.0-beta.44", "resolved": "http://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.44.tgz", @@ -172,22 +193,18 @@ "to-fast-properties": "^2.0.0" } }, - "@ledgerhq/hw-transport": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-4.35.0.tgz", - "integrity": "sha512-o8ekdoCkHMvOByIKDmAMNDjm8Q5cu+sbqmebPtGrHAPbgIZBUbNA5UupY/Om+xypdxXYnuBw+MF8FyIVOjnIsg==", + "@ledgerhq/devices": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-4.54.0.tgz", + "integrity": "sha512-v6E4PK6bej/CmMSMVasFWWy1iyh42XaHmUpp5i992/n+PiVQQL5qnQlgXpCq2ZoFinfpnFc7y2lv3qSxAqQimQ==", "requires": { - "events": "^3.0.0" + "@ledgerhq/errors": "^4.54.0" } }, - "@ledgerhq/hw-transport-u2f": { - "version": "4.35.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-u2f/-/hw-transport-u2f-4.35.0.tgz", - "integrity": "sha512-cVPH0SNRrIKVZz9zHvulHGPSdDQiV1hCK634KZa2M2+fMVhQxUi4YRBQz7QpI88CwRyEy+sBfTfSahPWjQUN2Q==", - "requires": { - "@ledgerhq/hw-transport": "^4.35.0", - "u2f-api": "0.2.7" - } + "@ledgerhq/errors": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-4.54.0.tgz", + "integrity": "sha512-BbAiJHzw/EtIp/HBhDUTbAGj+1cYGGmnrlXSccIxt/MFwcgrX2KgPFbTIAiJJYmPkUSdY4eucyrB9YohzfGCkw==" }, "@types/babel-core": { "version": "6.25.2", @@ -611,12 +628,34 @@ } }, "@waves/ledger": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@waves/ledger/-/ledger-3.2.1.tgz", - "integrity": "sha512-qzYES2C7LT5PYqsPskfPw4XjI5AeEs8qyaK3+p/ObDMJbGvbQmqlC0LTsysZCamBJR5Rfxl6pOIOw2kLqOdCag==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@waves/ledger/-/ledger-3.3.3.tgz", + "integrity": "sha512-WOdVaPltzkF7hd1IMyLHIvfJgzGYsrrLeTihV+ML1dAu6yM84kdFI34J4eOciX9m2WAlaVFK1syKsu/t2aKF5g==", "requires": { - "@ledgerhq/hw-transport-u2f": "^4.24.0", - "babel-polyfill": "^6.26.0" + "@babel/polyfill": "^7.4.3", + "@ledgerhq/hw-transport-u2f": "^4.54.0" + }, + "dependencies": { + "@ledgerhq/hw-transport": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-4.54.0.tgz", + "integrity": "sha512-9UCr35O0Fn7ib0R9BsgY9jXHL/bGCQF66GYOD2GCwLWDVnK5eVewS6J+ljxhWOIsV75OcqJtylRO0mAGOD6tWg==", + "requires": { + "@ledgerhq/devices": "^4.54.0", + "@ledgerhq/errors": "^4.54.0", + "events": "^3.0.0" + } + }, + "@ledgerhq/hw-transport-u2f": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-u2f/-/hw-transport-u2f-4.54.0.tgz", + "integrity": "sha512-vF0Fiv+UQPfUUl1gLG2RlKjW4BuyKsLMLe8+gcOplUgzguA04LQfv3LC4qoBLG5ByNb32jsJkp38uE4moE87LA==", + "requires": { + "@ledgerhq/errors": "^4.54.0", + "@ledgerhq/hw-transport": "^4.54.0", + "u2f-api": "0.2.7" + } + } } }, "@waves/marshall": { @@ -655,15 +694,6 @@ "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.25.51.tgz", "integrity": "sha512-xcmtfHIgF9SYjhGdsZR1nQslxG4hu0cIpFfLQ4CWdw3KzHvl7ki1AzFLQUkbDTG42ZN3ZsQfdRzXRlkAvbIy5Q==" }, - "@waves/ledger": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@waves/ledger/-/ledger-3.2.1.tgz", - "integrity": "sha512-qzYES2C7LT5PYqsPskfPw4XjI5AeEs8qyaK3+p/ObDMJbGvbQmqlC0LTsysZCamBJR5Rfxl6pOIOw2kLqOdCag==", - "requires": { - "@ledgerhq/hw-transport-u2f": "^4.24.0", - "babel-polyfill": "^6.26.0" - } - }, "@waves/signature-generator": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/@waves/signature-generator/-/signature-generator-5.0.1.tgz", @@ -813,7 +843,6 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -825,7 +854,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -1490,15 +1518,13 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true, - "optional": true + "dev": true }, "is-glob": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, - "optional": true, "requires": { "is-extglob": "^1.0.0" } @@ -2192,6 +2218,7 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "dev": true, "requires": { "babel-runtime": "^6.26.0", "core-js": "^2.5.0", @@ -2266,6 +2293,7 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, "requires": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" @@ -2274,7 +2302,8 @@ "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true } } }, @@ -3642,7 +3671,8 @@ "core-js": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.0.tgz", - "integrity": "sha512-kLRC6ncVpuEW/1kwrOXYX6KQASCVtrh1gQr/UiaVgFlf9WE5Vp+lNe5+h3LuMr5PAucWnnEXwH0nQHRH/gpGtw==" + "integrity": "sha512-kLRC6ncVpuEW/1kwrOXYX6KQASCVtrh1gQr/UiaVgFlf9WE5Vp+lNe5+h3LuMr5PAucWnnEXwH0nQHRH/gpGtw==", + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -5800,8 +5830,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -5822,14 +5851,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5844,20 +5871,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -5974,8 +5998,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -5987,7 +6010,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6002,7 +6024,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6010,14 +6031,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -6036,7 +6055,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -6117,8 +6135,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -6130,7 +6147,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -6216,8 +6232,7 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -6253,7 +6268,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6273,7 +6287,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6317,14 +6330,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -6463,15 +6474,13 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true, - "optional": true + "dev": true }, "is-glob": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, - "optional": true, "requires": { "is-extglob": "^1.0.0" } @@ -9224,8 +9233,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true, - "optional": true + "dev": true }, "loose-envify": { "version": "1.4.0", @@ -10324,8 +10332,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true, - "optional": true + "dev": true }, "is-glob": { "version": "2.0.1", @@ -11304,7 +11311,8 @@ "regenerator-runtime": { "version": "0.10.5", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true }, "regenerator-transform": { "version": "0.10.1", diff --git a/package.json b/package.json index a82c29c7c2..d2a8be822e 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "@waves/data-entities": "^1.10.1", "@waves/data-service-client-js": "^2.0.0", "@waves/event-sender": "^0.5.0-a4", - "@waves/ledger": "^3.2.1", + "@waves/ledger": "^3.3.3", "@waves/marshall": "^0.6.1", "@waves/oracle-data": "^0.0.6", "@waves/signature-adapter": "^4.3.3", diff --git a/src/modules/app/initialize/AppConfig.js b/src/modules/app/initialize/AppConfig.js index ce2249d42d..01579ce5a2 100644 --- a/src/modules/app/initialize/AppConfig.js +++ b/src/modules/app/initialize/AppConfig.js @@ -2,7 +2,7 @@ 'use strict'; const config = function ($urlRouterProvider, $stateProvider, $locationProvider) { - + const TransportU2F = require('@waves/ledger/dist/transport-u2f'); const tsUtils = require('ts-utils'); ds.config.setConfig(WavesApp.network); @@ -19,7 +19,7 @@ _initAdapters() { - const Transport = window.TransportNodeHid; + const Transport = window.TransportNodeHid || TransportU2F; ds.signAdapters.adapterList.forEach((Adapter) => Adapter.initOptions({ networkCode: WavesApp.network.code.charCodeAt(0), diff --git a/ts-scripts/meta.json b/ts-scripts/meta.json index de179c3a78..59516843a8 100644 --- a/ts-scripts/meta.json +++ b/ts-scripts/meta.json @@ -18,14 +18,14 @@ "node_modules/@waves/signature-generator/dist/signature-generator.partial.min.js", "node_modules/@waves/waves-browser-bus/dist/browser-bus.min.js", "node_modules/@waves/event-sender/dist/analytics.js", - "node_modules/@waves/ledger/dist/transport-u2f.js", "node_modules/@waves/ledger/dist/waves-ledger.js", - "node_modules/@waves/signature-adapter/dist/signature-adapter.min.js", - "data-service-dist/data-service.js", + "node_modules/@waves/ledger/dist/transport-u2f.js", "node_modules/qrcode/build/qrcode.min.js", "node_modules/ts-api-validator/dist/ts-api-validator.partial.min.js", "node_modules/jquery/dist/jquery.min.js", "node_modules/d3/d3.min.js", + "node_modules/@waves/signature-adapter/dist/signature-adapter.min.js", + "data-service-dist/data-service.js", "node_modules/identity-img/dist/identity-img.min.js", "node_modules/i18next-locize-backend/i18nextLocizeBackend.min.js", "node_modules/angular/angular.min.js", From c0036d00e6f695e91bff82df12b5cd22c527aaab Mon Sep 17 00:00:00 2001 From: vba2000 Date: Mon, 22 Apr 2019 16:09:34 +0300 Subject: [PATCH 061/150] CLIENT-1825: fixes --- src/modules/app/initialize/AppConfig.js | 2 +- vendors/require-modules.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/app/initialize/AppConfig.js b/src/modules/app/initialize/AppConfig.js index 01579ce5a2..718e6a61c9 100644 --- a/src/modules/app/initialize/AppConfig.js +++ b/src/modules/app/initialize/AppConfig.js @@ -2,7 +2,7 @@ 'use strict'; const config = function ($urlRouterProvider, $stateProvider, $locationProvider) { - const TransportU2F = require('@waves/ledger/dist/transport-u2f'); + const TransportU2F = require('@ledgerhq/hw-transport-u2f'); const tsUtils = require('ts-utils'); ds.config.setConfig(WavesApp.network); diff --git a/vendors/require-modules.js b/vendors/require-modules.js index c536c52bd5..7fc31baaa8 100644 --- a/vendors/require-modules.js +++ b/vendors/require-modules.js @@ -12,8 +12,8 @@ 'identity-img': 'identityImg', '@waves/data-entities': 'dataEntities', '@waves/signature-generator': 'wavesSignatureGenerator', + '@waves/ledger/dist/transport-u2f': 'TransportU2F', '@ledgerhq/hw-transport-u2f': 'TransportU2F', - '@ledgerhq/hw-transport-node-hid': 'TransportU2F', '@waves/ledger': 'WavesLedgerJs', '@waves/signature-adapter': 'wavesSignatureAdapter', 'ramda': 'R', From 8863481a604f41c092da014c98721264835851cd Mon Sep 17 00:00:00 2001 From: Grigory Ivanov Date: Mon, 22 Apr 2019 16:23:35 +0300 Subject: [PATCH 062/150] CLIENT-1825: Up versuin + whats new 1.2.3 --- package.json | 2 +- src/modules/utils/services/whatsNew.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d2a8be822e..9fa8df8968 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "waves-client", - "version": "1.2.2", + "version": "1.2.3", "description": "The official client application for the Waves platform", "private": true, "repository": { diff --git a/src/modules/utils/services/whatsNew.js b/src/modules/utils/services/whatsNew.js index 489112516a..5c4db4d11b 100644 --- a/src/modules/utils/services/whatsNew.js +++ b/src/modules/utils/services/whatsNew.js @@ -38,7 +38,8 @@ '1.1.0', '1.2.0', '1.2.1', - '1.2.2' + '1.2.2', + '1.2.3' ]; /** From fd15457350342ead0a7af1a8f26f1b6323a19326 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Mon, 22 Apr 2019 17:04:56 +0300 Subject: [PATCH 063/150] CLIENT-1432: add notyfi emtry transactions --- .../transactions/controllers/TransactionsCtrl.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js index fdd82266da..0c9770f667 100644 --- a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js +++ b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js @@ -57,11 +57,13 @@ const MAX_LIMIT = 1000; const getSeriesTransactions = async ({ allTransactions = [], after = '' } = {}) => { - let transactions; + let downloadError = false; + try { transactions = await waves.node.transactions.list(MAX_LIMIT, after); } catch (e) { + downloadError = true; if (!allTransactions.length) { notification.error({ ns: 'app.wallet.transactions', @@ -83,7 +85,7 @@ allTransactions = allTransactions.concat(transactions.filter(el => !user.scam[el.assetId])); if (transactions.length < MAX_LIMIT || allTransactions.length > maxTransactions) { - return allTransactions; + return { allTransactions, downloadError }; } else { return getSeriesTransactions({ allTransactions, @@ -93,9 +95,15 @@ }; const promiseGetTransactions = getSeriesTransactions(); - promiseGetTransactions.then((allTransactions) => { + promiseGetTransactions.then(({ allTransactions, downloadError }) => { if (allTransactions.length) { transactionsCsvGen.generate(allTransactions); + } else if (!downloadError) { + notification.info({ + ns: 'app.wallet.transactions', + title: { literal: 'errors.download.title' }, + body: { literal: 'errors.download.body' } + }); } }); return promiseGetTransactions; From 31098d81dfeb18994c5c883b2741fcb59b02eb3e Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Mon, 22 Apr 2019 18:17:42 +0300 Subject: [PATCH 064/150] CLIENT-1432: add locales --- .../modules/transactions/controllers/TransactionsCtrl.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js index 0c9770f667..f37efdf629 100644 --- a/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js +++ b/src/modules/wallet/modules/transactions/controllers/TransactionsCtrl.js @@ -99,10 +99,10 @@ if (allTransactions.length) { transactionsCsvGen.generate(allTransactions); } else if (!downloadError) { - notification.info({ + notification.error({ ns: 'app.wallet.transactions', - title: { literal: 'errors.download.title' }, - body: { literal: 'errors.download.body' } + title: { literal: 'errors.empty.title' }, + body: { literal: 'errors.empty.body' } }); } }); From a6bcae7816502c368e0fbdc8cd6e2d8a94dc3999 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Tue, 23 Apr 2019 12:41:39 +0300 Subject: [PATCH 065/150] CLIENT-1839: fix --- .../directives/assetInfoHead/AssetInfoHead.js | 27 ++++++++++--------- .../assetInfoHead/asset-info-head.html | 21 ++++++++++++--- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js index 957f19e3ca..70b19faef3 100644 --- a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js +++ b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js @@ -6,14 +6,10 @@ * @param $scope * @param user * @param waves + * @param utils * @return {AssetInfoHead} */ - const controller = function (Base, $scope, user, waves) { - - const ds = require('data-service'); - const { path } = require('ramda'); - const { STATUS_LIST } = require('@waves/oracle-data'); - const GATEWAY = 3; + const controller = function (Base, $scope, user, waves, utils) { class AssetInfoHead extends Base { @@ -59,13 +55,20 @@ waves.node.assets.getAsset(this.assetId).then(asset => { this.assetName = asset.displayName; this.ticker = asset.ticker; + const { + isVerified, + isGateway, + isTokenomica, + isSuspicious, + hasLabel + } = utils.getDataFromOracles(asset.id); + this.isVerified = isVerified; + this.isGateway = isGateway; + this.isTokenomica = isTokenomica; + this.isSuspicious = isSuspicious; + this.hasLabel = hasLabel; $scope.$apply(); }); - const data = ds.dataManager.getOracleAssetData(this.assetId); - this.isVerified = path(['status'], data) === STATUS_LIST.VERIFIED; - this.isGateway = path(['status'], data) === GATEWAY; - this.isSuspicious = user.scam[this.assetId]; - this.hasLabel = this.isVerified || this.isGateway || this.isSuspicious; this.state = { assetId: this.assetId }; } @@ -75,7 +78,7 @@ return new AssetInfoHead(); }; - controller.$inject = ['Base', '$scope', 'user', 'waves']; + controller.$inject = ['Base', '$scope', 'user', 'waves', 'utils']; angular.module('app.ui') .component('wAssetInfoHead', { diff --git a/src/modules/ui/directives/assetInfoHead/asset-info-head.html b/src/modules/ui/directives/assetInfoHead/asset-info-head.html index 74f6b78097..6816f76426 100644 --- a/src/modules/ui/directives/assetInfoHead/asset-info-head.html +++ b/src/modules/ui/directives/assetInfoHead/asset-info-head.html @@ -2,14 +2,27 @@
+ class="asset-modal__logo big">

{{$ctrl.assetName}} - - - + + + +

{{$ctrl.ticker}}
From b185eda685f59e5c4222ee8f13d14c5a678d8181 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 23 Apr 2019 12:43:43 +0300 Subject: [PATCH 066/150] CLIENT-1777: filter candles with null values --- src/modules/dex/services/CandlesService.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/modules/dex/services/CandlesService.js b/src/modules/dex/services/CandlesService.js index de3d7487e8..c043ae0a35 100644 --- a/src/modules/dex/services/CandlesService.js +++ b/src/modules/dex/services/CandlesService.js @@ -50,19 +50,21 @@ const { options, config: candleConfig } = utils.getValidCandleOptions(from, to, interval); const promises = options.map(option => config.getDataService().getCandles(amountId, priceId, option)); - const convertBigNumber = (num) => num.isNaN() ? null : num.toNumber(); + const convertBigNumber = num => num.isNaN() ? null : num.toNumber(); const candles = Promise.all(promises) .then(pipe(map(prop('data')), flatten)) - .then(list => list.map(candle => ({ - txsCount: candle.txsCount || 0, - high: convertBigNumber(candle.high), - low: convertBigNumber(candle.low), - close: convertBigNumber(candle.close), - open: convertBigNumber(candle.open), - volume: convertBigNumber(candle.volume), - time: new Date(candle.time).getTime() - }))); + .then(list => list + .filter(candle => !candle.open.isNaN()) + .map(candle => ({ + txsCount: candle.txsCount || 0, + high: convertBigNumber(candle.high), + low: convertBigNumber(candle.low), + close: convertBigNumber(candle.close), + open: convertBigNumber(candle.open), + volume: convertBigNumber(candle.volume), + time: new Date(candle.time).getTime() + }))); const lastTrade = ds.api.pairs.get(amountId, priceId) .then(pair => waves.matcher.getLastPrice(pair) From 6ef40369167da22e6a474bb127908971c902fbad Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 23 Apr 2019 13:23:24 +0300 Subject: [PATCH 067/150] CLIENT-1777: filter only for last candle --- src/modules/dex/services/CandlesService.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/modules/dex/services/CandlesService.js b/src/modules/dex/services/CandlesService.js index c043ae0a35..b9b3e956b6 100644 --- a/src/modules/dex/services/CandlesService.js +++ b/src/modules/dex/services/CandlesService.js @@ -55,7 +55,6 @@ const candles = Promise.all(promises) .then(pipe(map(prop('data')), flatten)) .then(list => list - .filter(candle => !candle.open.isNaN()) .map(candle => ({ txsCount: candle.txsCount || 0, high: convertBigNumber(candle.high), @@ -73,15 +72,12 @@ return Promise.all([candles, lastTrade]) .then(([candles, lastTrade]) => { if (candles.length === 1 && lastTrade) { - const lastCandle = candles[candles.length - 1]; - - if (lastCandle.open != null) { - lastCandle.close = Number(lastTrade.price.toTokens()); - } + candles[candles.length - 1].close = Number(lastTrade.price.toTokens()); } else { candles = candleConfig.converter(candles); } - return candles; + return candles + .filter(candle => candle.open != null); }).catch(() => utils.wait(5000).then(() => [])); } From 0e5b4741d75275d6af1f8499e6ba86af6fa246ab Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Tue, 23 Apr 2019 14:29:41 +0300 Subject: [PATCH 068/150] CLIENT-1808: add icon headers and transfer components --- .../ui/directives/transaction/Transaction.js | 1 - .../directives/transaction/TransactionData.js | 10 ++++ .../transaction/TransactionHeader.js | 11 +++++ .../directives/transaction/TransactionIcon.js | 10 ++++ .../transaction/TransactionSubheader.js | 10 ++++ .../transaction/transaction-data.html | 5 ++ .../transaction/transaction-header.html | 2 + .../transaction/transaction-icon.html | 1 + .../transaction/transaction-subheader.html | 2 + .../directives/transaction/transaction.html | 10 ++-- .../transaction/types/transfer.html | 46 +++++++++---------- .../transaction/types/transfer/Transfer.js | 46 +++++++++++++++++++ .../transaction/types/transfer/transfer.html | 24 ++++++++++ 13 files changed, 150 insertions(+), 28 deletions(-) create mode 100644 src/modules/ui/directives/transaction/TransactionData.js create mode 100644 src/modules/ui/directives/transaction/TransactionHeader.js create mode 100644 src/modules/ui/directives/transaction/TransactionIcon.js create mode 100644 src/modules/ui/directives/transaction/TransactionSubheader.js create mode 100644 src/modules/ui/directives/transaction/transaction-data.html create mode 100644 src/modules/ui/directives/transaction/transaction-header.html create mode 100644 src/modules/ui/directives/transaction/transaction-icon.html create mode 100644 src/modules/ui/directives/transaction/transaction-subheader.html create mode 100644 src/modules/ui/directives/transaction/types/transfer/Transfer.js create mode 100644 src/modules/ui/directives/transaction/types/transfer/transfer.html diff --git a/src/modules/ui/directives/transaction/Transaction.js b/src/modules/ui/directives/transaction/Transaction.js index 89b6175d99..07f334dd4f 100644 --- a/src/modules/ui/directives/transaction/Transaction.js +++ b/src/modules/ui/directives/transaction/Transaction.js @@ -25,7 +25,6 @@ class Transaction extends Base { $postLink() { - this.templateUrl = `${PATH}/${this.transaction.templateType}.html`; this.time = $filter('date')(this.transaction.timestamp, this.datePattern || 'HH:mm'); this.shownAddress = this.transaction.shownAddress; diff --git a/src/modules/ui/directives/transaction/TransactionData.js b/src/modules/ui/directives/transaction/TransactionData.js new file mode 100644 index 0000000000..b8976af348 --- /dev/null +++ b/src/modules/ui/directives/transaction/TransactionData.js @@ -0,0 +1,10 @@ +(function () { + 'use strict'; + + angular.module('app.ui').component('wTransactionData', { + bindings: { + transaction: '<' + }, + templateUrl: 'modules/ui/directives/transaction/transaction-data.html' + }); +})(); diff --git a/src/modules/ui/directives/transaction/TransactionHeader.js b/src/modules/ui/directives/transaction/TransactionHeader.js new file mode 100644 index 0000000000..f1ce42c254 --- /dev/null +++ b/src/modules/ui/directives/transaction/TransactionHeader.js @@ -0,0 +1,11 @@ +(function () { + 'use strict'; + + angular.module('app.ui').component('wTransactionHeader', { + bindings: { + typeName: '<', + assetName: '<' + }, + templateUrl: 'modules/ui/directives/transaction/transaction-header.html' + }); +})(); diff --git a/src/modules/ui/directives/transaction/TransactionIcon.js b/src/modules/ui/directives/transaction/TransactionIcon.js new file mode 100644 index 0000000000..055bef3690 --- /dev/null +++ b/src/modules/ui/directives/transaction/TransactionIcon.js @@ -0,0 +1,10 @@ +(function () { + 'use strict'; + + angular.module('app.ui').component('wTransactionIcon', { + bindings: { + typeName: '<' + }, + templateUrl: 'modules/ui/directives/transaction/transaction-icon.html' + }); +})(); diff --git a/src/modules/ui/directives/transaction/TransactionSubheader.js b/src/modules/ui/directives/transaction/TransactionSubheader.js new file mode 100644 index 0000000000..448066b36f --- /dev/null +++ b/src/modules/ui/directives/transaction/TransactionSubheader.js @@ -0,0 +1,10 @@ +(function () { + 'use strict'; + + angular.module('app.ui').component('wTransactionSubheader', { + bindings: { + typeName: '<' + }, + templateUrl: 'modules/ui/directives/transaction/transaction-subheader.html' + }); +})(); diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-data.html new file mode 100644 index 0000000000..b6a148197e --- /dev/null +++ b/src/modules/ui/directives/transaction/transaction-data.html @@ -0,0 +1,5 @@ +
+
kek
+ + +
diff --git a/src/modules/ui/directives/transaction/transaction-header.html b/src/modules/ui/directives/transaction/transaction-header.html new file mode 100644 index 0000000000..f420094820 --- /dev/null +++ b/src/modules/ui/directives/transaction/transaction-header.html @@ -0,0 +1,2 @@ + diff --git a/src/modules/ui/directives/transaction/transaction-icon.html b/src/modules/ui/directives/transaction/transaction-icon.html new file mode 100644 index 0000000000..3497176e38 --- /dev/null +++ b/src/modules/ui/directives/transaction/transaction-icon.html @@ -0,0 +1 @@ +
diff --git a/src/modules/ui/directives/transaction/transaction-subheader.html b/src/modules/ui/directives/transaction/transaction-subheader.html new file mode 100644 index 0000000000..33ebf70549 --- /dev/null +++ b/src/modules/ui/directives/transaction/transaction-subheader.html @@ -0,0 +1,2 @@ + diff --git a/src/modules/ui/directives/transaction/transaction.html b/src/modules/ui/directives/transaction/transaction.html index 7000ae2a27..fd72313958 100644 --- a/src/modules/ui/directives/transaction/transaction.html +++ b/src/modules/ui/directives/transaction/transaction.html @@ -1,9 +1,11 @@
-
-
- -
+ + + + + + diff --git a/src/modules/ui/directives/transaction/types/transfer.html b/src/modules/ui/directives/transaction/types/transfer.html index 0c1e183ccc..a3b1ff1ebf 100644 --- a/src/modules/ui/directives/transaction/types/transfer.html +++ b/src/modules/ui/directives/transaction/types/transfer.html @@ -1,23 +1,23 @@ -
-
-
- - -
-
- -
-
-
-
- -
-
- -
-
-
+ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/ui/directives/transaction/types/transfer/Transfer.js b/src/modules/ui/directives/transaction/types/transfer/Transfer.js new file mode 100644 index 0000000000..8eac6df66b --- /dev/null +++ b/src/modules/ui/directives/transaction/types/transfer/Transfer.js @@ -0,0 +1,46 @@ +(function () { + 'use strict'; + + /** + * @param {User} user + * @return {Transfer} + */ + + const controller = function (user) { + + class Transfer { + + $postLink() { + this.typeName = this.transaction.typeName; + this.assetName = this.getAssetName(this.transaction.amount.asset); + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + } + + return new Transfer(); + }; + + controller.$inject = [ + 'user' + ]; + + angular.module('app.ui').component('wTransfer', { + bindings: { + transaction: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/transfer/transfer.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/transfer/transfer.html b/src/modules/ui/directives/transaction/types/transfer/transfer.html new file mode 100644 index 0000000000..91fd8a7f3f --- /dev/null +++ b/src/modules/ui/directives/transaction/types/transfer/transfer.html @@ -0,0 +1,24 @@ +
+
+
+ + + +
+
+ + + +
+ + + + + + + + + + +
+
From 6cd6407f1ab76c94410891b8d4df8a84167f4708 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Tue, 23 Apr 2019 14:33:46 +0300 Subject: [PATCH 069/150] CLIENT-1796: remove useless --- src/modules/utils/modals/settings/SettingsCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/utils/modals/settings/SettingsCtrl.js b/src/modules/utils/modals/settings/SettingsCtrl.js index fa8fb7232a..264a96241a 100644 --- a/src/modules/utils/modals/settings/SettingsCtrl.js +++ b/src/modules/utils/modals/settings/SettingsCtrl.js @@ -165,7 +165,7 @@ } }); - this.observe(['node', 'matcher', 'api'], () => { + this.observe(['node', 'matcher'], () => { ds.config.setConfig({ node: this.node, matcher: this.matcher From 494c2cadd82cb2603369e5b0ac2ad2500b0e44e1 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Tue, 23 Apr 2019 15:46:37 +0300 Subject: [PATCH 070/150] CLIENT-1839: add assetStatus --- .../assetInfoHead/asset-info-head.html | 1 + .../ui/directives/assetStatus/AssetStatus.js | 84 +++++++++++++++++++ .../directives/assetStatus/asset-status.html | 16 ++++ .../directives/assetStatus/assetStatus.less | 3 + .../assets/directives/asset/asset.html | 22 +++-- 5 files changed, 114 insertions(+), 12 deletions(-) create mode 100644 src/modules/ui/directives/assetStatus/AssetStatus.js create mode 100644 src/modules/ui/directives/assetStatus/asset-status.html create mode 100644 src/modules/ui/directives/assetStatus/assetStatus.less diff --git a/src/modules/ui/directives/assetInfoHead/asset-info-head.html b/src/modules/ui/directives/assetInfoHead/asset-info-head.html index 6816f76426..34f7aa1ac6 100644 --- a/src/modules/ui/directives/assetInfoHead/asset-info-head.html +++ b/src/modules/ui/directives/assetInfoHead/asset-info-head.html @@ -7,6 +7,7 @@

{{$ctrl.assetName}} + + + + diff --git a/src/modules/ui/directives/assetStatus/assetStatus.less b/src/modules/ui/directives/assetStatus/assetStatus.less new file mode 100644 index 0000000000..afc20720e9 --- /dev/null +++ b/src/modules/ui/directives/assetStatus/assetStatus.less @@ -0,0 +1,3 @@ +w-asset-status { + display: inline-flex; +} diff --git a/src/modules/wallet/modules/assets/directives/asset/asset.html b/src/modules/wallet/modules/assets/directives/asset/asset.html index d1a094f164..b2de1723ea 100644 --- a/src/modules/wallet/modules/assets/directives/asset/asset.html +++ b/src/modules/wallet/modules/assets/directives/asset/asset.html @@ -5,14 +5,8 @@ ng-click="$ctrl.onClick({event: $event, asset: $ctrl.balance.asset, action: 'info'})"> {{::$ctrl.balance.asset.name}} -
- -
-
- -
-
- +
+
+ id="Shape-Copy-2" + transform="translate(8.518912, 9.747136) scale(-1, 1) rotate(-180.000000) translate(-8.518912, -9.747136) "> + id="Shape-Copy-3" + transform="translate(8.518912, 4.747136) scale(-1, 1) rotate(-180.000000) translate(-8.518912, -4.747136) ">
@@ -56,9 +52,11 @@

+ id="Shape-Copy-2" + transform="translate(8.518912, 9.747136) scale(-1, 1) rotate(-180.000000) translate(-8.518912, -9.747136) "> + id="Shape-Copy-3" + transform="translate(8.518912, 4.747136) scale(-1, 1) rotate(-180.000000) translate(-8.518912, -4.747136) ">

From 4c77968cc48e0321170b6cb4bf05f2b776e04e57 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Tue, 23 Apr 2019 16:11:52 +0300 Subject: [PATCH 071/150] CLIENT-1839: delete --- .../assetInfoHead/asset-info-head.html | 16 ---------- .../ui/directives/assetStatus/AssetStatus.js | 30 ------------------- 2 files changed, 46 deletions(-) diff --git a/src/modules/ui/directives/assetInfoHead/asset-info-head.html b/src/modules/ui/directives/assetInfoHead/asset-info-head.html index 34f7aa1ac6..7a62a4b3fb 100644 --- a/src/modules/ui/directives/assetInfoHead/asset-info-head.html +++ b/src/modules/ui/directives/assetInfoHead/asset-info-head.html @@ -8,22 +8,6 @@

{{$ctrl.assetName}} - - - -

{{$ctrl.ticker}}
diff --git a/src/modules/ui/directives/assetStatus/AssetStatus.js b/src/modules/ui/directives/assetStatus/AssetStatus.js index 4ec16a851a..f366780d84 100644 --- a/src/modules/ui/directives/assetStatus/AssetStatus.js +++ b/src/modules/ui/directives/assetStatus/AssetStatus.js @@ -13,36 +13,6 @@ class AssetInfoHead extends Base { - /** - * @param {object} - * @type {{this}} - */ - state; - /** - * @type {Signable} - */ - signable; - /** - * @type {number} - */ - step = 0; - /** - * @type {boolean} - */ - isVerified; - /** - * @type {boolean} - */ - isGateway; - /** - * @type {boolean} - */ - isSuspicious; - /** - * @type {string} - */ - assetName; - $postLink() { this._getAssetInfo(); this.observe('assetId', this._getAssetInfo); From 59b2f59314d6ae1a6418c5657aa20a68c984ae7c Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Tue, 23 Apr 2019 17:12:26 +0300 Subject: [PATCH 072/150] CLIENT-1839: delete code --- .../setAssetScriptForm/SetAssetScriptFrom.js | 32 ++----------------- .../utils/modals/assetInfo/AssetInfoCtrl.js | 12 ++----- .../changeToken/TokenChangeModalCtrl.js | 8 ----- 3 files changed, 4 insertions(+), 48 deletions(-) diff --git a/src/modules/ui/directives/setAssetScriptForm/SetAssetScriptFrom.js b/src/modules/ui/directives/setAssetScriptForm/SetAssetScriptFrom.js index 140c1de2f0..ab56f41723 100644 --- a/src/modules/ui/directives/setAssetScriptForm/SetAssetScriptFrom.js +++ b/src/modules/ui/directives/setAssetScriptForm/SetAssetScriptFrom.js @@ -12,7 +12,7 @@ * @param {User} user * @param {BalanceWatcher} balanceWatcher */ - const controller = function (Base, waves, $scope, user, balanceWatcher, utils) { + const controller = function (Base, waves, $scope, user, balanceWatcher) { const analytics = require('@waves/event-sender'); @@ -49,22 +49,6 @@ * @type {Money} */ fee; - /** - * @type {boolean} - */ - isVerified; - /** - * @type {boolean} - */ - isGateway; - /** - * @type {boolean} - */ - isSuspicious; - /** - * @type {boolean} - */ - hasLabel; /** * @type {function(data: {signable: Signable}): void} */ @@ -148,18 +132,6 @@ if (!asset.hasScript) { throw new Error('This asset has no script!'); } - const { - isVerified, - isGateway, - isTokenomica, - isSuspicious, - hasLabel - } = utils.getDataFromOracles(asset.id); - this.isVerified = isVerified; - this.isGateway = isGateway; - this.isTokenomica = isTokenomica; - this.isSuspicious = isSuspicious; - this.hasLabel = hasLabel; this.asset = asset; $scope.$apply(); }); @@ -201,7 +173,7 @@ return new SetAssetScriptFrom(); }; - controller.$inject = ['Base', 'waves', '$scope', 'user', 'balanceWatcher', 'utils']; + controller.$inject = ['Base', 'waves', '$scope', 'user', 'balanceWatcher']; angular.module('app.ui').component('wSetAssetScriptFrom', { bindings: { diff --git a/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js b/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js index e19cf25c99..2e0ecd5ddc 100644 --- a/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js +++ b/src/modules/utils/modals/assetInfo/AssetInfoCtrl.js @@ -36,18 +36,10 @@ this.transactionsPending = true; const { - isVerified, isGateway, isTokenomica, isSuspicious, - hasLabel, ticker, link, email, provider, description + link, email, provider, description } = utils.getDataFromOracles(this.asset.id); - this.isVerified = isVerified; - this.isGateway = isGateway; - this.isTokenomica = isTokenomica; - this.isSuspicious = isSuspicious; - this.hasLabel = hasLabel; - - // this.ticker = path(['ticker'], data); // TODO STEP 2 - this.ticker = this.asset.ticker || ticker; // TODO STEP 2 + // this.ticker = path(['ticker'], data); // TODO STEP 2= this.link = link; this.email = email; diff --git a/src/modules/utils/modals/changeToken/TokenChangeModalCtrl.js b/src/modules/utils/modals/changeToken/TokenChangeModalCtrl.js index 40a86646d7..db45ed28e2 100644 --- a/src/modules/utils/modals/changeToken/TokenChangeModalCtrl.js +++ b/src/modules/utils/modals/changeToken/TokenChangeModalCtrl.js @@ -70,17 +70,9 @@ this._waves = null; const { - isVerified, - isGateway, - isTokenomica, - ticker, description } = utils.getDataFromOracles(money.asset); - this.isVerified = isVerified; - this.isGateway = isGateway; - this.isTokenomica = isTokenomica; - this.ticker = ticker || money.asset.ticker; this.description = description || money.asset.description; const { TokenChangeModalCtrl = {} } = user.getThemeSettings(); From 2a69ac27e84f937b6d327a3195a2128e8a2a27e2 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 23 Apr 2019 17:40:28 +0300 Subject: [PATCH 073/150] CLIENT-1772: edit setInterval --- server.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/server.ts b/server.ts index f35f9f54f9..55ac1e8b95 100644 --- a/server.ts +++ b/server.ts @@ -21,6 +21,7 @@ const privateKey = readFileSync('localhost.key').toString(); const certificate = readFileSync('localhost.crt').toString(); const args = parseArguments() || Object.create(null); +let startDate = new Date(); const handler = function (req, res) { const url = parse(req.url); @@ -78,11 +79,18 @@ function createMyServer(port) { } getLocales(cachePath).then(() => { const localesTimer = setInterval(function() { - getLocales(cachePath) - .catch(err => console.log(err)) - }, 60 * 10000); + const currentDate = new Date(); + if ((currentDate.getTime() - startDate.getTime()) > 60 * 10000) { + startDate = currentDate; + getLocales(cachePath) + .catch(err => console.log(err)) + } + + }, 10000); localesTimer.unref(); + + }); if (args.openUrl) { From 5e6f40e82567bc5b06b256b5239b89e6f82de843 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Tue, 23 Apr 2019 17:52:01 +0300 Subject: [PATCH 074/150] CLIENT-1839: fix double plate --- src/modules/ui/directives/assetStatus/AssetStatus.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/ui/directives/assetStatus/AssetStatus.js b/src/modules/ui/directives/assetStatus/AssetStatus.js index f366780d84..55591b77cf 100644 --- a/src/modules/ui/directives/assetStatus/AssetStatus.js +++ b/src/modules/ui/directives/assetStatus/AssetStatus.js @@ -29,10 +29,10 @@ isSuspicious, hasLabel } = utils.getDataFromOracles(this.assetId); - this.isVerified = isVerified; this.isGateway = isGateway; - this.isTokenomica = isTokenomica; - this.isSuspicious = isSuspicious; + this.isTokenomica = isGateway ? false : isTokenomica; + this.isVerified = isTokenomica ? false : isVerified; + this.isSuspicious = isVerified ? false : isSuspicious; this.hasLabel = hasLabel; } From 7056961b633a36bf137625a2a3ec5112e1be8b79 Mon Sep 17 00:00:00 2001 From: Alexand Andreev Date: Tue, 23 Apr 2019 17:54:30 +0300 Subject: [PATCH 075/150] CLIENT-1839: fix asset info head --- .../directives/assetInfoHead/AssetInfoHead.js | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js index 70b19faef3..9fc2017c91 100644 --- a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js +++ b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js @@ -13,31 +13,6 @@ class AssetInfoHead extends Base { - /** - * @param {object} - * @type {{this}} - */ - state; - /** - * @type {Signable} - */ - signable; - /** - * @type {number} - */ - step = 0; - /** - * @type {boolean} - */ - isVerified; - /** - * @type {boolean} - */ - isGateway; - /** - * @type {boolean} - */ - isSuspicious; /** * @type {string} */ @@ -55,17 +30,7 @@ waves.node.assets.getAsset(this.assetId).then(asset => { this.assetName = asset.displayName; this.ticker = asset.ticker; - const { - isVerified, - isGateway, - isTokenomica, - isSuspicious, - hasLabel - } = utils.getDataFromOracles(asset.id); - this.isVerified = isVerified; - this.isGateway = isGateway; - this.isTokenomica = isTokenomica; - this.isSuspicious = isSuspicious; + const { hasLabel } = utils.getDataFromOracles(asset.id); this.hasLabel = hasLabel; $scope.$apply(); }); From 62e7f3c4a0dc249cb9fcff4a0934bf3e72c3cd35 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 23 Apr 2019 18:01:11 +0300 Subject: [PATCH 076/150] CLIENT-1813: remove underscores --- src/modules/desktop/templates/desktop.html | 2 +- src/modules/import/templates/import.html | 2 +- src/modules/ledger/templates/ledger.html | 2 +- src/modules/tokens/templates/tokens.html | 2 +- src/modules/ui/directives/scriptTxForm/script-form.html | 2 +- src/modules/wallet/modules/leasing/templates/leasing.html | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/desktop/templates/desktop.html b/src/modules/desktop/templates/desktop.html index 86446c3bc7..30628ac073 100644 --- a/src/modules/desktop/templates/desktop.html +++ b/src/modules/desktop/templates/desktop.html @@ -27,6 +27,6 @@ - +
diff --git a/src/modules/import/templates/import.html b/src/modules/import/templates/import.html index d6cc073713..4b425e1396 100644 --- a/src/modules/import/templates/import.html +++ b/src/modules/import/templates/import.html @@ -39,7 +39,7 @@ diff --git a/src/modules/ledger/templates/ledger.html b/src/modules/ledger/templates/ledger.html index c295bccb68..48d7bf2819 100644 --- a/src/modules/ledger/templates/ledger.html +++ b/src/modules/ledger/templates/ledger.html @@ -21,7 +21,7 @@

-
+
diff --git a/src/modules/tokens/templates/tokens.html b/src/modules/tokens/templates/tokens.html index 3b8a1aab3b..a13c74b5c1 100644 --- a/src/modules/tokens/templates/tokens.html +++ b/src/modules/tokens/templates/tokens.html @@ -187,7 +187,7 @@
+ w-i18n="fee">
diff --git a/src/modules/ui/directives/scriptTxForm/script-form.html b/src/modules/ui/directives/scriptTxForm/script-form.html index f7d0c4e0cd..904b5e0c2c 100644 --- a/src/modules/ui/directives/scriptTxForm/script-form.html +++ b/src/modules/ui/directives/scriptTxForm/script-form.html @@ -1,6 +1,6 @@ -
+
- + From a0ad99c8c1495f7f2f6389413553b5f86ee47056 Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Tue, 23 Apr 2019 18:13:02 +0300 Subject: [PATCH 077/150] CLIENT-1821: update-logo-dash --- src/img/assets/dash.svg | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/img/assets/dash.svg b/src/img/assets/dash.svg index 3978488386..5b78121bf3 100644 --- a/src/img/assets/dash.svg +++ b/src/img/assets/dash.svg @@ -1,8 +1,6 @@ - - - - - + + + From 465254aa17d66d3eb1c6da7381bb4d3310deb768 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Tue, 23 Apr 2019 18:45:21 +0300 Subject: [PATCH 078/150] CLIENT-1808: refactoring save --- .../transaction/TransactionAmount.js | 11 ++++++ .../directives/transaction/TransactionData.js | 30 ++++++++++++++- .../transaction/TransactionSubheader.js | 1 + .../transaction/transaction-amount.html | 2 + .../transaction/transaction-data.html | 5 +-- .../transaction/transaction-subheader.html | 2 +- .../transaction/types/transfer/Transfer.js | 37 ++++++++++++++++--- .../transaction/types/transfer/transfer.html | 28 +++++++------- 8 files changed, 92 insertions(+), 24 deletions(-) create mode 100644 src/modules/ui/directives/transaction/TransactionAmount.js create mode 100644 src/modules/ui/directives/transaction/transaction-amount.html diff --git a/src/modules/ui/directives/transaction/TransactionAmount.js b/src/modules/ui/directives/transaction/TransactionAmount.js new file mode 100644 index 0000000000..906d905040 --- /dev/null +++ b/src/modules/ui/directives/transaction/TransactionAmount.js @@ -0,0 +1,11 @@ +(function () { + 'use strict'; + + angular.module('app.ui').component('wTransactionAmount', { + bindings: { + params: '<', + typeName: '<' + }, + templateUrl: 'modules/ui/directives/transaction/transaction-amount.html' + }); +})(); diff --git a/src/modules/ui/directives/transaction/TransactionData.js b/src/modules/ui/directives/transaction/TransactionData.js index b8976af348..c6cfd1b545 100644 --- a/src/modules/ui/directives/transaction/TransactionData.js +++ b/src/modules/ui/directives/transaction/TransactionData.js @@ -1,10 +1,38 @@ (function () { 'use strict'; + /** + * @param $filter + * @return {TransactionData} + */ + + const controller = function ($filter) { + + class TransactionData { + + $postLink() { + this.type = this.transaction.type; + this.props = { + ...this.transaction, + time: $filter('date')(this.transaction.timestamp, this.datePattern || 'HH:mm'), + formatedAmount: this.transaction.amount.toFormat() + }; + } + + } + + return new TransactionData(); + }; + + controller.$inject = [ + '$filter' + ]; + angular.module('app.ui').component('wTransactionData', { bindings: { transaction: '<' }, - templateUrl: 'modules/ui/directives/transaction/transaction-data.html' + templateUrl: 'modules/ui/directives/transaction/transaction-data.html', + controller }); })(); diff --git a/src/modules/ui/directives/transaction/TransactionSubheader.js b/src/modules/ui/directives/transaction/TransactionSubheader.js index 448066b36f..7573c91c36 100644 --- a/src/modules/ui/directives/transaction/TransactionSubheader.js +++ b/src/modules/ui/directives/transaction/TransactionSubheader.js @@ -3,6 +3,7 @@ angular.module('app.ui').component('wTransactionSubheader', { bindings: { + params: '<', typeName: '<' }, templateUrl: 'modules/ui/directives/transaction/transaction-subheader.html' diff --git a/src/modules/ui/directives/transaction/transaction-amount.html b/src/modules/ui/directives/transaction/transaction-amount.html new file mode 100644 index 0000000000..7ff6b1beb7 --- /dev/null +++ b/src/modules/ui/directives/transaction/transaction-amount.html @@ -0,0 +1,2 @@ + diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-data.html index b6a148197e..c5bef37930 100644 --- a/src/modules/ui/directives/transaction/transaction-data.html +++ b/src/modules/ui/directives/transaction/transaction-data.html @@ -1,5 +1,4 @@
-
kek
- - +
kek
+
diff --git a/src/modules/ui/directives/transaction/transaction-subheader.html b/src/modules/ui/directives/transaction/transaction-subheader.html index 33ebf70549..efa8de815a 100644 --- a/src/modules/ui/directives/transaction/transaction-subheader.html +++ b/src/modules/ui/directives/transaction/transaction-subheader.html @@ -1,2 +1,2 @@ + params="$ctrl.params"> diff --git a/src/modules/ui/directives/transaction/types/transfer/Transfer.js b/src/modules/ui/directives/transaction/types/transfer/Transfer.js index 8eac6df66b..13fc548f23 100644 --- a/src/modules/ui/directives/transaction/types/transfer/Transfer.js +++ b/src/modules/ui/directives/transaction/types/transfer/Transfer.js @@ -3,16 +3,41 @@ /** * @param {User} user + * @param {BaseAssetService} baseAssetService + * @param {$rootScope.Scope} $scope * @return {Transfer} */ - const controller = function (user) { + const controller = function (user, baseAssetService, $scope) { class Transfer { + /** + * {object} + */ + props = null; + $postLink() { - this.typeName = this.transaction.typeName; - this.assetName = this.getAssetName(this.transaction.amount.asset); + this.typeName = this.props.typeName; + this.assetName = this.getAssetName(this.props.amount.asset); + this.subheaderParams = { + time: this.props.time, + address: this.props.shownAddress + }; + this.amountParams = { + amount: this.props.formatedAmount, + name: this.props.amount.asset.name + }; + if (this.props.amount && this.props.amount instanceof ds.wavesDataEntities.Money) { + baseAssetService.convertToBaseAsset(this.props.amount) + .then((baseMoney) => { + this.mirrorBalanceParams = { + amount: baseMoney.toFormat(), + name: baseMoney.asset.name + }; + $scope.$digest(); + }); + } } /** @@ -33,12 +58,14 @@ }; controller.$inject = [ - 'user' + 'user', + 'baseAssetService', + '$scope' ]; angular.module('app.ui').component('wTransfer', { bindings: { - transaction: '<' + props: '<' }, templateUrl: 'modules/ui/directives/transaction/types/transfer/transfer.html', controller diff --git a/src/modules/ui/directives/transaction/types/transfer/transfer.html b/src/modules/ui/directives/transaction/types/transfer/transfer.html index 91fd8a7f3f..d0082d506d 100644 --- a/src/modules/ui/directives/transaction/types/transfer/transfer.html +++ b/src/modules/ui/directives/transaction/types/transfer/transfer.html @@ -1,24 +1,24 @@
- +
- - - + +
+
+
+
+ +
+
+
- - - - - - - - - -
From 1efcc14588f6b364087f1de2c5c0b07998d7596e Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Wed, 24 Apr 2019 11:19:48 +0300 Subject: [PATCH 079/150] CLIENT-1808: add create-alias component --- .../directives/transaction/TransactionData.js | 6 ++-- .../transaction/transaction-data.html | 3 +- .../types/create-alias/CreateAlias.js | 33 +++++++++++++++++++ .../types/create-alias/create-alias.html | 13 ++++++++ .../transaction/types/transfer/Transfer.js | 2 +- 5 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 src/modules/ui/directives/transaction/types/create-alias/CreateAlias.js create mode 100644 src/modules/ui/directives/transaction/types/create-alias/create-alias.html diff --git a/src/modules/ui/directives/transaction/TransactionData.js b/src/modules/ui/directives/transaction/TransactionData.js index c6cfd1b545..cc25ec508c 100644 --- a/src/modules/ui/directives/transaction/TransactionData.js +++ b/src/modules/ui/directives/transaction/TransactionData.js @@ -14,8 +14,7 @@ this.type = this.transaction.type; this.props = { ...this.transaction, - time: $filter('date')(this.transaction.timestamp, this.datePattern || 'HH:mm'), - formatedAmount: this.transaction.amount.toFormat() + time: $filter('date')(this.transaction.timestamp, this.datePattern || 'HH:mm') }; } @@ -30,7 +29,8 @@ angular.module('app.ui').component('wTransactionData', { bindings: { - transaction: '<' + transaction: '<', + datePattern: '@' }, templateUrl: 'modules/ui/directives/transaction/transaction-data.html', controller diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-data.html index c5bef37930..8eb4e38237 100644 --- a/src/modules/ui/directives/transaction/transaction-data.html +++ b/src/modules/ui/directives/transaction/transaction-data.html @@ -1,4 +1,5 @@
-
kek
+
kek
+
diff --git a/src/modules/ui/directives/transaction/types/create-alias/CreateAlias.js b/src/modules/ui/directives/transaction/types/create-alias/CreateAlias.js new file mode 100644 index 0000000000..39f95158d4 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/create-alias/CreateAlias.js @@ -0,0 +1,33 @@ +(function () { + 'use strict'; + + const controller = function () { + + class CreateAlias { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.subheaderParams = { + time: this.props.time, + alias: this.props.alias + }; + } + + } + + return new CreateAlias(); + }; + + angular.module('app.ui').component('wCreateAlias', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/create-alias/create-alias.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/create-alias/create-alias.html b/src/modules/ui/directives/transaction/types/create-alias/create-alias.html new file mode 100644 index 0000000000..1ed0a503b6 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/create-alias/create-alias.html @@ -0,0 +1,13 @@ +
+
+
+ +
+
+ +
+
+
+
diff --git a/src/modules/ui/directives/transaction/types/transfer/Transfer.js b/src/modules/ui/directives/transaction/types/transfer/Transfer.js index 13fc548f23..ca9f242582 100644 --- a/src/modules/ui/directives/transaction/types/transfer/Transfer.js +++ b/src/modules/ui/directives/transaction/types/transfer/Transfer.js @@ -25,7 +25,7 @@ address: this.props.shownAddress }; this.amountParams = { - amount: this.props.formatedAmount, + amount: this.props.amount.toFormat(), name: this.props.amount.asset.name }; if (this.props.amount && this.props.amount instanceof ds.wavesDataEntities.Money) { From c14b068dfec4d191b822512d65dd38cf795ffa10 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Wed, 24 Apr 2019 11:21:15 +0300 Subject: [PATCH 080/150] CLIENT-1808: fix create-alias component --- .../transaction/types/create-alias/create-alias.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/ui/directives/transaction/types/create-alias/create-alias.html b/src/modules/ui/directives/transaction/types/create-alias/create-alias.html index 1ed0a503b6..862e19191e 100644 --- a/src/modules/ui/directives/transaction/types/create-alias/create-alias.html +++ b/src/modules/ui/directives/transaction/types/create-alias/create-alias.html @@ -1,8 +1,7 @@
- +
Date: Wed, 24 Apr 2019 11:57:37 +0300 Subject: [PATCH 081/150] CLIENT-1808: add mass-transfer --- src/modules/ui/directives/transaction/transaction-data.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-data.html index 8eb4e38237..f87c6be057 100644 --- a/src/modules/ui/directives/transaction/transaction-data.html +++ b/src/modules/ui/directives/transaction/transaction-data.html @@ -1,5 +1,4 @@
-
kek
- +
From 83680ccb9bab526363b7c92ce19c2cfe3470b7e9 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Wed, 24 Apr 2019 12:58:38 +0300 Subject: [PATCH 082/150] CLIENT-1808: add lease --- .../ui/directives/transaction/Transaction.js | 1 - .../directives/transaction/TransactionData.js | 2 +- .../transaction/transaction-data.html | 1 + .../directives/transaction/transaction.html | 6 +-- .../transaction/types/lease/lease.html | 20 ++++++++++ .../transaction/types/lease/lease.js | 37 +++++++++++++++++++ 6 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 src/modules/ui/directives/transaction/types/lease/lease.html create mode 100644 src/modules/ui/directives/transaction/types/lease/lease.js diff --git a/src/modules/ui/directives/transaction/Transaction.js b/src/modules/ui/directives/transaction/Transaction.js index 07f334dd4f..434f9842fc 100644 --- a/src/modules/ui/directives/transaction/Transaction.js +++ b/src/modules/ui/directives/transaction/Transaction.js @@ -21,7 +21,6 @@ waves, user, baseAssetService, utils, $scope) { const { SIGN_TYPE } = require('@waves/signature-adapter'); - class Transaction extends Base { $postLink() { diff --git a/src/modules/ui/directives/transaction/TransactionData.js b/src/modules/ui/directives/transaction/TransactionData.js index cc25ec508c..3774e02f97 100644 --- a/src/modules/ui/directives/transaction/TransactionData.js +++ b/src/modules/ui/directives/transaction/TransactionData.js @@ -30,7 +30,7 @@ angular.module('app.ui').component('wTransactionData', { bindings: { transaction: '<', - datePattern: '@' + datePattern: '<' }, templateUrl: 'modules/ui/directives/transaction/transaction-data.html', controller diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-data.html index f87c6be057..ad99488bb6 100644 --- a/src/modules/ui/directives/transaction/transaction-data.html +++ b/src/modules/ui/directives/transaction/transaction-data.html @@ -1,4 +1,5 @@
+
diff --git a/src/modules/ui/directives/transaction/transaction.html b/src/modules/ui/directives/transaction/transaction.html index fd72313958..0d57798ce9 100644 --- a/src/modules/ui/directives/transaction/transaction.html +++ b/src/modules/ui/directives/transaction/transaction.html @@ -1,11 +1,9 @@
- - - - + diff --git a/src/modules/ui/directives/transaction/types/lease/lease.html b/src/modules/ui/directives/transaction/types/lease/lease.html new file mode 100644 index 0000000000..9a10510fc3 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/lease/lease.html @@ -0,0 +1,20 @@ +
+
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+ diff --git a/src/modules/ui/directives/transaction/types/lease/lease.js b/src/modules/ui/directives/transaction/types/lease/lease.js new file mode 100644 index 0000000000..942c9fe9b5 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/lease/lease.js @@ -0,0 +1,37 @@ +(function () { + 'use strict'; + + const controller = function () { + + class Lease { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.subheaderParams = { + time: this.props.time, + address: this.props.shownAddress + }; + this.amountParams = { + amount: this.props.amount.toFormat(), + name: this.props.amount.asset.name + }; + } + + } + + return new Lease(); + }; + + angular.module('app.ui').component('wLease', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/lease/lease.html', + controller + }); +})(); From 6541f035337af6999908fbbddc2d94924804564a Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Wed, 24 Apr 2019 13:19:46 +0300 Subject: [PATCH 083/150] CLIENT-1808: add cancel-leasing --- .../transaction/transaction-data.html | 1 + .../directives/transaction/transaction.html | 46 +++++++++---------- .../types/cancel-leasing/CancelLeasing.js | 37 +++++++++++++++ .../types/cancel-leasing/cancel-leasing.html | 18 ++++++++ 4 files changed, 79 insertions(+), 23 deletions(-) create mode 100644 src/modules/ui/directives/transaction/types/cancel-leasing/CancelLeasing.js create mode 100644 src/modules/ui/directives/transaction/types/cancel-leasing/cancel-leasing.html diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-data.html index ad99488bb6..f83ab6c221 100644 --- a/src/modules/ui/directives/transaction/transaction-data.html +++ b/src/modules/ui/directives/transaction/transaction-data.html @@ -1,5 +1,6 @@
+
diff --git a/src/modules/ui/directives/transaction/transaction.html b/src/modules/ui/directives/transaction/transaction.html index 0d57798ce9..3d9808e4f0 100644 --- a/src/modules/ui/directives/transaction/transaction.html +++ b/src/modules/ui/directives/transaction/transaction.html @@ -4,31 +4,31 @@ - - - - + + + + + + +
+ + + -
- - - - - -
-
- - - - - -
- - - +
+
+ + + - +
+ + + + + +
diff --git a/src/modules/ui/directives/transaction/types/cancel-leasing/CancelLeasing.js b/src/modules/ui/directives/transaction/types/cancel-leasing/CancelLeasing.js new file mode 100644 index 0000000000..3a8b7f4833 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/cancel-leasing/CancelLeasing.js @@ -0,0 +1,37 @@ +(function () { + 'use strict'; + + const controller = function () { + + class CancelLeasing { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.subheaderParams = { + time: this.props.time, + transactionId: this.props.leaseId + }; + this.amountParams = { + amount: this.props.lease.amount.toFormat(), + name: this.props.lease.amount.asset.name + }; + } + + } + + return new CancelLeasing(); + }; + + angular.module('app.ui').component('wCancelLeasing', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/cancel-leasing/cancel-leasing.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/cancel-leasing/cancel-leasing.html b/src/modules/ui/directives/transaction/types/cancel-leasing/cancel-leasing.html new file mode 100644 index 0000000000..d9a562499a --- /dev/null +++ b/src/modules/ui/directives/transaction/types/cancel-leasing/cancel-leasing.html @@ -0,0 +1,18 @@ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
From 8ad1149d93047e16e6148d42acac44a47831ca2a Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Wed, 24 Apr 2019 14:31:07 +0300 Subject: [PATCH 084/150] CLIENT-1808: add exchange --- .../transaction/transaction-data.html | 1 + .../transaction/types/exchange/exchange.html | 36 ++++++++++ .../transaction/types/exchange/exchange.js | 70 +++++++++++++++++++ 3 files changed, 107 insertions(+) create mode 100644 src/modules/ui/directives/transaction/types/exchange/exchange.html create mode 100644 src/modules/ui/directives/transaction/types/exchange/exchange.js diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-data.html index f83ab6c221..7eaa3d6770 100644 --- a/src/modules/ui/directives/transaction/transaction-data.html +++ b/src/modules/ui/directives/transaction/transaction-data.html @@ -1,5 +1,6 @@
+ diff --git a/src/modules/ui/directives/transaction/types/exchange/exchange.html b/src/modules/ui/directives/transaction/types/exchange/exchange.html new file mode 100644 index 0000000000..c8a0d6abd5 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/exchange/exchange.html @@ -0,0 +1,36 @@ +
+
+
+ + + {{$ctrl.amountAssetName}} + + / + + + {{$ctrl.priceAssetName}} + + + + +
+
+ +
+
+
+
+ +
+
+ +
+
+
diff --git a/src/modules/ui/directives/transaction/types/exchange/exchange.js b/src/modules/ui/directives/transaction/types/exchange/exchange.js new file mode 100644 index 0000000000..e0444498f6 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/exchange/exchange.js @@ -0,0 +1,70 @@ +(function () { + 'use strict'; + + /** + * @param {User} user + * @param {app.utils} utils + * @return {Exchange} + */ + + const controller = function (user, utils) { + + class Exchange { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.amountAssetName = this.getAssetName(this.props.amount.asset); + this.priceAssetName = this.getAssetName(this.props.price.asset); + this.isScamAmount = !!user.scam[this.props.amount.asset]; + this.isScamPrice = !!user.scam[this.props.price.asset]; + this.subheaderParams = { + time: this.props.time + }; + this.amountParams = { + sign: this.typeName === 'exchange-buy' ? '+' : '–', + amount: this.props.amount.toFormat(), + name: this.props.amount.asset.name + }; + this.priceParams = { + sign: this.typeName === 'exchange-buy' ? '-' : '+', + amount: utils.getExchangeTotalPrice(this.props.amount, this.props.price), + name: this.props.price.asset.name + }; + + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + } + + return new Exchange(); + }; + + controller.$inject = [ + 'user', + 'utils' + ]; + + angular.module('app.ui').component('wExchangeData', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/exchange/exchange.html', + controller + }); +})(); From b0862a4775092a110af4b04d3bd861d487a89a37 Mon Sep 17 00:00:00 2001 From: vba2000 Date: Wed, 24 Apr 2019 14:57:43 +0300 Subject: [PATCH 085/150] CLIENT-1840: fix adapters --- package-lock.json | 114 +++++++++++++++++++++++++++++++++++++++++++--- package.json | 2 +- 2 files changed, 109 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 33d178b039..335461c074 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "waves-client", - "version": "1.2.0", + "version": "1.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -114,6 +114,27 @@ } } }, + "@babel/polyfill": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.4.3.tgz", + "integrity": "sha512-rkv8WIvJshA5Ev8iNMGgz5WZkRtgtiPexiT7w5qevGTuT7ZBfM3de9ox1y9JR5/OXb/sWGBbWlHNa7vQKqku3Q==", + "requires": { + "core-js": "^2.6.5", + "regenerator-runtime": "^0.13.2" + }, + "dependencies": { + "core-js": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", + "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" + }, + "regenerator-runtime": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" + } + } + }, "@babel/template": { "version": "7.0.0-beta.44", "resolved": "http://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.44.tgz", @@ -172,6 +193,19 @@ "to-fast-properties": "^2.0.0" } }, + "@ledgerhq/devices": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-4.54.0.tgz", + "integrity": "sha512-v6E4PK6bej/CmMSMVasFWWy1iyh42XaHmUpp5i992/n+PiVQQL5qnQlgXpCq2ZoFinfpnFc7y2lv3qSxAqQimQ==", + "requires": { + "@ledgerhq/errors": "^4.54.0" + } + }, + "@ledgerhq/errors": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-4.54.0.tgz", + "integrity": "sha512-BbAiJHzw/EtIp/HBhDUTbAGj+1cYGGmnrlXSccIxt/MFwcgrX2KgPFbTIAiJJYmPkUSdY4eucyrB9YohzfGCkw==" + }, "@ledgerhq/hw-transport": { "version": "4.35.0", "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-4.35.0.tgz", @@ -245,6 +279,11 @@ "@types/babel-types": "*" } }, + "@types/base64-js": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/base64-js/-/base64-js-1.2.5.tgz", + "integrity": "sha1-WCskdhaabLpGCiFNR2x0REHYc9U=" + }, "@types/chokidar": { "version": "1.7.5", "resolved": "http://registry.npmjs.org/@types/chokidar/-/chokidar-1.7.5.tgz", @@ -441,6 +480,11 @@ "integrity": "sha1-fjbMv8cwJ43DOrS5CxEcoy5TJBA=", "dev": true }, + "@types/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", + "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" + }, "@types/mime": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", @@ -609,29 +653,82 @@ "babel-polyfill": "^6.26.0" } }, + "@waves/marshall": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@waves/marshall/-/marshall-0.6.1.tgz", + "integrity": "sha512-/YLfMi664CCEqEFiju+eswFZxXg/TQZcVsb9Q7jDiLpESwno8qBDwikeLY5BIJ37g9t9JEc6TUIeUnGDoVE9TA==", + "requires": { + "@types/base64-js": "^1.2.5", + "@types/long": "^4.0.0", + "base64-js": "^1.3.0", + "long": "^4.0.0", + "parse-json-bignumber": "^0.1.2" + } + }, "@waves/oracle-data": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/@waves/oracle-data/-/oracle-data-0.0.6.tgz", "integrity": "sha512-1qxL22a8LRA38xxzmmJktdVdGTfz2d9SXr9SI2gPpCJSKYrKb7SNGbOE3TgIyCRY0fquOHMtkwXuKGRw+LsJoA==" }, "@waves/signature-adapter": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@waves/signature-adapter/-/signature-adapter-4.2.1.tgz", - "integrity": "sha512-Vmkx1EVJmdhU+Iol3EbKgnG7TpDwlSjVTKVk2pJ5781GVNWH1dSxs/yv9ni3jTDpWFND7OsfU9br/2/mm/WiKw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@waves/signature-adapter/-/signature-adapter-4.3.4.tgz", + "integrity": "sha512-E/0mBURAEeQn8PM4xdhZRO6A+ggHbIsoFmRAOX7DemL3HNIZ+ZfycAq4IOFI/SEOSuUnxHdw1PrBieSwlilQJw==", "requires": { "@types/ramda": "^0.25.46", "@waves/data-entities": "^1.6.3", - "@waves/ledger": "^3.0.1", - "@waves/signature-generator": "^5.0.0", + "@waves/ledger": "^3.3.3", + "@waves/marshall": "^0.6.1", + "@waves/signature-generator": "^5.0.1", "@waves/ts-types": "^0.2.0-beta-1", "ramda": "^0.25.0" }, "dependencies": { + "@ledgerhq/hw-transport": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-4.54.0.tgz", + "integrity": "sha512-9UCr35O0Fn7ib0R9BsgY9jXHL/bGCQF66GYOD2GCwLWDVnK5eVewS6J+ljxhWOIsV75OcqJtylRO0mAGOD6tWg==", + "requires": { + "@ledgerhq/devices": "^4.54.0", + "@ledgerhq/errors": "^4.54.0", + "events": "^3.0.0" + } + }, + "@ledgerhq/hw-transport-u2f": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-u2f/-/hw-transport-u2f-4.54.0.tgz", + "integrity": "sha512-vF0Fiv+UQPfUUl1gLG2RlKjW4BuyKsLMLe8+gcOplUgzguA04LQfv3LC4qoBLG5ByNb32jsJkp38uE4moE87LA==", + "requires": { + "@ledgerhq/errors": "^4.54.0", + "@ledgerhq/hw-transport": "^4.54.0", + "u2f-api": "0.2.7" + } + }, "@types/ramda": { "version": "0.25.51", "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.25.51.tgz", "integrity": "sha512-xcmtfHIgF9SYjhGdsZR1nQslxG4hu0cIpFfLQ4CWdw3KzHvl7ki1AzFLQUkbDTG42ZN3ZsQfdRzXRlkAvbIy5Q==" }, + "@waves/ledger": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@waves/ledger/-/ledger-3.3.3.tgz", + "integrity": "sha512-WOdVaPltzkF7hd1IMyLHIvfJgzGYsrrLeTihV+ML1dAu6yM84kdFI34J4eOciX9m2WAlaVFK1syKsu/t2aKF5g==", + "requires": { + "@babel/polyfill": "^7.4.3", + "@ledgerhq/hw-transport-u2f": "^4.54.0" + } + }, + "@waves/signature-generator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@waves/signature-generator/-/signature-generator-5.0.1.tgz", + "integrity": "sha512-uYT0X1yl//joz7skzwsw2Z0QWn3s+Zm6pqWUtapnMg1AehZr1HqMi5Qgnx6X/oExDDnb/ot6T2D6KjJAHJ0TKg==", + "requires": { + "@types/crypto-js": "^3.1.43", + "@waves/data-entities": "^1.6.0", + "base64-js": "1.3.0", + "crypto-js": "3.1.9-1" + } + }, "@waves/ts-types": { "version": "0.2.0-beta-1", "resolved": "https://registry.npmjs.org/@waves/ts-types/-/ts-types-0.2.0-beta-1.tgz", @@ -9147,6 +9244,11 @@ "chalk": "^2.0.1" } }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", diff --git a/package.json b/package.json index 180f4513d8..cd1fbcfd8f 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "@waves/event-sender": "^0.5.0-a4", "@waves/ledger": "^3.2.0", "@waves/oracle-data": "^0.0.6", - "@waves/signature-adapter": "^4.2.1", + "@waves/signature-adapter": "^4.3.4", "@waves/signature-generator": "^5.0.0", "@waves/ts-types": "0.0.2", "@waves/waves-browser-bus": "^0.1.4", From 40e2a698e76abc6e537676244be5cc33b8c10ec4 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Wed, 24 Apr 2019 15:09:38 +0300 Subject: [PATCH 086/150] CLIENT-1808: add sponsorship --- .../transaction/transaction-data.html | 1 + .../exchange/{exchange.js => Exchange.js} | 0 .../types/lease/{lease.js => Lease.js} | 0 .../types/sponsorship/Sponsorship.js | 57 +++++++++++++++++++ .../types/sponsorship/sponsorship.html | 12 ++++ 5 files changed, 70 insertions(+) rename src/modules/ui/directives/transaction/types/exchange/{exchange.js => Exchange.js} (100%) rename src/modules/ui/directives/transaction/types/lease/{lease.js => Lease.js} (100%) create mode 100644 src/modules/ui/directives/transaction/types/sponsorship/Sponsorship.js create mode 100644 src/modules/ui/directives/transaction/types/sponsorship/sponsorship.html diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-data.html index 7eaa3d6770..2b4670749a 100644 --- a/src/modules/ui/directives/transaction/transaction-data.html +++ b/src/modules/ui/directives/transaction/transaction-data.html @@ -4,4 +4,5 @@ +
diff --git a/src/modules/ui/directives/transaction/types/exchange/exchange.js b/src/modules/ui/directives/transaction/types/exchange/Exchange.js similarity index 100% rename from src/modules/ui/directives/transaction/types/exchange/exchange.js rename to src/modules/ui/directives/transaction/types/exchange/Exchange.js diff --git a/src/modules/ui/directives/transaction/types/lease/lease.js b/src/modules/ui/directives/transaction/types/lease/Lease.js similarity index 100% rename from src/modules/ui/directives/transaction/types/lease/lease.js rename to src/modules/ui/directives/transaction/types/lease/Lease.js diff --git a/src/modules/ui/directives/transaction/types/sponsorship/Sponsorship.js b/src/modules/ui/directives/transaction/types/sponsorship/Sponsorship.js new file mode 100644 index 0000000000..9d3e0fe43a --- /dev/null +++ b/src/modules/ui/directives/transaction/types/sponsorship/Sponsorship.js @@ -0,0 +1,57 @@ +(function () { + 'use strict'; + + const tsUtils = require('ts-utils'); + + /** + * @param {User} user + * @return {Sponsorship} + */ + + const controller = function (user) { + + class Sponsorship { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.sponsorshipFee = this.props.minSponsoredAssetFee; + this.assetName = this.getAssetName( + tsUtils.get(this.props, 'minSponsoredAssetFee.asset') + ); + this.time = this.props.time; + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + } + + return new Sponsorship(); + }; + + controller.$inject = [ + 'user' + ]; + + angular.module('app.ui').component('wSponsorship', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/sponsorship/sponsorship.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/sponsorship/sponsorship.html b/src/modules/ui/directives/transaction/types/sponsorship/sponsorship.html new file mode 100644 index 0000000000..39c746dc3f --- /dev/null +++ b/src/modules/ui/directives/transaction/types/sponsorship/sponsorship.html @@ -0,0 +1,12 @@ +
+
+
+ + +
+ {{::$ctrl.time}} +
+
+
+
+
From 279c93ab62b6225295a848b7c479a47bee288ffa Mon Sep 17 00:00:00 2001 From: vba2000 Date: Wed, 24 Apr 2019 16:09:57 +0300 Subject: [PATCH 087/150] CLIENT-1840: merge --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index cd1fbcfd8f..3f9f94a6cd 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,7 @@ "@waves/data-service-client-js": "^2.0.0", "@waves/event-sender": "^0.5.0-a4", "@waves/ledger": "^3.2.0", + "@waves/marshall": "^0.6.1", "@waves/oracle-data": "^0.0.6", "@waves/signature-adapter": "^4.3.4", "@waves/signature-generator": "^5.0.0", From 8cf7e85a4fa68712e3f669022d4fd2b927615b37 Mon Sep 17 00:00:00 2001 From: tsigel Date: Wed, 24 Apr 2019 16:14:36 +0300 Subject: [PATCH 088/150] CLIENT-1826: change event-sender version --- 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 33d178b039..21e48f6719 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "waves-client", - "version": "1.2.0", + "version": "1.2.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -593,9 +593,9 @@ } }, "@waves/event-sender": { - "version": "0.5.0-a4", - "resolved": "https://registry.npmjs.org/@waves/event-sender/-/event-sender-0.5.0-a4.tgz", - "integrity": "sha512-3ihnNmxG6iulOwYtvypr1FgKGrfSTMOC1DAvPTcareimL8hLI+ROBdEHa2vAZg5HFLvMeqReXpna8G1fTRnVQw==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@waves/event-sender/-/event-sender-0.5.0.tgz", + "integrity": "sha512-uacDG7zKPLaXTLyNKBFtb6ltGDg383tN8f9jiANpG8xe6/AHsOMu+RiPd6suOG2yQPT4Y0AlbiWdBs/w9JoWhA==", "requires": { "@waves/waves-browser-bus": "^0.1.4" } diff --git a/package.json b/package.json index 180f4513d8..bb36657997 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "@waves/assets-pairs-order": "4.0.0", "@waves/data-entities": "^1.10.1", "@waves/data-service-client-js": "^2.0.0", - "@waves/event-sender": "^0.5.0-a4", + "@waves/event-sender": "^0.5.0", "@waves/ledger": "^3.2.0", "@waves/oracle-data": "^0.0.6", "@waves/signature-adapter": "^4.2.1", From 7d133dbd12947b4ea6da54a970476dfb8baa9246 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Wed, 24 Apr 2019 18:34:27 +0300 Subject: [PATCH 089/150] CLIENT-1808: add sponsorship-fee --- .../transaction/types/transfer/Transfer.js | 52 ++++++++++++++----- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/src/modules/ui/directives/transaction/types/transfer/Transfer.js b/src/modules/ui/directives/transaction/types/transfer/Transfer.js index ca9f242582..1257dfed91 100644 --- a/src/modules/ui/directives/transaction/types/transfer/Transfer.js +++ b/src/modules/ui/directives/transaction/types/transfer/Transfer.js @@ -4,11 +4,12 @@ /** * @param {User} user * @param {BaseAssetService} baseAssetService + * @param {Waves} waves * @param {$rootScope.Scope} $scope * @return {Transfer} */ - const controller = function (user, baseAssetService, $scope) { + const controller = function (user, baseAssetService, waves, $scope) { class Transfer { @@ -19,11 +20,45 @@ $postLink() { this.typeName = this.props.typeName; - this.assetName = this.getAssetName(this.props.amount.asset); this.subheaderParams = { time: this.props.time, address: this.props.shownAddress }; + + const TYPES = waves.node.transactions.TYPES; + + switch (this.typeName) { + case TYPES.SPONSORSHIP_FEE: + this.sponsoredFee(); + break; + default: + this.transfered(); + } + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + sponsoredFee() { + this.assetName = this.getAssetName(this.props.fee.asset); + this.amountParams = { + sign: '+', + amount: this.props.fee.toFormat(), + name: this.props.fee.asset.name + }; + } + + transfered() { + this.assetName = this.getAssetName(this.props.amount.asset); this.amountParams = { amount: this.props.amount.toFormat(), name: this.props.amount.asset.name @@ -40,18 +75,6 @@ } } - /** - * @param {{id: string, name: string}} asset - * @return {string} - */ - getAssetName(asset) { - try { - return !user.scam[asset.id] ? asset.name : ''; - } catch (e) { - return ''; - } - } - } return new Transfer(); @@ -60,6 +83,7 @@ controller.$inject = [ 'user', 'baseAssetService', + 'waves', '$scope' ]; From e642d3b4923dfd39e3cb03549c7e6169db9e9aa9 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 25 Apr 2019 11:30:38 +0300 Subject: [PATCH 090/150] CLIENT-1808: add issue --- .../transaction/transaction-data.html | 1 + .../transaction/types/issue/Issue.js | 66 +++++++++++++++++++ .../transaction/types/issue/issue.html | 22 +++++++ 3 files changed, 89 insertions(+) create mode 100644 src/modules/ui/directives/transaction/types/issue/Issue.js create mode 100644 src/modules/ui/directives/transaction/types/issue/issue.html diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-data.html index 2b4670749a..2c38cb47d5 100644 --- a/src/modules/ui/directives/transaction/transaction-data.html +++ b/src/modules/ui/directives/transaction/transaction-data.html @@ -1,4 +1,5 @@
+ diff --git a/src/modules/ui/directives/transaction/types/issue/Issue.js b/src/modules/ui/directives/transaction/types/issue/Issue.js new file mode 100644 index 0000000000..fb62708362 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/issue/Issue.js @@ -0,0 +1,66 @@ +(function () { + 'use strict'; + + const tsUtils = require('ts-utils'); + const { Money } = require('@waves/data-entities'); + + /** + * @param {User} user + * @return {Issue} + */ + + const controller = function (user) { + + class Issue { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.assetName = this.getAssetName( + tsUtils.get(this.props, 'amount.asset') || + tsUtils.get(this.props, 'quantity.asset') || + this.props + ); + this.time = this.props.time; + this.name = tsUtils.get(this.props, 'amount.asset.name') || + tsUtils.get(this.props, 'quantity.asset.name'); + + const amount = tsUtils.get(this.props, 'amount') || tsUtils.get(this.props, 'quantity'); + this.amountParams = { + amount: amount instanceof Money ? amount.toFormat() : amount.div(Math.pow(10, this.props.precision)) + }; + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + } + + return new Issue(); + }; + + controller.$inject = [ + 'user' + ]; + + angular.module('app.ui').component('wIssue', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/issue/issue.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/issue/issue.html b/src/modules/ui/directives/transaction/types/issue/issue.html new file mode 100644 index 0000000000..51aa6436ae --- /dev/null +++ b/src/modules/ui/directives/transaction/types/issue/issue.html @@ -0,0 +1,22 @@ +
+
+
+ + +
+
+ +
+
+
+
+ + {{$ctrl.name}} +
+
+ +
+
+
From 5e0c95b610b6c554c9c5b4b64ee25a6a25c83835 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 25 Apr 2019 11:38:03 +0300 Subject: [PATCH 091/150] CLIENT-1808: add reissue --- .../transaction/transaction-data.html | 1 + .../transaction/types/reissue/Reissue.js | 66 +++++++++++++++++++ .../transaction/types/reissue/reissue.html | 22 +++++++ 3 files changed, 89 insertions(+) create mode 100644 src/modules/ui/directives/transaction/types/reissue/Reissue.js create mode 100644 src/modules/ui/directives/transaction/types/reissue/reissue.html diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-data.html index 2c38cb47d5..d12f4b3d5f 100644 --- a/src/modules/ui/directives/transaction/transaction-data.html +++ b/src/modules/ui/directives/transaction/transaction-data.html @@ -1,6 +1,7 @@
+ diff --git a/src/modules/ui/directives/transaction/types/reissue/Reissue.js b/src/modules/ui/directives/transaction/types/reissue/Reissue.js new file mode 100644 index 0000000000..9f83e38016 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/reissue/Reissue.js @@ -0,0 +1,66 @@ +(function () { + 'use strict'; + + const tsUtils = require('ts-utils'); + const { Money } = require('@waves/data-entities'); + + /** + * @param {User} user + * @return {Reissue} + */ + + const controller = function (user) { + + class Reissue { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.assetName = this.getAssetName( + tsUtils.get(this.props, 'amount.asset') || + tsUtils.get(this.props, 'quantity.asset') || + this.props + ); + this.time = this.props.time; + this.name = tsUtils.get(this.props, 'amount.asset.name') || + tsUtils.get(this.props, 'quantity.asset.name'); + + const amount = tsUtils.get(this.props, 'amount') || tsUtils.get(this.props, 'quantity'); + this.amountParams = { + amount: amount instanceof Money ? amount.toFormat() : amount.div(Math.pow(10, this.props.precision)) + }; + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + } + + return new Reissue(); + }; + + controller.$inject = [ + 'user' + ]; + + angular.module('app.ui').component('wReissue', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/reissue/reissue.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/reissue/reissue.html b/src/modules/ui/directives/transaction/types/reissue/reissue.html new file mode 100644 index 0000000000..51aa6436ae --- /dev/null +++ b/src/modules/ui/directives/transaction/types/reissue/reissue.html @@ -0,0 +1,22 @@ +
+
+
+ + +
+
+ +
+
+
+
+ + {{$ctrl.name}} +
+
+ +
+
+
From c6130d9cdbf1a5f6b74cdef2d87aa273dbabffd1 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 25 Apr 2019 12:24:35 +0300 Subject: [PATCH 092/150] CLIENT-1808: refactoring save --- .../directives/transaction/TokensGeneral.js | 71 +++++++++++++++++++ .../transaction/tokens-general.html | 22 ++++++ .../transaction/transaction-data.html | 1 + .../directives/transaction/types/burn/Burn.js | 10 +++ .../transaction/types/burn/burn.html | 1 + .../transaction/types/exchange/exchange.html | 4 +- .../transaction/types/issue/Issue.js | 58 +-------------- .../transaction/types/issue/issue.html | 23 +----- .../transaction/types/reissue/Reissue.js | 58 +-------------- .../transaction/types/reissue/reissue.html | 23 +----- .../types/sponsorship/sponsorship.html | 6 +- .../transaction/types/transfer/transfer.html | 1 - 12 files changed, 113 insertions(+), 165 deletions(-) create mode 100644 src/modules/ui/directives/transaction/TokensGeneral.js create mode 100644 src/modules/ui/directives/transaction/tokens-general.html create mode 100644 src/modules/ui/directives/transaction/types/burn/Burn.js create mode 100644 src/modules/ui/directives/transaction/types/burn/burn.html diff --git a/src/modules/ui/directives/transaction/TokensGeneral.js b/src/modules/ui/directives/transaction/TokensGeneral.js new file mode 100644 index 0000000000..09b3642895 --- /dev/null +++ b/src/modules/ui/directives/transaction/TokensGeneral.js @@ -0,0 +1,71 @@ +(function () { + 'use strict'; + + const tsUtils = require('ts-utils'); + const { Money } = require('@waves/data-entities'); + + /** + * @param {User} user + * @return {TokensGeneral} + */ + + const controller = function (user) { + + class TokensGeneral { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.assetName = this.getAssetName( + tsUtils.get(this.props, 'amount.asset') || + tsUtils.get(this.props, 'quantity.asset') || + this.props + ); + this.time = this.props.time; + this.name = tsUtils.get(this.props, 'amount.asset.name') || + tsUtils.get(this.props, 'quantity.asset.name'); + + const amount = tsUtils.get(this.props, 'amount') || tsUtils.get(this.props, 'quantity'); + this.amountParams = { + amount: amount instanceof Money ? amount.toFormat() : amount.div(Math.pow(10, this.props.precision)) + }; + this.subheaderParams = { + time: this.props.time + }; + this.reissuable = this.props.reissuable; + this.reissuableDefined = typeof this.reissuable !== 'undefined'; + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + } + + return new TokensGeneral(); + }; + + controller.$inject = [ + 'user' + ]; + + angular.module('app.ui').component('wTokensGeneral', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/tokens-general.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/tokens-general.html b/src/modules/ui/directives/transaction/tokens-general.html new file mode 100644 index 0000000000..876954a59a --- /dev/null +++ b/src/modules/ui/directives/transaction/tokens-general.html @@ -0,0 +1,22 @@ +
+
+
+ + +
+
+ +
+
+
+
+ + {{$ctrl.name}} +
+
+ +
+
+
diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-data.html index d12f4b3d5f..a30d11e742 100644 --- a/src/modules/ui/directives/transaction/transaction-data.html +++ b/src/modules/ui/directives/transaction/transaction-data.html @@ -2,6 +2,7 @@ + diff --git a/src/modules/ui/directives/transaction/types/burn/Burn.js b/src/modules/ui/directives/transaction/types/burn/Burn.js new file mode 100644 index 0000000000..b52389ffa5 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/burn/Burn.js @@ -0,0 +1,10 @@ +(function () { + 'use strict'; + + angular.module('app.ui').component('wBurn', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/burn/burn.html' + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/burn/burn.html b/src/modules/ui/directives/transaction/types/burn/burn.html new file mode 100644 index 0000000000..c8d89f9eea --- /dev/null +++ b/src/modules/ui/directives/transaction/types/burn/burn.html @@ -0,0 +1 @@ + diff --git a/src/modules/ui/directives/transaction/types/exchange/exchange.html b/src/modules/ui/directives/transaction/types/exchange/exchange.html index c8a0d6abd5..604accda8c 100644 --- a/src/modules/ui/directives/transaction/types/exchange/exchange.html +++ b/src/modules/ui/directives/transaction/types/exchange/exchange.html @@ -9,9 +9,7 @@ w-i18n="transaction.headers.suspicious"> / - - {{$ctrl.priceAssetName}} - + {{$ctrl.priceAssetName}} diff --git a/src/modules/ui/directives/transaction/types/issue/Issue.js b/src/modules/ui/directives/transaction/types/issue/Issue.js index fb62708362..bebabc68eb 100644 --- a/src/modules/ui/directives/transaction/types/issue/Issue.js +++ b/src/modules/ui/directives/transaction/types/issue/Issue.js @@ -1,66 +1,10 @@ (function () { 'use strict'; - const tsUtils = require('ts-utils'); - const { Money } = require('@waves/data-entities'); - - /** - * @param {User} user - * @return {Issue} - */ - - const controller = function (user) { - - class Issue { - - /** - * {object} - */ - props = null; - - $postLink() { - this.typeName = this.props.typeName; - this.assetName = this.getAssetName( - tsUtils.get(this.props, 'amount.asset') || - tsUtils.get(this.props, 'quantity.asset') || - this.props - ); - this.time = this.props.time; - this.name = tsUtils.get(this.props, 'amount.asset.name') || - tsUtils.get(this.props, 'quantity.asset.name'); - - const amount = tsUtils.get(this.props, 'amount') || tsUtils.get(this.props, 'quantity'); - this.amountParams = { - amount: amount instanceof Money ? amount.toFormat() : amount.div(Math.pow(10, this.props.precision)) - }; - } - - /** - * @param {{id: string, name: string}} asset - * @return {string} - */ - getAssetName(asset) { - try { - return !user.scam[asset.id] ? asset.name : ''; - } catch (e) { - return ''; - } - } - - } - - return new Issue(); - }; - - controller.$inject = [ - 'user' - ]; - angular.module('app.ui').component('wIssue', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/issue/issue.html', - controller + templateUrl: 'modules/ui/directives/transaction/types/issue/issue.html' }); })(); diff --git a/src/modules/ui/directives/transaction/types/issue/issue.html b/src/modules/ui/directives/transaction/types/issue/issue.html index 51aa6436ae..c8d89f9eea 100644 --- a/src/modules/ui/directives/transaction/types/issue/issue.html +++ b/src/modules/ui/directives/transaction/types/issue/issue.html @@ -1,22 +1 @@ -
-
-
- - -
-
- -
-
-
-
- - {{$ctrl.name}} -
-
- -
-
-
+ diff --git a/src/modules/ui/directives/transaction/types/reissue/Reissue.js b/src/modules/ui/directives/transaction/types/reissue/Reissue.js index 9f83e38016..2e00625436 100644 --- a/src/modules/ui/directives/transaction/types/reissue/Reissue.js +++ b/src/modules/ui/directives/transaction/types/reissue/Reissue.js @@ -1,66 +1,10 @@ (function () { 'use strict'; - const tsUtils = require('ts-utils'); - const { Money } = require('@waves/data-entities'); - - /** - * @param {User} user - * @return {Reissue} - */ - - const controller = function (user) { - - class Reissue { - - /** - * {object} - */ - props = null; - - $postLink() { - this.typeName = this.props.typeName; - this.assetName = this.getAssetName( - tsUtils.get(this.props, 'amount.asset') || - tsUtils.get(this.props, 'quantity.asset') || - this.props - ); - this.time = this.props.time; - this.name = tsUtils.get(this.props, 'amount.asset.name') || - tsUtils.get(this.props, 'quantity.asset.name'); - - const amount = tsUtils.get(this.props, 'amount') || tsUtils.get(this.props, 'quantity'); - this.amountParams = { - amount: amount instanceof Money ? amount.toFormat() : amount.div(Math.pow(10, this.props.precision)) - }; - } - - /** - * @param {{id: string, name: string}} asset - * @return {string} - */ - getAssetName(asset) { - try { - return !user.scam[asset.id] ? asset.name : ''; - } catch (e) { - return ''; - } - } - - } - - return new Reissue(); - }; - - controller.$inject = [ - 'user' - ]; - angular.module('app.ui').component('wReissue', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/reissue/reissue.html', - controller + templateUrl: 'modules/ui/directives/transaction/types/reissue/reissue.html' }); })(); diff --git a/src/modules/ui/directives/transaction/types/reissue/reissue.html b/src/modules/ui/directives/transaction/types/reissue/reissue.html index 51aa6436ae..c8d89f9eea 100644 --- a/src/modules/ui/directives/transaction/types/reissue/reissue.html +++ b/src/modules/ui/directives/transaction/types/reissue/reissue.html @@ -1,22 +1 @@ -
-
-
- - -
-
- -
-
-
-
- - {{$ctrl.name}} -
-
- -
-
-
+ diff --git a/src/modules/ui/directives/transaction/types/sponsorship/sponsorship.html b/src/modules/ui/directives/transaction/types/sponsorship/sponsorship.html index 39c746dc3f..d0084c492b 100644 --- a/src/modules/ui/directives/transaction/types/sponsorship/sponsorship.html +++ b/src/modules/ui/directives/transaction/types/sponsorship/sponsorship.html @@ -3,9 +3,9 @@
-
- {{::$ctrl.time}} -
+
+
+ {{::$ctrl.time}}
diff --git a/src/modules/ui/directives/transaction/types/transfer/transfer.html b/src/modules/ui/directives/transaction/types/transfer/transfer.html index d0082d506d..d6227ba414 100644 --- a/src/modules/ui/directives/transaction/types/transfer/transfer.html +++ b/src/modules/ui/directives/transaction/types/transfer/transfer.html @@ -3,7 +3,6 @@
-
From 3258a0197d69e942ecabce915dd065097704d151 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Thu, 25 Apr 2019 12:28:12 +0300 Subject: [PATCH 093/150] CLIENT-1826: apiToken ganalytics to dev --- ts-scripts/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-scripts/utils.ts b/ts-scripts/utils.ts index 97a3118768..d7bf482115 100644 --- a/ts-scripts/utils.ts +++ b/ts-scripts/utils.ts @@ -393,7 +393,7 @@ export async function getInitScript(connectionType: TConnection, buildType: TBui }); analytics.addApi({ - apiToken: 'UA-75283398-20', + apiToken: 'UA-75283398-21', libraryUrl: location.origin + '/googleAnalytics.js', initializeMethod: 'gaInit', sendMethod: 'gaPushEvent', From f96605c5877a77681f5a622a30f2944c4da30d1a Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Thu, 25 Apr 2019 13:12:20 +0300 Subject: [PATCH 094/150] CLIENT-1843: fix icon --- src/modules/ui/directives/transactionInfo/transactionInfo.less | 2 +- src/modules/utils/modals/signByDevice/signByDevice.less | 3 +-- src/themeConfig/black/icons.less | 2 +- src/themeConfig/default/icons.less | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index 5446549314..be515e6183 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -295,7 +295,7 @@ w-transaction-info-header + w-transaction-info-general { background-size: auto; background-color: @color-white; background-repeat: no-repeat; - background-image: url(/img/icons/transaction-icons-80.svg); + background-image: @transaction-icons; content: ''; display: block; } diff --git a/src/modules/utils/modals/signByDevice/signByDevice.less b/src/modules/utils/modals/signByDevice/signByDevice.less index d7f3a9011a..a37814ca80 100644 --- a/src/modules/utils/modals/signByDevice/signByDevice.less +++ b/src/modules/utils/modals/signByDevice/signByDevice.less @@ -30,9 +30,8 @@ } .create-order-icon { background: @transaction-icons; - background-size: auto 80px; background-repeat: no-repeat; - background-position: -157px center; + background-position-x: -240px; } .create-order-cont { border-bottom: 1px solid @color-basic-100; diff --git a/src/themeConfig/black/icons.less b/src/themeConfig/black/icons.less index 6bcdde70e0..7208be0ff6 100644 --- a/src/themeConfig/black/icons.less +++ b/src/themeConfig/black/icons.less @@ -21,7 +21,7 @@ @add-asset-icon: url(/img/icons/dark/add-asset.svg); @arrow-left-icon: url(/img/icons/arrowleft-18-basic-500.svg); @arrow-right-icon: url(/img/icons/arrowright-18-basic-500.svg); -@transaction-icons: url(/img/icons/transaction-icons.svg); +@transaction-icons: url(/img/icons/transaction-icons-80.svg); @cancelorder-icon: url(/img/icons/error-80-ordercancel.svg); @double-arrow: url(/img/icons/dark/double-arrow.svg); diff --git a/src/themeConfig/default/icons.less b/src/themeConfig/default/icons.less index a16690abd4..ed567f703b 100644 --- a/src/themeConfig/default/icons.less +++ b/src/themeConfig/default/icons.less @@ -21,7 +21,7 @@ @add-asset-icon: url(/img/icons/add-asset.svg); @arrow-left-icon: url(/img/icons/arrowleft-18-basic-500.svg); @arrow-right-icon: url(/img/icons/arrowright-18-basic-500.svg); -@transaction-icons: url(/img/icons/transaction-icons.svg); +@transaction-icons: url(/img/icons/transaction-icons-80.svg); @cancelorder-icon: url(/img/icons/error-80-ordercancel.svg); @double-arrow: url(/img/icons/double-arrow.svg); From c8d8b5a019ae40f5e04f33d85d2c9dd1a00ac7fc Mon Sep 17 00:00:00 2001 From: Jahsus Date: Thu, 25 Apr 2019 13:45:18 +0300 Subject: [PATCH 095/150] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 671e34a615..a6bcc64228 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "waves-client", - "version": "1.2.3", + "version": "1.2.4", "description": "The official client application for the Waves platform", "private": true, "repository": { From d0dc7a8418b877a6a85debf4769bcf15f9424dd1 Mon Sep 17 00:00:00 2001 From: tsigel Date: Thu, 25 Apr 2019 13:48:33 +0300 Subject: [PATCH 096/150] CLIENT-1844: fix security alert --- package-lock.json | 34 ++++++++++------------------------ package.json | 2 +- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 396230e7a3..ffa2f68817 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5851,14 +5851,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5873,20 +5871,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -6003,8 +5998,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -6016,7 +6010,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6031,7 +6024,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6039,14 +6031,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -6065,7 +6055,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -6146,8 +6135,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -6159,7 +6147,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -6281,7 +6268,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -8752,9 +8738,9 @@ "dev": true }, "jquery": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz", - "integrity": "sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c=" + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.0.tgz", + "integrity": "sha512-ggRCXln9zEqv6OqAGXFEcshF5dSBvCkzj6Gm2gzuR5fWawaX8t7cxKVkkygKODrDAzKdoYw3l/e3pm3vlT4IbQ==" }, "js-cookie": { "version": "2.2.0", diff --git a/package.json b/package.json index 8bb22e90aa..d234ba8a96 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "i18next": "9.1.0", "i18next-locize-backend": "1.2.1", "identity-img": "1.0.0", - "jquery": "3.2.1", + "jquery": "^3.4.0", "js-cookie": "2.2.0", "mobile-detect": "^1.4.1", "mousetrap": "1.6.1", From 19f0f493c8028b189af06f454b4e8a2cbd6d5455 Mon Sep 17 00:00:00 2001 From: tsigel Date: Thu, 25 Apr 2019 13:54:34 +0300 Subject: [PATCH 097/150] CLIENT-1845: change api token --- ts-scripts/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-scripts/utils.ts b/ts-scripts/utils.ts index d7bf482115..97a3118768 100644 --- a/ts-scripts/utils.ts +++ b/ts-scripts/utils.ts @@ -393,7 +393,7 @@ export async function getInitScript(connectionType: TConnection, buildType: TBui }); analytics.addApi({ - apiToken: 'UA-75283398-21', + apiToken: 'UA-75283398-20', libraryUrl: location.origin + '/googleAnalytics.js', initializeMethod: 'gaInit', sendMethod: 'gaPushEvent', From 601e375596d8dc05ec9ebf7b5c491a48af3fec78 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Thu, 25 Apr 2019 15:55:59 +0300 Subject: [PATCH 098/150] CLIENT-1772: edit downloading locales in dev mode --- server.ts | 16 +--------------- ts-scripts/utils.ts | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/server.ts b/server.ts index 55ac1e8b95..dc75537805 100644 --- a/server.ts +++ b/server.ts @@ -77,21 +77,7 @@ function createMyServer(port) { if (!existsSync(cachePath)){ mkdirSync(cachePath); } - getLocales(cachePath).then(() => { - const localesTimer = setInterval(function() { - const currentDate = new Date(); - if ((currentDate.getTime() - startDate.getTime()) > 60 * 10000) { - startDate = currentDate; - getLocales(cachePath) - .catch(err => console.log(err)) - } - - }, 10000); - - localesTimer.unref(); - - - }); + getLocales(cachePath); if (args.openUrl) { opn(url); diff --git a/ts-scripts/utils.ts b/ts-scripts/utils.ts index 97a3118768..4d8bbab042 100644 --- a/ts-scripts/utils.ts +++ b/ts-scripts/utils.ts @@ -525,11 +525,28 @@ export function route(connectionType: TConnection, buildType: TBuild, type: TPla .replace(/\?.*/, '') .replace('.json', '') .split('/'); - const cachePath = join(process.cwd(), '.cache-download', 'locale', lang, `${ns}.json`); + + const localePath = join(process.cwd(), '.cache-download', 'locale'); + const cachePath = join(localePath, lang, `${ns}.json`); + + const isModified = path => { + const { mtime } = statSync(path); + const dateNow = new Date(); + return (dateNow.getTime() - mtime.getTime()) > 30 * 1000; + }; if (existsSync(cachePath)) { - const data = readFileSync(cachePath); - res.end(data); + if (isModified(cachePath) && lang === 'ru' && ns === 'app') { + getLocales(localePath) + .then(() => { + const data = readFileSync(cachePath); + res.end(data); + }); + } else { + const data = readFileSync(cachePath); + res.end(data); + } + } else { res.statusCode = 404; res.end('Not found!'); From eb8f8ba486365f9e8b2871de13a9ba3794900ffb Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Thu, 25 Apr 2019 15:56:46 +0300 Subject: [PATCH 099/150] CLIENT-1772: fix time --- ts-scripts/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-scripts/utils.ts b/ts-scripts/utils.ts index 4d8bbab042..44097139a2 100644 --- a/ts-scripts/utils.ts +++ b/ts-scripts/utils.ts @@ -532,7 +532,7 @@ export function route(connectionType: TConnection, buildType: TBuild, type: TPla const isModified = path => { const { mtime } = statSync(path); const dateNow = new Date(); - return (dateNow.getTime() - mtime.getTime()) > 30 * 1000; + return (dateNow.getTime() - mtime.getTime()) > 60 * 10000; }; if (existsSync(cachePath)) { From 8257a0f82953e11ace1726baf0c7b2e8c0d228e7 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Thu, 25 Apr 2019 16:10:26 +0300 Subject: [PATCH 100/150] CLIENT-1772: remove redunant stuff --- server.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/server.ts b/server.ts index dc75537805..fb7af9a03c 100644 --- a/server.ts +++ b/server.ts @@ -21,7 +21,6 @@ const privateKey = readFileSync('localhost.key').toString(); const certificate = readFileSync('localhost.crt').toString(); const args = parseArguments() || Object.create(null); -let startDate = new Date(); const handler = function (req, res) { const url = parse(req.url); From 55de74537fefded159a63717c51e32675dfab01e Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 25 Apr 2019 16:25:09 +0300 Subject: [PATCH 101/150] CLIENT-1808: add set asset script --- .../transaction/transaction-data.html | 1 + .../types/set-asset-script/SetAssetScript.js | 46 +++++++++++++++++++ .../set-asset-script/set-asset-script.html | 13 ++++++ 3 files changed, 60 insertions(+) create mode 100644 src/modules/ui/directives/transaction/types/set-asset-script/SetAssetScript.js create mode 100644 src/modules/ui/directives/transaction/types/set-asset-script/set-asset-script.html diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-data.html index a30d11e742..f6eeaad685 100644 --- a/src/modules/ui/directives/transaction/transaction-data.html +++ b/src/modules/ui/directives/transaction/transaction-data.html @@ -8,4 +8,5 @@ +
diff --git a/src/modules/ui/directives/transaction/types/set-asset-script/SetAssetScript.js b/src/modules/ui/directives/transaction/types/set-asset-script/SetAssetScript.js new file mode 100644 index 0000000000..8c107f5748 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/set-asset-script/SetAssetScript.js @@ -0,0 +1,46 @@ +(function () { + 'use strict'; + + /** + * @param {Waves} waves + * @return {Transaction} + */ + + const controller = function (waves) { + + class SetAssetScript { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.subheaderParams = { + time: this.props.time + }; + if (this.props.assetId) { + waves.node.assets.getAsset(this.props.assetId).then(asset => { + this.subheaderParams.name = asset.name; + }); + } + } + + } + + return new SetAssetScript(); + }; + + controller.$inject = [ + 'waves' + ]; + + angular.module('app.ui').component('wSetAssetScript', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/set-asset-script/set-asset-script.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/set-asset-script/set-asset-script.html b/src/modules/ui/directives/transaction/types/set-asset-script/set-asset-script.html new file mode 100644 index 0000000000..ad8fec088a --- /dev/null +++ b/src/modules/ui/directives/transaction/types/set-asset-script/set-asset-script.html @@ -0,0 +1,13 @@ +
+
+
+ + +
+ +
+
+
+
+
From 7f352344b5ee2d3d38c660c4615d911f96d61726 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 25 Apr 2019 16:38:47 +0300 Subject: [PATCH 102/150] CLIENT-1808: add data --- ...ansactionData.js => TransactionInfoRow.js} | 10 +++--- ...on-data.html => transaction-info-row.html} | 1 + .../directives/transaction/transaction.html | 4 +-- .../directives/transaction/types/data/Data.js | 32 +++++++++++++++++++ .../transaction/types/data/data.html | 13 ++++++++ 5 files changed, 53 insertions(+), 7 deletions(-) rename src/modules/ui/directives/transaction/{TransactionData.js => TransactionInfoRow.js} (77%) rename src/modules/ui/directives/transaction/{transaction-data.html => transaction-info-row.html} (92%) create mode 100644 src/modules/ui/directives/transaction/types/data/Data.js create mode 100644 src/modules/ui/directives/transaction/types/data/data.html diff --git a/src/modules/ui/directives/transaction/TransactionData.js b/src/modules/ui/directives/transaction/TransactionInfoRow.js similarity index 77% rename from src/modules/ui/directives/transaction/TransactionData.js rename to src/modules/ui/directives/transaction/TransactionInfoRow.js index 3774e02f97..342f4df15c 100644 --- a/src/modules/ui/directives/transaction/TransactionData.js +++ b/src/modules/ui/directives/transaction/TransactionInfoRow.js @@ -3,12 +3,12 @@ /** * @param $filter - * @return {TransactionData} + * @return {TransactionInfoRow} */ const controller = function ($filter) { - class TransactionData { + class TransactionInfoRow { $postLink() { this.type = this.transaction.type; @@ -20,19 +20,19 @@ } - return new TransactionData(); + return new TransactionInfoRow(); }; controller.$inject = [ '$filter' ]; - angular.module('app.ui').component('wTransactionData', { + angular.module('app.ui').component('wTransactionInfoRow', { bindings: { transaction: '<', datePattern: '<' }, - templateUrl: 'modules/ui/directives/transaction/transaction-data.html', + templateUrl: 'modules/ui/directives/transaction/transaction-info-row.html', controller }); })(); diff --git a/src/modules/ui/directives/transaction/transaction-data.html b/src/modules/ui/directives/transaction/transaction-info-row.html similarity index 92% rename from src/modules/ui/directives/transaction/transaction-data.html rename to src/modules/ui/directives/transaction/transaction-info-row.html index f6eeaad685..052b46c508 100644 --- a/src/modules/ui/directives/transaction/transaction-data.html +++ b/src/modules/ui/directives/transaction/transaction-info-row.html @@ -7,6 +7,7 @@ +
diff --git a/src/modules/ui/directives/transaction/transaction.html b/src/modules/ui/directives/transaction/transaction.html index 3d9808e4f0..c44e4df0d9 100644 --- a/src/modules/ui/directives/transaction/transaction.html +++ b/src/modules/ui/directives/transaction/transaction.html @@ -2,8 +2,8 @@ ng-class="{'spam': $ctrl.isScam || $ctrl.isScamAmount || $ctrl.isScamPrice}"> - + diff --git a/src/modules/ui/directives/transaction/types/data/Data.js b/src/modules/ui/directives/transaction/types/data/Data.js new file mode 100644 index 0000000000..748aa146aa --- /dev/null +++ b/src/modules/ui/directives/transaction/types/data/Data.js @@ -0,0 +1,32 @@ +(function () { + 'use strict'; + + const controller = function () { + + class Data { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.subheaderParams = { + time: this.props.time + }; + } + + } + + return new Data(); + }; + + angular.module('app.ui').component('wData', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/data/data.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/data/data.html b/src/modules/ui/directives/transaction/types/data/data.html new file mode 100644 index 0000000000..c2992546d8 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/data/data.html @@ -0,0 +1,13 @@ +
+
+
+ + +
+
+ +
+
+
+
From ff5741f8854e94e0380036f0f28d267eac46b963 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 25 Apr 2019 17:04:49 +0300 Subject: [PATCH 103/150] CLIENT-1808: add set-script --- .../transaction/transaction-info-row.html | 1 + .../transaction/types/set-script/SetScript.js | 29 +++++++++++++++++++ .../types/set-script/set-script.html | 7 +++++ 3 files changed, 37 insertions(+) create mode 100644 src/modules/ui/directives/transaction/types/set-script/SetScript.js create mode 100644 src/modules/ui/directives/transaction/types/set-script/set-script.html diff --git a/src/modules/ui/directives/transaction/transaction-info-row.html b/src/modules/ui/directives/transaction/transaction-info-row.html index 052b46c508..6761fc0159 100644 --- a/src/modules/ui/directives/transaction/transaction-info-row.html +++ b/src/modules/ui/directives/transaction/transaction-info-row.html @@ -8,6 +8,7 @@ +
diff --git a/src/modules/ui/directives/transaction/types/set-script/SetScript.js b/src/modules/ui/directives/transaction/types/set-script/SetScript.js new file mode 100644 index 0000000000..27513aed00 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/set-script/SetScript.js @@ -0,0 +1,29 @@ +(function () { + 'use strict'; + + const controller = function () { + + class SetScript { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + } + + } + + return new SetScript(); + }; + + angular.module('app.ui').component('wSetScript', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/set-script/set-script.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/set-script/set-script.html b/src/modules/ui/directives/transaction/types/set-script/set-script.html new file mode 100644 index 0000000000..aeec3a9212 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/set-script/set-script.html @@ -0,0 +1,7 @@ +
+
+
+ +
+
+
From e78b316fd2090209c6284ca7d2d8f42fb003aee6 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 25 Apr 2019 17:19:51 +0300 Subject: [PATCH 104/150] CLIENT-1808: refactoring transfer and mass-transfer --- .../directives/transaction/TransferGeneral.js | 97 +++++++++++++++++++ .../transaction/transaction-info-row.html | 3 +- .../transaction/transfer-general.html | 23 +++++ .../types/mass-transfer/MassTransfer.js | 10 ++ .../types/mass-transfer/mass-transfer.html | 1 + .../transaction/types/transfer/Transfer.js | 89 +---------------- .../transaction/types/transfer/transfer.html | 24 +---- 7 files changed, 135 insertions(+), 112 deletions(-) create mode 100644 src/modules/ui/directives/transaction/TransferGeneral.js create mode 100644 src/modules/ui/directives/transaction/transfer-general.html create mode 100644 src/modules/ui/directives/transaction/types/mass-transfer/MassTransfer.js create mode 100644 src/modules/ui/directives/transaction/types/mass-transfer/mass-transfer.html diff --git a/src/modules/ui/directives/transaction/TransferGeneral.js b/src/modules/ui/directives/transaction/TransferGeneral.js new file mode 100644 index 0000000000..96e3d6f7ba --- /dev/null +++ b/src/modules/ui/directives/transaction/TransferGeneral.js @@ -0,0 +1,97 @@ +(function () { + 'use strict'; + + /** + * @param {User} user + * @param {BaseAssetService} baseAssetService + * @param {Waves} waves + * @param {$rootScope.Scope} $scope + * @return {TransferGeneral} + */ + + const controller = function (user, baseAssetService, waves, $scope) { + + class TransferGeneral { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.subheaderParams = { + time: this.props.time, + address: this.props.shownAddress + }; + + const TYPES = waves.node.transactions.TYPES; + + switch (this.typeName) { + case TYPES.SPONSORSHIP_FEE: + this.sponsoredFee(); + break; + default: + this.transfered(); + } + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + sponsoredFee() { + this.assetName = this.getAssetName(this.props.fee.asset); + this.amountParams = { + sign: '+', + amount: this.props.fee.toFormat(), + name: this.props.fee.asset.name + }; + } + + transfered() { + this.assetName = this.getAssetName(this.props.amount.asset); + this.amountParams = { + amount: this.props.amount.toFormat(), + name: this.props.amount.asset.name + }; + if (this.props.amount && this.props.amount instanceof ds.wavesDataEntities.Money) { + baseAssetService.convertToBaseAsset(this.props.amount) + .then((baseMoney) => { + this.mirrorBalanceParams = { + amount: baseMoney.toFormat(), + name: baseMoney.asset.name + }; + $scope.$digest(); + }); + } + } + + } + + return new TransferGeneral(); + }; + + controller.$inject = [ + 'user', + 'baseAssetService', + 'waves', + '$scope' + ]; + + angular.module('app.ui').component('wTransferGeneral', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/transfer-general.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/transaction-info-row.html b/src/modules/ui/directives/transaction/transaction-info-row.html index 6761fc0159..08587f20ae 100644 --- a/src/modules/ui/directives/transaction/transaction-info-row.html +++ b/src/modules/ui/directives/transaction/transaction-info-row.html @@ -1,12 +1,13 @@
- + + diff --git a/src/modules/ui/directives/transaction/transfer-general.html b/src/modules/ui/directives/transaction/transfer-general.html new file mode 100644 index 0000000000..b839f36675 --- /dev/null +++ b/src/modules/ui/directives/transaction/transfer-general.html @@ -0,0 +1,23 @@ +
+
+
+ + +
+
+ +
+
+
+
+ +
+
+ +
+
+
diff --git a/src/modules/ui/directives/transaction/types/mass-transfer/MassTransfer.js b/src/modules/ui/directives/transaction/types/mass-transfer/MassTransfer.js new file mode 100644 index 0000000000..7c2e5e757d --- /dev/null +++ b/src/modules/ui/directives/transaction/types/mass-transfer/MassTransfer.js @@ -0,0 +1,10 @@ +(function () { + 'use strict'; + + angular.module('app.ui').component('wMassTransfer', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/mass-transfer/mass-transfer.html' + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/mass-transfer/mass-transfer.html b/src/modules/ui/directives/transaction/types/mass-transfer/mass-transfer.html new file mode 100644 index 0000000000..25965bf0ed --- /dev/null +++ b/src/modules/ui/directives/transaction/types/mass-transfer/mass-transfer.html @@ -0,0 +1 @@ + diff --git a/src/modules/ui/directives/transaction/types/transfer/Transfer.js b/src/modules/ui/directives/transaction/types/transfer/Transfer.js index 1257dfed91..17a229797e 100644 --- a/src/modules/ui/directives/transaction/types/transfer/Transfer.js +++ b/src/modules/ui/directives/transaction/types/transfer/Transfer.js @@ -1,97 +1,10 @@ (function () { 'use strict'; - /** - * @param {User} user - * @param {BaseAssetService} baseAssetService - * @param {Waves} waves - * @param {$rootScope.Scope} $scope - * @return {Transfer} - */ - - const controller = function (user, baseAssetService, waves, $scope) { - - class Transfer { - - /** - * {object} - */ - props = null; - - $postLink() { - this.typeName = this.props.typeName; - this.subheaderParams = { - time: this.props.time, - address: this.props.shownAddress - }; - - const TYPES = waves.node.transactions.TYPES; - - switch (this.typeName) { - case TYPES.SPONSORSHIP_FEE: - this.sponsoredFee(); - break; - default: - this.transfered(); - } - } - - /** - * @param {{id: string, name: string}} asset - * @return {string} - */ - getAssetName(asset) { - try { - return !user.scam[asset.id] ? asset.name : ''; - } catch (e) { - return ''; - } - } - - sponsoredFee() { - this.assetName = this.getAssetName(this.props.fee.asset); - this.amountParams = { - sign: '+', - amount: this.props.fee.toFormat(), - name: this.props.fee.asset.name - }; - } - - transfered() { - this.assetName = this.getAssetName(this.props.amount.asset); - this.amountParams = { - amount: this.props.amount.toFormat(), - name: this.props.amount.asset.name - }; - if (this.props.amount && this.props.amount instanceof ds.wavesDataEntities.Money) { - baseAssetService.convertToBaseAsset(this.props.amount) - .then((baseMoney) => { - this.mirrorBalanceParams = { - amount: baseMoney.toFormat(), - name: baseMoney.asset.name - }; - $scope.$digest(); - }); - } - } - - } - - return new Transfer(); - }; - - controller.$inject = [ - 'user', - 'baseAssetService', - 'waves', - '$scope' - ]; - angular.module('app.ui').component('wTransfer', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/transfer/transfer.html', - controller + templateUrl: 'modules/ui/directives/transaction/types/transfer/transfer.html' }); })(); diff --git a/src/modules/ui/directives/transaction/types/transfer/transfer.html b/src/modules/ui/directives/transaction/types/transfer/transfer.html index d6227ba414..25965bf0ed 100644 --- a/src/modules/ui/directives/transaction/types/transfer/transfer.html +++ b/src/modules/ui/directives/transaction/types/transfer/transfer.html @@ -1,23 +1 @@ -
-
-
- - -
-
- -
-
-
-
- -
-
- -
-
-
+ From eaa1cd124761f03fff71d88640cbf81314615344 Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Thu, 25 Apr 2019 18:26:32 +0300 Subject: [PATCH 105/150] CLIENT-1843: change select disabled --- src/modules/ui/directives/select/select.less | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/ui/directives/select/select.less b/src/modules/ui/directives/select/select.less index d2875a64f4..fdf3b57bb0 100644 --- a/src/modules/ui/directives/select/select.less +++ b/src/modules/ui/directives/select/select.less @@ -16,12 +16,6 @@ w-select { height: @height-control-big; } - &[disabled] .select .title, - &.disabled .select .title { - background: @color-basic-50; - cursor: default; - } - &.select__no-user-select { user-select: none; } @@ -117,6 +111,12 @@ w-select { border-bottom: none; } } + + &[disabled] .title, + &.disabled .title { + background: @color-basic-50; + cursor: default; + } } &.interface { From 21ff8d533d32b1d555a57c91179c6b86985f1609 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 25 Apr 2019 18:36:23 +0300 Subject: [PATCH 106/150] CLIENT-1808: refactoring remove useless --- .../ui/directives/transaction/Transaction.js | 99 +------------------ .../directives/transaction/transaction.html | 6 +- .../transaction/types/cancel-leasing.html | 22 ----- .../transaction/types/create-alias.html | 13 --- .../ui/directives/transaction/types/data.html | 13 --- .../transaction/types/exchange.html | 46 --------- .../directives/transaction/types/lease.html | 20 ---- .../transaction/types/set-asset-script.html | 13 --- .../transaction/types/set-script-cancel.html | 7 -- .../transaction/types/set-script.html | 7 -- .../transaction/types/sponsorship.html | 14 --- .../transaction/types/sponsorship_fee.html | 24 ----- .../directives/transaction/types/tokens.html | 25 ----- .../transaction/types/transfer.html | 23 ----- 14 files changed, 5 insertions(+), 327 deletions(-) delete mode 100644 src/modules/ui/directives/transaction/types/cancel-leasing.html delete mode 100644 src/modules/ui/directives/transaction/types/create-alias.html delete mode 100644 src/modules/ui/directives/transaction/types/data.html delete mode 100644 src/modules/ui/directives/transaction/types/exchange.html delete mode 100644 src/modules/ui/directives/transaction/types/lease.html delete mode 100644 src/modules/ui/directives/transaction/types/set-asset-script.html delete mode 100644 src/modules/ui/directives/transaction/types/set-script-cancel.html delete mode 100644 src/modules/ui/directives/transaction/types/set-script.html delete mode 100644 src/modules/ui/directives/transaction/types/sponsorship.html delete mode 100644 src/modules/ui/directives/transaction/types/sponsorship_fee.html delete mode 100644 src/modules/ui/directives/transaction/types/tokens.html delete mode 100644 src/modules/ui/directives/transaction/types/transfer.html diff --git a/src/modules/ui/directives/transaction/Transaction.js b/src/modules/ui/directives/transaction/Transaction.js index 434f9842fc..5e0ea3f288 100644 --- a/src/modules/ui/directives/transaction/Transaction.js +++ b/src/modules/ui/directives/transaction/Transaction.js @@ -1,10 +1,6 @@ (function () { 'use strict'; - const PATH = 'modules/ui/directives/transaction/types'; - const tsUtils = require('ts-utils'); - const { Money } = require('@waves/data-entities'); - /** * @param Base * @param $filter @@ -12,21 +8,15 @@ * @param {INotification} notification * @param {Waves} waves * @param {User} user - * @param {BaseAssetService} baseAssetService - * @param {app.utils} utils - * @param {$rootScope.Scope} $scope * @return {Transaction} */ const controller = function (Base, $filter, modalManager, notification, - waves, user, baseAssetService, utils, $scope) { + waves, user) { const { SIGN_TYPE } = require('@waves/signature-adapter'); class Transaction extends Base { $postLink() { - this.templateUrl = `${PATH}/${this.transaction.templateType}.html`; - this.time = $filter('date')(this.transaction.timestamp, this.datePattern || 'HH:mm'); - this.shownAddress = this.transaction.shownAddress; this.typeName = this.transaction.typeName; this.isScam = !!user.scam[this.transaction.assetId]; if (this.transaction.type === 7) { @@ -34,88 +24,6 @@ this.isScamPrice = !!user.scam[this.transaction.price.asset]; } - if (this.transaction.amount && this.transaction.amount instanceof ds.wavesDataEntities.Money) { - baseAssetService.convertToBaseAsset(this.transaction.amount) - .then((baseMoney) => { - this.mirrorBalance = baseMoney; - $scope.$digest(); - }); - } - - if (this.transaction.assetId) { - waves.node.assets.getAsset(this.transaction.assetId).then(asset => { - this.asset = asset; - $scope.$apply(); - }); - } - - const TYPES = waves.node.transactions.TYPES; - - switch (this.typeName) { - case TYPES.BURN: - case TYPES.ISSUE: - case TYPES.REISSUE: - this.tokens(); - break; - case TYPES.EXCHANGE_BUY: - case TYPES.EXCHANGE_SELL: - this.exchange(); - break; - case TYPES.SPONSORSHIP_START: - case TYPES.SPONSORSHIP_STOP: - this.sponsored(); - break; - case TYPES.SPONSORSHIP_FEE: - this.sponsoredFee(); - break; - default: - } - } - - sponsoredFee() { - this.isScam = false; - } - - sponsored() { - this.sponsorshipFee = this.transaction.minSponsoredAssetFee; - this.titleAssetName = this.getAssetName( - tsUtils.get(this.transaction, 'minSponsoredAssetFee.asset') - ); - } - - exchange() { - this.totalPrice = utils.getExchangeTotalPrice(this.transaction.amount, this.transaction.price); - } - - tokens() { - this.titleAssetName = this.getAssetName( - tsUtils.get(this.transaction, 'amount.asset') || - tsUtils.get(this.transaction, 'quantity.asset') || - this.transaction - ); - this.name = tsUtils.get( - this.transaction, 'amount.asset.name') || - tsUtils.get(this.transaction, 'quantity.asset.name' - ); - - const amount = tsUtils.get(this.transaction, 'amount') || tsUtils.get(this.transaction, 'quantity'); - if (amount instanceof Money) { - this.amount = amount.toFormat(); - } else { - this.amount = amount.div(Math.pow(10, this.transaction.precision)); - } - } - - /** - * @param {{id: string, name: string}} asset - * @return {string} - */ - getAssetName(asset) { - try { - return !user.scam[asset.id] ? asset.name : ''; - } catch (e) { - return ''; - } } cancelLeasing() { @@ -208,10 +116,7 @@ 'modalManager', 'notification', 'waves', - 'user', - 'baseAssetService', - 'utils', - '$scope' + 'user' ]; angular.module('app.ui') diff --git a/src/modules/ui/directives/transaction/transaction.html b/src/modules/ui/directives/transaction/transaction.html index c44e4df0d9..2c13d9aac0 100644 --- a/src/modules/ui/directives/transaction/transaction.html +++ b/src/modules/ui/directives/transaction/transaction.html @@ -1,9 +1,9 @@
- - + diff --git a/src/modules/ui/directives/transaction/types/cancel-leasing.html b/src/modules/ui/directives/transaction/types/cancel-leasing.html deleted file mode 100644 index a60d919209..0000000000 --- a/src/modules/ui/directives/transaction/types/cancel-leasing.html +++ /dev/null @@ -1,22 +0,0 @@ -
-
-
-
- - -
-
- -
-
-
-
- -
-
-
diff --git a/src/modules/ui/directives/transaction/types/create-alias.html b/src/modules/ui/directives/transaction/types/create-alias.html deleted file mode 100644 index 324e688e5a..0000000000 --- a/src/modules/ui/directives/transaction/types/create-alias.html +++ /dev/null @@ -1,13 +0,0 @@ -
-
-
- - -
-
- -
-
-
-
diff --git a/src/modules/ui/directives/transaction/types/data.html b/src/modules/ui/directives/transaction/types/data.html deleted file mode 100644 index 08aed88a4a..0000000000 --- a/src/modules/ui/directives/transaction/types/data.html +++ /dev/null @@ -1,13 +0,0 @@ -
-
-
- - -
-
- -
-
-
-
diff --git a/src/modules/ui/directives/transaction/types/exchange.html b/src/modules/ui/directives/transaction/types/exchange.html deleted file mode 100644 index 7ae73977d5..0000000000 --- a/src/modules/ui/directives/transaction/types/exchange.html +++ /dev/null @@ -1,46 +0,0 @@ -
-
-
- - - - {{$ctrl.getAssetName($ctrl.transaction.amount.asset)}} - - - / - - - {{$ctrl.getAssetName($ctrl.transaction.price.asset)}} - - - - -
-
- -
-
-
-
- -
-
- -
-
-
diff --git a/src/modules/ui/directives/transaction/types/lease.html b/src/modules/ui/directives/transaction/types/lease.html deleted file mode 100644 index 6ce3eac90a..0000000000 --- a/src/modules/ui/directives/transaction/types/lease.html +++ /dev/null @@ -1,20 +0,0 @@ -
-
-
-
-
- - -
-
- -
-
-
-
- -
-
-
diff --git a/src/modules/ui/directives/transaction/types/set-asset-script.html b/src/modules/ui/directives/transaction/types/set-asset-script.html deleted file mode 100644 index 0962d953e1..0000000000 --- a/src/modules/ui/directives/transaction/types/set-asset-script.html +++ /dev/null @@ -1,13 +0,0 @@ -
-
-
- - -
- -
-
-
-
-
diff --git a/src/modules/ui/directives/transaction/types/set-script-cancel.html b/src/modules/ui/directives/transaction/types/set-script-cancel.html deleted file mode 100644 index 311c101749..0000000000 --- a/src/modules/ui/directives/transaction/types/set-script-cancel.html +++ /dev/null @@ -1,7 +0,0 @@ -
-
-
- -
-
-
diff --git a/src/modules/ui/directives/transaction/types/set-script.html b/src/modules/ui/directives/transaction/types/set-script.html deleted file mode 100644 index b52b4ad558..0000000000 --- a/src/modules/ui/directives/transaction/types/set-script.html +++ /dev/null @@ -1,7 +0,0 @@ -
-
-
- -
-
-
diff --git a/src/modules/ui/directives/transaction/types/sponsorship.html b/src/modules/ui/directives/transaction/types/sponsorship.html deleted file mode 100644 index c6e41364ff..0000000000 --- a/src/modules/ui/directives/transaction/types/sponsorship.html +++ /dev/null @@ -1,14 +0,0 @@ -
-
-
- - - -
- {{::$ctrl.time}} -
-
-
-
-
diff --git a/src/modules/ui/directives/transaction/types/sponsorship_fee.html b/src/modules/ui/directives/transaction/types/sponsorship_fee.html deleted file mode 100644 index 427769ead0..0000000000 --- a/src/modules/ui/directives/transaction/types/sponsorship_fee.html +++ /dev/null @@ -1,24 +0,0 @@ -
-
-
- -
-
- -
-
-
-
- -
-
-
diff --git a/src/modules/ui/directives/transaction/types/tokens.html b/src/modules/ui/directives/transaction/types/tokens.html deleted file mode 100644 index a2c72033b8..0000000000 --- a/src/modules/ui/directives/transaction/types/tokens.html +++ /dev/null @@ -1,25 +0,0 @@ -
-
-
- - -
-
- -
-
-
-
- - {{$ctrl.name}} -
-
- -
-
-
diff --git a/src/modules/ui/directives/transaction/types/transfer.html b/src/modules/ui/directives/transaction/types/transfer.html deleted file mode 100644 index a3b1ff1ebf..0000000000 --- a/src/modules/ui/directives/transaction/types/transfer.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - From 1d7275951d83beb5294de981800a4ba3e3fb6cbd Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 25 Apr 2019 19:02:06 +0300 Subject: [PATCH 107/150] CLIENT-1808: add unknown --- .../transaction/transaction-info-row.html | 29 +++++++++-------- .../directives/transaction/types/unknown.html | 13 -------- .../transaction/types/unknown/Unknown.js | 32 +++++++++++++++++++ .../transaction/types/unknown/unknown.html | 13 ++++++++ 4 files changed, 60 insertions(+), 27 deletions(-) delete mode 100644 src/modules/ui/directives/transaction/types/unknown.html create mode 100644 src/modules/ui/directives/transaction/types/unknown/Unknown.js create mode 100644 src/modules/ui/directives/transaction/types/unknown/unknown.html diff --git a/src/modules/ui/directives/transaction/transaction-info-row.html b/src/modules/ui/directives/transaction/transaction-info-row.html index 08587f20ae..3792090b08 100644 --- a/src/modules/ui/directives/transaction/transaction-info-row.html +++ b/src/modules/ui/directives/transaction/transaction-info-row.html @@ -1,15 +1,16 @@ -
- - - - - - - - - - - - - +
+ + + + + + + + + + + + + + def
diff --git a/src/modules/ui/directives/transaction/types/unknown.html b/src/modules/ui/directives/transaction/types/unknown.html deleted file mode 100644 index 46319e7eb9..0000000000 --- a/src/modules/ui/directives/transaction/types/unknown.html +++ /dev/null @@ -1,13 +0,0 @@ -
-
-
- -
-
-
-
- -
-
-
diff --git a/src/modules/ui/directives/transaction/types/unknown/Unknown.js b/src/modules/ui/directives/transaction/types/unknown/Unknown.js new file mode 100644 index 0000000000..c05b06bf54 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/unknown/Unknown.js @@ -0,0 +1,32 @@ +(function () { + 'use strict'; + + const controller = function () { + + class Unknown { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.subheaderParams = { + time: this.props.time + }; + } + + } + + return new Unknown(); + }; + + angular.module('app.ui').component('wUnknown', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/unknown/unknown.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/unknown/unknown.html b/src/modules/ui/directives/transaction/types/unknown/unknown.html new file mode 100644 index 0000000000..95828fb417 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/unknown/unknown.html @@ -0,0 +1,13 @@ +
+
+
+ +
+
+
+
+ +
+
+
From 5d4365a4ce206adcf7a0552128f9e3bfcfefb96e Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Thu, 25 Apr 2019 19:02:35 +0300 Subject: [PATCH 108/150] CLIENT-1808: add unknown --- src/modules/ui/directives/transaction/transaction-info-row.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ui/directives/transaction/transaction-info-row.html b/src/modules/ui/directives/transaction/transaction-info-row.html index 3792090b08..819d0d99d4 100644 --- a/src/modules/ui/directives/transaction/transaction-info-row.html +++ b/src/modules/ui/directives/transaction/transaction-info-row.html @@ -12,5 +12,5 @@ - def +
From ba328fe3b7d697dde63d03f5fa6d8e5906703ef9 Mon Sep 17 00:00:00 2001 From: tsigel Date: Fri, 26 Apr 2019 10:25:39 +0300 Subject: [PATCH 109/150] CLIENT-1841: fix url --- ts-scripts/meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts-scripts/meta.json b/ts-scripts/meta.json index 59516843a8..bc8e6f25ed 100644 --- a/ts-scripts/meta.json +++ b/ts-scripts/meta.json @@ -42,7 +42,7 @@ "node_modules/ts-utils/dist/ts-utils.min.js", "node_modules/@waves/waves-browser-bus/dist/browser-bus.min.js" ], - "analyticsIframe": "https://iframe-test.wvservices.com/index.html", + "analyticsIframe": "https://iframe.wavesplatform.com", "langList": { "en": { "name": "En", From 9b657243bf87ba452e7c8375863173894a3ab20f Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Fri, 26 Apr 2019 10:25:54 +0300 Subject: [PATCH 110/150] CLIENT-1772: rename getLocales and handle error --- server.ts | 4 ++-- ts-scripts/utils.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/server.ts b/server.ts index fb7af9a03c..2cfe1d9ad4 100644 --- a/server.ts +++ b/server.ts @@ -1,6 +1,6 @@ import { createSecureServer } from 'http2'; import { createServer } from 'https'; -import { route, parseArguments, stat, getLocales } from './ts-scripts/utils'; +import { route, parseArguments, stat, loadLocales } from './ts-scripts/utils'; import { readFileSync, existsSync,mkdirSync } from 'fs'; import { serialize, parse as parserCookie } from 'cookie'; import { compile } from 'handlebars'; @@ -76,7 +76,7 @@ function createMyServer(port) { if (!existsSync(cachePath)){ mkdirSync(cachePath); } - getLocales(cachePath); + loadLocales(cachePath); if (args.openUrl) { opn(url); diff --git a/ts-scripts/utils.ts b/ts-scripts/utils.ts index 44097139a2..49a427f448 100644 --- a/ts-scripts/utils.ts +++ b/ts-scripts/utils.ts @@ -537,10 +537,14 @@ export function route(connectionType: TConnection, buildType: TBuild, type: TPla if (existsSync(cachePath)) { if (isModified(cachePath) && lang === 'ru' && ns === 'app') { - getLocales(localePath) + loadLocales(localePath) .then(() => { const data = readFileSync(cachePath); res.end(data); + }) + .catch(error => { + res.statusCode = 404; + res.end(error); }); } else { const data = readFileSync(cachePath); @@ -761,7 +765,7 @@ function routeStatic(req, res, connectionType: TConnection, buildType: TBuild, p stat(req, res, ROOTS); } -export function getLocales(path: string, options?: object) { +export function loadLocales(path: string, options?: object) { const postOptions = { method: 'POST', hostname: 'api.lokalise.co', From 69a11775f82d1d729a83a9349d0f5f0ea3aa1b16 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Fri, 26 Apr 2019 10:39:45 +0300 Subject: [PATCH 111/150] CLIENT-1772: rename in gulpfile --- gulpfile.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gulpfile.ts b/gulpfile.ts index d15af099e7..8cb4b64a59 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -12,7 +12,7 @@ import { getScripts, getStyles, getInitScript, - getLocales + loadLocales } from './ts-scripts/utils'; import { basename, extname, join, sep } from 'path'; import { @@ -43,7 +43,7 @@ const configurations = Object.keys(meta.configurations); const SOURCE_FILES = getFilesFrom(join(__dirname, 'src'), '.js'); const IMAGE_LIST = getFilesFrom(join(__dirname, 'src', 'img'), ['.png', '.svg', '.jpg'], (name, path) => path.indexOf('no-preload') === -1); -const JSON_LIST = getFilesFrom(join(__dirname, 'src'), '.json'); +const JSON_LIST = getFilesFrom(join(__digrname, 'src'), '.json'); const taskHash = { concat: [], @@ -292,7 +292,7 @@ task('concat-develop-vendors', function () { task('downloadLocales', ['concat-develop-sources'], function (done) { const dist = join(__dirname, 'dist'); - getLocales(dist).then(() => done()); + loadLocales(dist).then(() => done()); }); task('clean', function () { @@ -431,7 +431,7 @@ task('electron-debug', function (done) { .then(excludeTypeScrip) .then(list => Promise.all(list.map(copyItem))) .then(makePackageJSON) - .then(() => getLocales(root)) + .then(() => loadLocales(root)) .then(() => renameLocaleDirectory()) .then(copyNodeModules) .then(copyI18next) From da25453a12263d21024457ff49def25e54b15564 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Fri, 26 Apr 2019 10:40:20 +0300 Subject: [PATCH 112/150] CLIENT-1772: fix typo --- gulpfile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.ts b/gulpfile.ts index 8cb4b64a59..4207f103ed 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -43,7 +43,7 @@ const configurations = Object.keys(meta.configurations); const SOURCE_FILES = getFilesFrom(join(__dirname, 'src'), '.js'); const IMAGE_LIST = getFilesFrom(join(__dirname, 'src', 'img'), ['.png', '.svg', '.jpg'], (name, path) => path.indexOf('no-preload') === -1); -const JSON_LIST = getFilesFrom(join(__digrname, 'src'), '.json'); +const JSON_LIST = getFilesFrom(join(__dirname, 'src'), '.json'); const taskHash = { concat: [], From 91b9fedacb07987b46e51db1bc2b647400292fa8 Mon Sep 17 00:00:00 2001 From: tsigel Date: Fri, 26 Apr 2019 10:44:13 +0300 Subject: [PATCH 113/150] CLIENT-1847: up package json version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 041796a4fa..249349e31e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "waves-client", - "version": "1.2.4", + "version": "1.2.5", "description": "The official client application for the Waves platform", "private": true, "repository": { From d30a297742bc0843d260a1517e6c42c3276c6994 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Fri, 26 Apr 2019 10:55:11 +0300 Subject: [PATCH 114/150] CLIENT-1808: delete useless --- src/modules/ui/directives/transaction/TokensGeneral.js | 3 +-- .../ui/directives/transaction/types/sponsorship/Sponsorship.js | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/modules/ui/directives/transaction/TokensGeneral.js b/src/modules/ui/directives/transaction/TokensGeneral.js index 09b3642895..56e4941389 100644 --- a/src/modules/ui/directives/transaction/TokensGeneral.js +++ b/src/modules/ui/directives/transaction/TokensGeneral.js @@ -25,9 +25,8 @@ tsUtils.get(this.props, 'quantity.asset') || this.props ); - this.time = this.props.time; this.name = tsUtils.get(this.props, 'amount.asset.name') || - tsUtils.get(this.props, 'quantity.asset.name'); + tsUtils.get(this.props, 'quantity.asset.name'); const amount = tsUtils.get(this.props, 'amount') || tsUtils.get(this.props, 'quantity'); this.amountParams = { diff --git a/src/modules/ui/directives/transaction/types/sponsorship/Sponsorship.js b/src/modules/ui/directives/transaction/types/sponsorship/Sponsorship.js index 9d3e0fe43a..af7c44ec31 100644 --- a/src/modules/ui/directives/transaction/types/sponsorship/Sponsorship.js +++ b/src/modules/ui/directives/transaction/types/sponsorship/Sponsorship.js @@ -19,7 +19,6 @@ $postLink() { this.typeName = this.props.typeName; - this.sponsorshipFee = this.props.minSponsoredAssetFee; this.assetName = this.getAssetName( tsUtils.get(this.props, 'minSponsoredAssetFee.asset') ); From 91c790c4e693135a459ff10dcb66568f2c24c61a Mon Sep 17 00:00:00 2001 From: uiskander Date: Fri, 26 Apr 2019 12:49:29 +0300 Subject: [PATCH 115/150] Merge branch 'dev' of https://github.com/wavesplatform/WavesGUI into client-1784-stand-update # Conflicts: # src/modules/utils/modals/tutorialModals/tutorialModals.less # src/modules/wallet/modules/leasing/templates/leasing.html # src/modules/welcome/templates/welcome.html --- .../directives/infoTooltip/infoTooltip.less | 3 +- .../modals/tutorialModals/tutorialModals.less | 45 ------------------- .../modules/leasing/templates/leasing.html | 3 +- 3 files changed, 4 insertions(+), 47 deletions(-) diff --git a/src/modules/ui/directives/infoTooltip/infoTooltip.less b/src/modules/ui/directives/infoTooltip/infoTooltip.less index 71df82e885..f77830a53d 100644 --- a/src/modules/ui/directives/infoTooltip/infoTooltip.less +++ b/src/modules/ui/directives/infoTooltip/infoTooltip.less @@ -20,11 +20,12 @@ w-info-tooltip { } .tooltip { + min-height: 30px; display: none; position: absolute; bottom: 100%; padding: 5px 0 5px 10px; - transform: translate(calc(-50%~'+ 8px'), -6px); + transform: translate(calc(-50%~'+ 8px'), -8px); z-index: 2; cursor: pointer; border-radius: @border-radius; diff --git a/src/modules/utils/modals/tutorialModals/tutorialModals.less b/src/modules/utils/modals/tutorialModals/tutorialModals.less index 4e75adacb9..9210002946 100644 --- a/src/modules/utils/modals/tutorialModals/tutorialModals.less +++ b/src/modules/utils/modals/tutorialModals/tutorialModals.less @@ -75,51 +75,6 @@ } } -.tooltip { - display: none; - position: absolute; - padding: 0 10px; - top: 0; - right: 158px; - transform-origin: center; - transform: translate(50%, 8px); - z-index: 2; - padding-bottom: 20px; - color: @color-white; - font-size: @font-size-caption-2; - line-height: 28px; - cursor: pointer; - - &::before { - position: absolute; - bottom: 17px; - left: calc(50% ~'- 5px'); - width: 10px; - height: 10px; - content: ''; - transform-origin: center; - transform: rotate(45deg); - background: @color-basic-700; - z-index: -1; - } - - &::after { - border-radius: @border-radius; - position: absolute; - background: @color-basic-700; - width: 100%; - height: 28px; - content: ''; - left: 0; - top: 0; - z-index: -1; - } - - &:hover { - display: inline-block; - } -} - body md-dialog.tutorial-modals { .mobile-only { display: none; diff --git a/src/modules/wallet/modules/leasing/templates/leasing.html b/src/modules/wallet/modules/leasing/templates/leasing.html index fc0fabaa32..6ec99c3a70 100644 --- a/src/modules/wallet/modules/leasing/templates/leasing.html +++ b/src/modules/wallet/modules/leasing/templates/leasing.html @@ -2,7 +2,7 @@
-
+
@@ -30,6 +30,7 @@ +
From 66e30848dc8a9ae8222e7b282742cbb1ba091a93 Mon Sep 17 00:00:00 2001 From: uiskander Date: Fri, 26 Apr 2019 12:53:13 +0300 Subject: [PATCH 116/150] Merge branch 'dev' of https://github.com/wavesplatform/WavesGUI into client-1784-stand-update # Conflicts: # src/modules/utils/modals/tutorialModals/tutorialModals.less # src/modules/wallet/modules/leasing/templates/leasing.html # src/modules/welcome/templates/welcome.html --- src/modules/stand/templates/stand.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/stand/templates/stand.html b/src/modules/stand/templates/stand.html index 9d56837fde..8c6f72a11f 100644 --- a/src/modules/stand/templates/stand.html +++ b/src/modules/stand/templates/stand.html @@ -233,7 +233,7 @@

Errors

ng-model="$ctrl.inputModel" w-validator-custom="{{$ctrl.invalid}}" required> - This field is requied +
This field is requied
@@ -347,7 +347,7 @@

Expandable block

-

Modal window killer

+

Close modal button

From e1abb7bf0fa9446e2653aee69c16682b0529aaad Mon Sep 17 00:00:00 2001 From: tsigel Date: Mon, 29 Apr 2019 08:51:07 +0300 Subject: [PATCH 117/150] CLIENT-1848: fix json bignumber lib --- package-lock.json | 15 +++++++++++---- package.json | 2 +- ts-scripts/utils.ts | 7 ++++++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b92edb7552..f97c9d1ebf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "waves-client", - "version": "1.2.3", + "version": "1.2.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -668,6 +668,13 @@ "base64-js": "^1.3.0", "long": "^4.0.0", "parse-json-bignumber": "^0.1.2" + }, + "dependencies": { + "parse-json-bignumber": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/parse-json-bignumber/-/parse-json-bignumber-0.1.3.tgz", + "integrity": "sha512-eE2NSq0PNe3yrtGVTuxrJSpP1pm2/NTRhfhsKA8oy2jDiYAK8BETabTFSymvw3pz6uuu8c4GpWRCCuVEdDFr8g==" + } } }, "@waves/oracle-data": { @@ -10355,9 +10362,9 @@ } }, "parse-json-bignumber": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/parse-json-bignumber/-/parse-json-bignumber-0.1.2.tgz", - "integrity": "sha512-iW8sZTHi0Ozsi15vKZMCZi5qrkohYW1Z5BrSZ3GPO/EwWcfH0uUozlOBuS/SL6n/mBzSMgxNQj46WiN1oVKDUg==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-json-bignumber/-/parse-json-bignumber-1.0.0.tgz", + "integrity": "sha512-iUBAXzuCH4NQG5hTe/6nCCe1+u4HBF2yCrrbtOjUAk1qaEVaEOFaR/TXoZuG1FhNWmIIDOrw03V9PQ+/TBpIYA==" }, "parse-node-version": { "version": "1.0.0", diff --git a/package.json b/package.json index 041796a4fa..eb85b00ceb 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "n3-charts": "2.0.28", "ng-i18next": "1.0.5", "papaparse": "4.3.7", - "parse-json-bignumber": "^0.1.2", + "parse-json-bignumber": "^1.0.0", "qrcode": "1.3.2", "qrcode-reader": "1.0.4", "ramda": "^0.25.0", diff --git a/ts-scripts/utils.ts b/ts-scripts/utils.ts index 97a3118768..eb110cf8a5 100644 --- a/ts-scripts/utils.ts +++ b/ts-scripts/utils.ts @@ -369,7 +369,12 @@ export async function getInitScript(connectionType: TConnection, buildType: TBui (self as any).parse = parseJsonBignumber().parse; }); - var stringify = parseJsonBignumber({ BigNumber: BigNumber }).stringify; + var stringify = parseJsonBignumber({ + parse: (data: string) => new BigNumber(data), + stringify: (data) => data.toFixed(), + isInstance: (data) => BigNumber.isBigNumber(data) + }).stringify; + WavesApp.parseJSON = function (str) { return worker.process(function (str) { return parse(str); From 18ed798c798a49d9c87e1412eb6ab709810f56f4 Mon Sep 17 00:00:00 2001 From: okanishcheva Date: Mon, 29 Apr 2019 10:45:45 +0300 Subject: [PATCH 118/150] CLIENT-1808: refactoring --- .../directives/transaction/TokensGeneral.js | 70 ------------- .../transaction/TransactionAmount.js | 11 --- .../transaction/TransactionHeader.js | 11 --- .../transaction/TransactionSubheader.js | 11 --- .../directives/transaction/TransferGeneral.js | 97 ------------------ .../transaction/tokens-general.html | 22 ----- .../transaction/transaction-amount.html | 2 - .../transaction/transaction-header.html | 2 - .../transaction/transaction-info-row.html | 4 +- .../transaction/transaction-subheader.html | 2 - .../transaction/transfer-general.html | 23 ----- .../directives/transaction/types/burn/Burn.js | 56 ++++++++++- .../transaction/types/burn/burn.html | 21 +++- .../types/cancel-leasing/CancelLeasing.js | 29 +----- .../types/cancel-leasing/cancel-leasing.html | 12 ++- .../types/create-alias/CreateAlias.js | 25 +---- .../types/create-alias/create-alias.html | 6 +- .../directives/transaction/types/data/Data.js | 24 +---- .../transaction/types/data/data.html | 6 +- .../transaction/types/exchange/Exchange.js | 3 - .../transaction/types/exchange/exchange.html | 14 +-- .../transaction/types/issue/Issue.js | 56 ++++++++++- .../transaction/types/issue/issue.html | 24 ++++- .../transaction/types/lease/Lease.js | 29 +----- .../transaction/types/lease/lease.html | 11 ++- .../types/mass-transfer/MassTransfer.js | 99 ++++++++++++++++++- .../types/mass-transfer/mass-transfer.html | 24 ++++- .../transaction/types/reissue/Reissue.js | 56 ++++++++++- .../transaction/types/reissue/reissue.html | 24 ++++- .../types/set-asset-script/SetAssetScript.js | 6 +- .../set-asset-script/set-asset-script.html | 6 +- .../transaction/types/set-script/SetScript.js | 21 +--- .../types/set-script/set-script.html | 2 +- .../types/sponsorship/Sponsorship.js | 2 - .../types/sponsorship/sponsorship.html | 4 +- .../transaction/types/transfer/Transfer.js | 95 ++++++++++++++++++ .../transaction/types/transfer/transfer.html | 24 ++++- .../transaction/types/unknown/Unknown.js | 24 +---- .../transaction/types/unknown/unknown.html | 6 +- 39 files changed, 513 insertions(+), 451 deletions(-) delete mode 100644 src/modules/ui/directives/transaction/TokensGeneral.js delete mode 100644 src/modules/ui/directives/transaction/TransactionAmount.js delete mode 100644 src/modules/ui/directives/transaction/TransactionHeader.js delete mode 100644 src/modules/ui/directives/transaction/TransactionSubheader.js delete mode 100644 src/modules/ui/directives/transaction/TransferGeneral.js delete mode 100644 src/modules/ui/directives/transaction/tokens-general.html delete mode 100644 src/modules/ui/directives/transaction/transaction-amount.html delete mode 100644 src/modules/ui/directives/transaction/transaction-header.html delete mode 100644 src/modules/ui/directives/transaction/transaction-subheader.html delete mode 100644 src/modules/ui/directives/transaction/transfer-general.html diff --git a/src/modules/ui/directives/transaction/TokensGeneral.js b/src/modules/ui/directives/transaction/TokensGeneral.js deleted file mode 100644 index 56e4941389..0000000000 --- a/src/modules/ui/directives/transaction/TokensGeneral.js +++ /dev/null @@ -1,70 +0,0 @@ -(function () { - 'use strict'; - - const tsUtils = require('ts-utils'); - const { Money } = require('@waves/data-entities'); - - /** - * @param {User} user - * @return {TokensGeneral} - */ - - const controller = function (user) { - - class TokensGeneral { - - /** - * {object} - */ - props = null; - - $postLink() { - this.typeName = this.props.typeName; - this.assetName = this.getAssetName( - tsUtils.get(this.props, 'amount.asset') || - tsUtils.get(this.props, 'quantity.asset') || - this.props - ); - this.name = tsUtils.get(this.props, 'amount.asset.name') || - tsUtils.get(this.props, 'quantity.asset.name'); - - const amount = tsUtils.get(this.props, 'amount') || tsUtils.get(this.props, 'quantity'); - this.amountParams = { - amount: amount instanceof Money ? amount.toFormat() : amount.div(Math.pow(10, this.props.precision)) - }; - this.subheaderParams = { - time: this.props.time - }; - this.reissuable = this.props.reissuable; - this.reissuableDefined = typeof this.reissuable !== 'undefined'; - } - - /** - * @param {{id: string, name: string}} asset - * @return {string} - */ - getAssetName(asset) { - try { - return !user.scam[asset.id] ? asset.name : ''; - } catch (e) { - return ''; - } - } - - } - - return new TokensGeneral(); - }; - - controller.$inject = [ - 'user' - ]; - - angular.module('app.ui').component('wTokensGeneral', { - bindings: { - props: '<' - }, - templateUrl: 'modules/ui/directives/transaction/tokens-general.html', - controller - }); -})(); diff --git a/src/modules/ui/directives/transaction/TransactionAmount.js b/src/modules/ui/directives/transaction/TransactionAmount.js deleted file mode 100644 index 906d905040..0000000000 --- a/src/modules/ui/directives/transaction/TransactionAmount.js +++ /dev/null @@ -1,11 +0,0 @@ -(function () { - 'use strict'; - - angular.module('app.ui').component('wTransactionAmount', { - bindings: { - params: '<', - typeName: '<' - }, - templateUrl: 'modules/ui/directives/transaction/transaction-amount.html' - }); -})(); diff --git a/src/modules/ui/directives/transaction/TransactionHeader.js b/src/modules/ui/directives/transaction/TransactionHeader.js deleted file mode 100644 index f1ce42c254..0000000000 --- a/src/modules/ui/directives/transaction/TransactionHeader.js +++ /dev/null @@ -1,11 +0,0 @@ -(function () { - 'use strict'; - - angular.module('app.ui').component('wTransactionHeader', { - bindings: { - typeName: '<', - assetName: '<' - }, - templateUrl: 'modules/ui/directives/transaction/transaction-header.html' - }); -})(); diff --git a/src/modules/ui/directives/transaction/TransactionSubheader.js b/src/modules/ui/directives/transaction/TransactionSubheader.js deleted file mode 100644 index 7573c91c36..0000000000 --- a/src/modules/ui/directives/transaction/TransactionSubheader.js +++ /dev/null @@ -1,11 +0,0 @@ -(function () { - 'use strict'; - - angular.module('app.ui').component('wTransactionSubheader', { - bindings: { - params: '<', - typeName: '<' - }, - templateUrl: 'modules/ui/directives/transaction/transaction-subheader.html' - }); -})(); diff --git a/src/modules/ui/directives/transaction/TransferGeneral.js b/src/modules/ui/directives/transaction/TransferGeneral.js deleted file mode 100644 index 96e3d6f7ba..0000000000 --- a/src/modules/ui/directives/transaction/TransferGeneral.js +++ /dev/null @@ -1,97 +0,0 @@ -(function () { - 'use strict'; - - /** - * @param {User} user - * @param {BaseAssetService} baseAssetService - * @param {Waves} waves - * @param {$rootScope.Scope} $scope - * @return {TransferGeneral} - */ - - const controller = function (user, baseAssetService, waves, $scope) { - - class TransferGeneral { - - /** - * {object} - */ - props = null; - - $postLink() { - this.typeName = this.props.typeName; - this.subheaderParams = { - time: this.props.time, - address: this.props.shownAddress - }; - - const TYPES = waves.node.transactions.TYPES; - - switch (this.typeName) { - case TYPES.SPONSORSHIP_FEE: - this.sponsoredFee(); - break; - default: - this.transfered(); - } - } - - /** - * @param {{id: string, name: string}} asset - * @return {string} - */ - getAssetName(asset) { - try { - return !user.scam[asset.id] ? asset.name : ''; - } catch (e) { - return ''; - } - } - - sponsoredFee() { - this.assetName = this.getAssetName(this.props.fee.asset); - this.amountParams = { - sign: '+', - amount: this.props.fee.toFormat(), - name: this.props.fee.asset.name - }; - } - - transfered() { - this.assetName = this.getAssetName(this.props.amount.asset); - this.amountParams = { - amount: this.props.amount.toFormat(), - name: this.props.amount.asset.name - }; - if (this.props.amount && this.props.amount instanceof ds.wavesDataEntities.Money) { - baseAssetService.convertToBaseAsset(this.props.amount) - .then((baseMoney) => { - this.mirrorBalanceParams = { - amount: baseMoney.toFormat(), - name: baseMoney.asset.name - }; - $scope.$digest(); - }); - } - } - - } - - return new TransferGeneral(); - }; - - controller.$inject = [ - 'user', - 'baseAssetService', - 'waves', - '$scope' - ]; - - angular.module('app.ui').component('wTransferGeneral', { - bindings: { - props: '<' - }, - templateUrl: 'modules/ui/directives/transaction/transfer-general.html', - controller - }); -})(); diff --git a/src/modules/ui/directives/transaction/tokens-general.html b/src/modules/ui/directives/transaction/tokens-general.html deleted file mode 100644 index 876954a59a..0000000000 --- a/src/modules/ui/directives/transaction/tokens-general.html +++ /dev/null @@ -1,22 +0,0 @@ -
-
-
- - -
-
- -
-
-
-
- - {{$ctrl.name}} -
-
- -
-
-
diff --git a/src/modules/ui/directives/transaction/transaction-amount.html b/src/modules/ui/directives/transaction/transaction-amount.html deleted file mode 100644 index 7ff6b1beb7..0000000000 --- a/src/modules/ui/directives/transaction/transaction-amount.html +++ /dev/null @@ -1,2 +0,0 @@ - diff --git a/src/modules/ui/directives/transaction/transaction-header.html b/src/modules/ui/directives/transaction/transaction-header.html deleted file mode 100644 index f420094820..0000000000 --- a/src/modules/ui/directives/transaction/transaction-header.html +++ /dev/null @@ -1,2 +0,0 @@ - diff --git a/src/modules/ui/directives/transaction/transaction-info-row.html b/src/modules/ui/directives/transaction/transaction-info-row.html index 819d0d99d4..0826d8b247 100644 --- a/src/modules/ui/directives/transaction/transaction-info-row.html +++ b/src/modules/ui/directives/transaction/transaction-info-row.html @@ -1,13 +1,13 @@
- + - + diff --git a/src/modules/ui/directives/transaction/transaction-subheader.html b/src/modules/ui/directives/transaction/transaction-subheader.html deleted file mode 100644 index efa8de815a..0000000000 --- a/src/modules/ui/directives/transaction/transaction-subheader.html +++ /dev/null @@ -1,2 +0,0 @@ - diff --git a/src/modules/ui/directives/transaction/transfer-general.html b/src/modules/ui/directives/transaction/transfer-general.html deleted file mode 100644 index b839f36675..0000000000 --- a/src/modules/ui/directives/transaction/transfer-general.html +++ /dev/null @@ -1,23 +0,0 @@ -
-
-
- - -
-
- -
-
-
-
- -
-
- -
-
-
diff --git a/src/modules/ui/directives/transaction/types/burn/Burn.js b/src/modules/ui/directives/transaction/types/burn/Burn.js index b52389ffa5..317eb8821a 100644 --- a/src/modules/ui/directives/transaction/types/burn/Burn.js +++ b/src/modules/ui/directives/transaction/types/burn/Burn.js @@ -1,10 +1,64 @@ (function () { 'use strict'; + const tsUtils = require('ts-utils'); + const { Money } = require('@waves/data-entities'); + + /** + * @param {User} user + * @return {Burn} + */ + + const controller = function (user) { + + class Burn { + + /** + * {object} + */ + props = null; + + $postLink() { + this.assetName = this.getAssetName( + tsUtils.get(this.props, 'amount.asset') || + tsUtils.get(this.props, 'quantity.asset') || + this.props + ); + this.name = tsUtils.get(this.props, 'amount.asset.name') || + tsUtils.get(this.props, 'quantity.asset.name'); + + const amount = tsUtils.get(this.props, 'amount') || tsUtils.get(this.props, 'quantity'); + this.amount = amount instanceof Money ? + amount.toFormat() : + amount.div(Math.pow(10, this.props.precision)); + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + } + + return new Burn(); + }; + + controller.$inject = [ + 'user' + ]; + angular.module('app.ui').component('wBurn', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/burn/burn.html' + templateUrl: 'modules/ui/directives/transaction/types/burn/burn.html', + controller }); })(); diff --git a/src/modules/ui/directives/transaction/types/burn/burn.html b/src/modules/ui/directives/transaction/types/burn/burn.html index c8d89f9eea..c6b9791f75 100644 --- a/src/modules/ui/directives/transaction/types/burn/burn.html +++ b/src/modules/ui/directives/transaction/types/burn/burn.html @@ -1 +1,20 @@ - +
+
+
+ + +
+
+ +
+
+
+
+ + {{$ctrl.name}} +
+
+
diff --git a/src/modules/ui/directives/transaction/types/cancel-leasing/CancelLeasing.js b/src/modules/ui/directives/transaction/types/cancel-leasing/CancelLeasing.js index 3a8b7f4833..f5bff46b63 100644 --- a/src/modules/ui/directives/transaction/types/cancel-leasing/CancelLeasing.js +++ b/src/modules/ui/directives/transaction/types/cancel-leasing/CancelLeasing.js @@ -1,37 +1,10 @@ (function () { 'use strict'; - const controller = function () { - - class CancelLeasing { - - /** - * {object} - */ - props = null; - - $postLink() { - this.typeName = this.props.typeName; - this.subheaderParams = { - time: this.props.time, - transactionId: this.props.leaseId - }; - this.amountParams = { - amount: this.props.lease.amount.toFormat(), - name: this.props.lease.amount.asset.name - }; - } - - } - - return new CancelLeasing(); - }; - angular.module('app.ui').component('wCancelLeasing', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/cancel-leasing/cancel-leasing.html', - controller + templateUrl: 'modules/ui/directives/transaction/types/cancel-leasing/cancel-leasing.html' }); })(); diff --git a/src/modules/ui/directives/transaction/types/cancel-leasing/cancel-leasing.html b/src/modules/ui/directives/transaction/types/cancel-leasing/cancel-leasing.html index d9a562499a..f2b5358bbf 100644 --- a/src/modules/ui/directives/transaction/types/cancel-leasing/cancel-leasing.html +++ b/src/modules/ui/directives/transaction/types/cancel-leasing/cancel-leasing.html @@ -2,17 +2,19 @@
- +
- +
- +
diff --git a/src/modules/ui/directives/transaction/types/create-alias/CreateAlias.js b/src/modules/ui/directives/transaction/types/create-alias/CreateAlias.js index 39f95158d4..b6e8618f35 100644 --- a/src/modules/ui/directives/transaction/types/create-alias/CreateAlias.js +++ b/src/modules/ui/directives/transaction/types/create-alias/CreateAlias.js @@ -1,33 +1,10 @@ (function () { 'use strict'; - const controller = function () { - - class CreateAlias { - - /** - * {object} - */ - props = null; - - $postLink() { - this.typeName = this.props.typeName; - this.subheaderParams = { - time: this.props.time, - alias: this.props.alias - }; - } - - } - - return new CreateAlias(); - }; - angular.module('app.ui').component('wCreateAlias', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/create-alias/create-alias.html', - controller + templateUrl: 'modules/ui/directives/transaction/types/create-alias/create-alias.html' }); })(); diff --git a/src/modules/ui/directives/transaction/types/create-alias/create-alias.html b/src/modules/ui/directives/transaction/types/create-alias/create-alias.html index 862e19191e..eb9dd8a344 100644 --- a/src/modules/ui/directives/transaction/types/create-alias/create-alias.html +++ b/src/modules/ui/directives/transaction/types/create-alias/create-alias.html @@ -1,11 +1,11 @@
- +
- +
diff --git a/src/modules/ui/directives/transaction/types/data/Data.js b/src/modules/ui/directives/transaction/types/data/Data.js index 748aa146aa..df1cd690ca 100644 --- a/src/modules/ui/directives/transaction/types/data/Data.js +++ b/src/modules/ui/directives/transaction/types/data/Data.js @@ -1,32 +1,10 @@ (function () { 'use strict'; - const controller = function () { - - class Data { - - /** - * {object} - */ - props = null; - - $postLink() { - this.typeName = this.props.typeName; - this.subheaderParams = { - time: this.props.time - }; - } - - } - - return new Data(); - }; - angular.module('app.ui').component('wData', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/data/data.html', - controller + templateUrl: 'modules/ui/directives/transaction/types/data/data.html' }); })(); diff --git a/src/modules/ui/directives/transaction/types/data/data.html b/src/modules/ui/directives/transaction/types/data/data.html index c2992546d8..e7bd83e3e6 100644 --- a/src/modules/ui/directives/transaction/types/data/data.html +++ b/src/modules/ui/directives/transaction/types/data/data.html @@ -1,12 +1,12 @@
- +
- +
diff --git a/src/modules/ui/directives/transaction/types/exchange/Exchange.js b/src/modules/ui/directives/transaction/types/exchange/Exchange.js index e0444498f6..3e29a9290d 100644 --- a/src/modules/ui/directives/transaction/types/exchange/Exchange.js +++ b/src/modules/ui/directives/transaction/types/exchange/Exchange.js @@ -22,9 +22,6 @@ this.priceAssetName = this.getAssetName(this.props.price.asset); this.isScamAmount = !!user.scam[this.props.amount.asset]; this.isScamPrice = !!user.scam[this.props.price.asset]; - this.subheaderParams = { - time: this.props.time - }; this.amountParams = { sign: this.typeName === 'exchange-buy' ? '+' : '–', amount: this.props.amount.toFormat(), diff --git a/src/modules/ui/directives/transaction/types/exchange/exchange.html b/src/modules/ui/directives/transaction/types/exchange/exchange.html index 604accda8c..3b0e09e39d 100644 --- a/src/modules/ui/directives/transaction/types/exchange/exchange.html +++ b/src/modules/ui/directives/transaction/types/exchange/exchange.html @@ -2,7 +2,7 @@
- + {{$ctrl.amountAssetName}}
- +
- +
- +
diff --git a/src/modules/ui/directives/transaction/types/issue/Issue.js b/src/modules/ui/directives/transaction/types/issue/Issue.js index bebabc68eb..c2571b2405 100644 --- a/src/modules/ui/directives/transaction/types/issue/Issue.js +++ b/src/modules/ui/directives/transaction/types/issue/Issue.js @@ -1,10 +1,64 @@ (function () { 'use strict'; + const tsUtils = require('ts-utils'); + const { Money } = require('@waves/data-entities'); + + /** + * @param {User} user + * @return {Issue} + */ + + const controller = function (user) { + + class Issue { + + /** + * {object} + */ + props = null; + + $postLink() { + this.assetName = this.getAssetName( + tsUtils.get(this.props, 'amount.asset') || + tsUtils.get(this.props, 'quantity.asset') || + this.props + ); + this.name = tsUtils.get(this.props, 'amount.asset.name') || + tsUtils.get(this.props, 'quantity.asset.name'); + + const amount = tsUtils.get(this.props, 'amount') || tsUtils.get(this.props, 'quantity'); + this.amount = amount instanceof Money ? + amount.toFormat() : + amount.div(Math.pow(10, this.props.precision)); + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + } + + return new Issue(); + }; + + controller.$inject = [ + 'user' + ]; + angular.module('app.ui').component('wIssue', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/issue/issue.html' + templateUrl: 'modules/ui/directives/transaction/types/issue/issue.html', + controller }); })(); diff --git a/src/modules/ui/directives/transaction/types/issue/issue.html b/src/modules/ui/directives/transaction/types/issue/issue.html index c8d89f9eea..856fd0e932 100644 --- a/src/modules/ui/directives/transaction/types/issue/issue.html +++ b/src/modules/ui/directives/transaction/types/issue/issue.html @@ -1 +1,23 @@ - +
+
+
+ + +
+
+ +
+
+
+
+ + {{$ctrl.name}} +
+
+ +
+
+
diff --git a/src/modules/ui/directives/transaction/types/lease/Lease.js b/src/modules/ui/directives/transaction/types/lease/Lease.js index 942c9fe9b5..2c91f7f99b 100644 --- a/src/modules/ui/directives/transaction/types/lease/Lease.js +++ b/src/modules/ui/directives/transaction/types/lease/Lease.js @@ -1,37 +1,10 @@ (function () { 'use strict'; - const controller = function () { - - class Lease { - - /** - * {object} - */ - props = null; - - $postLink() { - this.typeName = this.props.typeName; - this.subheaderParams = { - time: this.props.time, - address: this.props.shownAddress - }; - this.amountParams = { - amount: this.props.amount.toFormat(), - name: this.props.amount.asset.name - }; - } - - } - - return new Lease(); - }; - angular.module('app.ui').component('wLease', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/lease/lease.html', - controller + templateUrl: 'modules/ui/directives/transaction/types/lease/lease.html' }); })(); diff --git a/src/modules/ui/directives/transaction/types/lease/lease.html b/src/modules/ui/directives/transaction/types/lease/lease.html index 9a10510fc3..4bca69d870 100644 --- a/src/modules/ui/directives/transaction/types/lease/lease.html +++ b/src/modules/ui/directives/transaction/types/lease/lease.html @@ -3,17 +3,18 @@
- +
- +
- +
diff --git a/src/modules/ui/directives/transaction/types/mass-transfer/MassTransfer.js b/src/modules/ui/directives/transaction/types/mass-transfer/MassTransfer.js index 7c2e5e757d..03473793e7 100644 --- a/src/modules/ui/directives/transaction/types/mass-transfer/MassTransfer.js +++ b/src/modules/ui/directives/transaction/types/mass-transfer/MassTransfer.js @@ -1,10 +1,105 @@ (function () { 'use strict'; - angular.module('app.ui').component('wMassTransfer', { + angular.module('app.ui').component('wTransfer', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/mass-transfer/mass-transfer.html' + templateUrl: 'modules/ui/directives/transaction/types/transfer/transfer.html' + }); +})(); +(function () { + 'use strict'; + + /** + * @param {User} user + * @param {BaseAssetService} baseAssetService + * @param {Waves} waves + * @param {$rootScope.Scope} $scope + * @return {MassTransfer} + */ + + const controller = function (user, baseAssetService, waves, $scope) { + + class MassTransfer { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.time = this.props.time; + this.address = this.props.shownAddress; + + const TYPES = waves.node.transactions.TYPES; + + switch (this.typeName) { + case TYPES.SPONSORSHIP_FEE: + this.sponsoredFee(); + break; + default: + this.transfered(); + } + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + sponsoredFee() { + this.assetName = this.getAssetName(this.props.fee.asset); + this.amountParams = { + sign: '+', + amount: this.props.fee.toFormat(), + name: this.props.fee.asset.name + }; + } + + transfered() { + this.assetName = this.getAssetName(this.props.amount.asset); + this.amountParams = { + amount: this.props.amount.toFormat(), + name: this.props.amount.asset.name + }; + if (this.props.amount && this.props.amount instanceof ds.wavesDataEntities.Money) { + baseAssetService.convertToBaseAsset(this.props.amount) + .then((baseMoney) => { + this.mirrorBalanceParams = { + amount: baseMoney.toFormat(), + name: baseMoney.asset.name + }; + $scope.$digest(); + }); + } + } + + } + + return new MassTransfer(); + }; + + controller.$inject = [ + 'user', + 'baseAssetService', + 'waves', + '$scope' + ]; + + angular.module('app.ui').component('wMassTransferRow', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/mass-transfer/mass-transfer.html', + controller }); })(); diff --git a/src/modules/ui/directives/transaction/types/mass-transfer/mass-transfer.html b/src/modules/ui/directives/transaction/types/mass-transfer/mass-transfer.html index 25965bf0ed..37bfadd522 100644 --- a/src/modules/ui/directives/transaction/types/mass-transfer/mass-transfer.html +++ b/src/modules/ui/directives/transaction/types/mass-transfer/mass-transfer.html @@ -1 +1,23 @@ - +
+
+
+ + +
+
+ +
+
+
+
+ +
+
+ +
+
+
diff --git a/src/modules/ui/directives/transaction/types/reissue/Reissue.js b/src/modules/ui/directives/transaction/types/reissue/Reissue.js index 2e00625436..08aa2d9775 100644 --- a/src/modules/ui/directives/transaction/types/reissue/Reissue.js +++ b/src/modules/ui/directives/transaction/types/reissue/Reissue.js @@ -1,10 +1,64 @@ (function () { 'use strict'; + const tsUtils = require('ts-utils'); + const { Money } = require('@waves/data-entities'); + + /** + * @param {User} user + * @return {Reissue} + */ + + const controller = function (user) { + + class Reissue { + + /** + * {object} + */ + props = null; + + $postLink() { + this.assetName = this.getAssetName( + tsUtils.get(this.props, 'amount.asset') || + tsUtils.get(this.props, 'quantity.asset') || + this.props + ); + this.name = tsUtils.get(this.props, 'amount.asset.name') || + tsUtils.get(this.props, 'quantity.asset.name'); + + const amount = tsUtils.get(this.props, 'amount') || tsUtils.get(this.props, 'quantity'); + this.amount = amount instanceof Money ? + amount.toFormat() : + amount.div(Math.pow(10, this.props.precision)); + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + } + + return new Reissue(); + }; + + controller.$inject = [ + 'user' + ]; + angular.module('app.ui').component('wReissue', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/reissue/reissue.html' + templateUrl: 'modules/ui/directives/transaction/types/reissue/reissue.html', + controller }); })(); diff --git a/src/modules/ui/directives/transaction/types/reissue/reissue.html b/src/modules/ui/directives/transaction/types/reissue/reissue.html index c8d89f9eea..afee586c3c 100644 --- a/src/modules/ui/directives/transaction/types/reissue/reissue.html +++ b/src/modules/ui/directives/transaction/types/reissue/reissue.html @@ -1 +1,23 @@ - +
+
+
+ + +
+
+ +
+
+
+
+ + {{$ctrl.name}} +
+
+ +
+
+
diff --git a/src/modules/ui/directives/transaction/types/set-asset-script/SetAssetScript.js b/src/modules/ui/directives/transaction/types/set-asset-script/SetAssetScript.js index 8c107f5748..e27c8c8020 100644 --- a/src/modules/ui/directives/transaction/types/set-asset-script/SetAssetScript.js +++ b/src/modules/ui/directives/transaction/types/set-asset-script/SetAssetScript.js @@ -16,13 +16,9 @@ props = null; $postLink() { - this.typeName = this.props.typeName; - this.subheaderParams = { - time: this.props.time - }; if (this.props.assetId) { waves.node.assets.getAsset(this.props.assetId).then(asset => { - this.subheaderParams.name = asset.name; + this.name = asset.name; }); } } diff --git a/src/modules/ui/directives/transaction/types/set-asset-script/set-asset-script.html b/src/modules/ui/directives/transaction/types/set-asset-script/set-asset-script.html index ad8fec088a..312d951a20 100644 --- a/src/modules/ui/directives/transaction/types/set-asset-script/set-asset-script.html +++ b/src/modules/ui/directives/transaction/types/set-asset-script/set-asset-script.html @@ -1,11 +1,11 @@
- +
- +
diff --git a/src/modules/ui/directives/transaction/types/set-script/SetScript.js b/src/modules/ui/directives/transaction/types/set-script/SetScript.js index 27513aed00..f468cc20bd 100644 --- a/src/modules/ui/directives/transaction/types/set-script/SetScript.js +++ b/src/modules/ui/directives/transaction/types/set-script/SetScript.js @@ -1,29 +1,10 @@ (function () { 'use strict'; - const controller = function () { - - class SetScript { - - /** - * {object} - */ - props = null; - - $postLink() { - this.typeName = this.props.typeName; - } - - } - - return new SetScript(); - }; - angular.module('app.ui').component('wSetScript', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/set-script/set-script.html', - controller + templateUrl: 'modules/ui/directives/transaction/types/set-script/set-script.html' }); })(); diff --git a/src/modules/ui/directives/transaction/types/set-script/set-script.html b/src/modules/ui/directives/transaction/types/set-script/set-script.html index aeec3a9212..4cee824bcc 100644 --- a/src/modules/ui/directives/transaction/types/set-script/set-script.html +++ b/src/modules/ui/directives/transaction/types/set-script/set-script.html @@ -1,7 +1,7 @@
- +
diff --git a/src/modules/ui/directives/transaction/types/sponsorship/Sponsorship.js b/src/modules/ui/directives/transaction/types/sponsorship/Sponsorship.js index af7c44ec31..f0ed4fa554 100644 --- a/src/modules/ui/directives/transaction/types/sponsorship/Sponsorship.js +++ b/src/modules/ui/directives/transaction/types/sponsorship/Sponsorship.js @@ -18,11 +18,9 @@ props = null; $postLink() { - this.typeName = this.props.typeName; this.assetName = this.getAssetName( tsUtils.get(this.props, 'minSponsoredAssetFee.asset') ); - this.time = this.props.time; } /** diff --git a/src/modules/ui/directives/transaction/types/sponsorship/sponsorship.html b/src/modules/ui/directives/transaction/types/sponsorship/sponsorship.html index d0084c492b..67654a376c 100644 --- a/src/modules/ui/directives/transaction/types/sponsorship/sponsorship.html +++ b/src/modules/ui/directives/transaction/types/sponsorship/sponsorship.html @@ -1,11 +1,11 @@
- +
- {{::$ctrl.time}} + {{::$ctrl.props.time}}
diff --git a/src/modules/ui/directives/transaction/types/transfer/Transfer.js b/src/modules/ui/directives/transaction/types/transfer/Transfer.js index 17a229797e..7e585f3a4b 100644 --- a/src/modules/ui/directives/transaction/types/transfer/Transfer.js +++ b/src/modules/ui/directives/transaction/types/transfer/Transfer.js @@ -8,3 +8,98 @@ templateUrl: 'modules/ui/directives/transaction/types/transfer/transfer.html' }); })(); +(function () { + 'use strict'; + + /** + * @param {User} user + * @param {BaseAssetService} baseAssetService + * @param {Waves} waves + * @param {$rootScope.Scope} $scope + * @return {Transfer} + */ + + const controller = function (user, baseAssetService, waves, $scope) { + + class Transfer { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.time = this.props.time; + this.address = this.props.shownAddress; + + const TYPES = waves.node.transactions.TYPES; + + switch (this.typeName) { + case TYPES.SPONSORSHIP_FEE: + this.sponsoredFee(); + break; + default: + this.transfered(); + } + } + + /** + * @param {{id: string, name: string}} asset + * @return {string} + */ + getAssetName(asset) { + try { + return !user.scam[asset.id] ? asset.name : ''; + } catch (e) { + return ''; + } + } + + sponsoredFee() { + this.assetName = this.getAssetName(this.props.fee.asset); + this.amountParams = { + sign: '+', + amount: this.props.fee.toFormat(), + name: this.props.fee.asset.name + }; + } + + transfered() { + this.assetName = this.getAssetName(this.props.amount.asset); + this.amountParams = { + amount: this.props.amount.toFormat(), + name: this.props.amount.asset.name + }; + if (this.props.amount && this.props.amount instanceof ds.wavesDataEntities.Money) { + baseAssetService.convertToBaseAsset(this.props.amount) + .then((baseMoney) => { + this.mirrorBalanceParams = { + amount: baseMoney.toFormat(), + name: baseMoney.asset.name + }; + $scope.$digest(); + }); + } + } + + } + + return new Transfer(); + }; + + controller.$inject = [ + 'user', + 'baseAssetService', + 'waves', + '$scope' + ]; + + angular.module('app.ui').component('wTransferRow', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/transfer/transfer.html', + controller + }); +})(); diff --git a/src/modules/ui/directives/transaction/types/transfer/transfer.html b/src/modules/ui/directives/transaction/types/transfer/transfer.html index 25965bf0ed..37bfadd522 100644 --- a/src/modules/ui/directives/transaction/types/transfer/transfer.html +++ b/src/modules/ui/directives/transaction/types/transfer/transfer.html @@ -1 +1,23 @@ - +
+
+
+ + +
+
+ +
+
+
+
+ +
+
+ +
+
+
diff --git a/src/modules/ui/directives/transaction/types/unknown/Unknown.js b/src/modules/ui/directives/transaction/types/unknown/Unknown.js index c05b06bf54..b1573f7342 100644 --- a/src/modules/ui/directives/transaction/types/unknown/Unknown.js +++ b/src/modules/ui/directives/transaction/types/unknown/Unknown.js @@ -1,32 +1,10 @@ (function () { 'use strict'; - const controller = function () { - - class Unknown { - - /** - * {object} - */ - props = null; - - $postLink() { - this.typeName = this.props.typeName; - this.subheaderParams = { - time: this.props.time - }; - } - - } - - return new Unknown(); - }; - angular.module('app.ui').component('wUnknown', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/unknown/unknown.html', - controller + templateUrl: 'modules/ui/directives/transaction/types/unknown/unknown.html' }); })(); diff --git a/src/modules/ui/directives/transaction/types/unknown/unknown.html b/src/modules/ui/directives/transaction/types/unknown/unknown.html index 95828fb417..f52d7f1453 100644 --- a/src/modules/ui/directives/transaction/types/unknown/unknown.html +++ b/src/modules/ui/directives/transaction/types/unknown/unknown.html @@ -1,13 +1,13 @@
- +
- +
From adfdce087d74d8ccb14ba1f2a44648afafe50cd5 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Mon, 29 Apr 2019 11:12:47 +0300 Subject: [PATCH 119/150] CLIENT-1829: fix literal --- src/modules/wallet/modules/assets/directives/asset/asset.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/wallet/modules/assets/directives/asset/asset.html b/src/modules/wallet/modules/assets/directives/asset/asset.html index d1a094f164..4cf15c524c 100644 --- a/src/modules/wallet/modules/assets/directives/asset/asset.html +++ b/src/modules/wallet/modules/assets/directives/asset/asset.html @@ -12,7 +12,7 @@
- +
Date: Mon, 29 Apr 2019 15:49:04 +0300 Subject: [PATCH 120/150] CLIENT-1784: stand update 2 --- .../dex/directives/dexBlock/dexBlock.html | 14 +-- .../directives/dexWatchlist/DexWatchlist.html | 14 +-- .../directives/dexWatchlist/DexWatchlist.less | 14 +-- .../dex/directives/myBalance/myBalance.less | 7 +- src/modules/dex/less/dex.less | 10 --- src/modules/stand/templates/stand.html | 8 ++ src/modules/ui/directives/header/header.html | 4 +- src/modules/ui/directives/header/header.less | 46 +++++----- .../directives/selectFilter/selectFilter.html | 7 +- .../ui/directives/smartTable/smart-table.less | 88 +++++++++++++------ .../smartTable/templates/headerCell.html | 14 +-- .../utils/modals/pinAsset/pinAsset.html | 13 +-- .../utils/modals/pinAsset/pinAsset.less | 7 +- 13 files changed, 149 insertions(+), 97 deletions(-) diff --git a/src/modules/dex/directives/dexBlock/dexBlock.html b/src/modules/dex/directives/dexBlock/dexBlock.html index d7a254a8bc..87ab1c2ed2 100644 --- a/src/modules/dex/directives/dexBlock/dexBlock.html +++ b/src/modules/dex/directives/dexBlock/dexBlock.html @@ -1,11 +1,15 @@
diff --git a/src/modules/dex/directives/dexWatchlist/DexWatchlist.html b/src/modules/dex/directives/dexWatchlist/DexWatchlist.html index c1eee60f97..43acf45cd8 100644 --- a/src/modules/dex/directives/dexWatchlist/DexWatchlist.html +++ b/src/modules/dex/directives/dexWatchlist/DexWatchlist.html @@ -20,11 +20,15 @@
- + + + diff --git a/src/modules/dex/directives/dexWatchlist/DexWatchlist.less b/src/modules/dex/directives/dexWatchlist/DexWatchlist.less index 75673dd19d..01eba05d97 100644 --- a/src/modules/dex/directives/dexWatchlist/DexWatchlist.less +++ b/src/modules/dex/directives/dexWatchlist/DexWatchlist.less @@ -19,6 +19,7 @@ body.dex-demo .dex-wrapper { display: inline-block; width: 100%; z-index: 4; + height: 35px; w-help-icon { position: absolute; @@ -43,19 +44,12 @@ body.dex-demo .dex-wrapper { } } - input { - background: @input-search-icon 8px 50% no-repeat; - border: 0 none; - width: 100%; - padding-left: 31px; - height: 35px; - color: @color-disabled-900; - font-size: @font-size-caption-1; - border-bottom: 1px solid @color-basic-100; + .search-input { + border-bottom-color: @color-basic-100; &:focus { - box-shadow: 0 0 0 1px @color-submit-400 inset; position: relative; + border-color: @color-submit-300; z-index: 2; } diff --git a/src/modules/dex/directives/myBalance/myBalance.less b/src/modules/dex/directives/myBalance/myBalance.less index 1347c7aca1..7d43b95859 100644 --- a/src/modules/dex/directives/myBalance/myBalance.less +++ b/src/modules/dex/directives/myBalance/myBalance.less @@ -87,6 +87,11 @@ body.dex-demo .dex-wrapper { background: @dex-copybalance-icon no-repeat right center; } } + + .search-input { + background-position: 4px center; + padding-left: 24px; + } } w-asset-logo { @@ -134,7 +139,7 @@ body.dex-demo .dex-wrapper { } } - &__search-container input { + &__search-container .search-input { height: 36px; } diff --git a/src/modules/dex/less/dex.less b/src/modules/dex/less/dex.less index c1344c96c8..76e9f12041 100644 --- a/src/modules/dex/less/dex.less +++ b/src/modules/dex/less/dex.less @@ -97,16 +97,6 @@ body.dex, body.dex-demo { } .smart-table { - &__search-container { - input { - background: @input-search-icon left 48% no-repeat; - border: 0 none; - width: 100%; - padding-left: 20px; - color: @color-disabled-900; - } - } - &__row { height: 28px; width: 100%; diff --git a/src/modules/stand/templates/stand.html b/src/modules/stand/templates/stand.html index 8c6f72a11f..847587de52 100644 --- a/src/modules/stand/templates/stand.html +++ b/src/modules/stand/templates/stand.html @@ -481,8 +481,16 @@

Tabs

+

Search

+ +
+ + + +
+
diff --git a/src/modules/ui/directives/header/header.html b/src/modules/ui/directives/header/header.html index 6c4d6a5d42..b4def28ce1 100644 --- a/src/modules/ui/directives/header/header.html +++ b/src/modules/ui/directives/header/header.html @@ -6,7 +6,7 @@ - - + + diff --git a/src/modules/ui/directives/header/header.less b/src/modules/ui/directives/header/header.less index 855bc7764a..247a3113c9 100644 --- a/src/modules/ui/directives/header/header.less +++ b/src/modules/ui/directives/header/header.less @@ -14,33 +14,35 @@ w-header { display: block; height: 100%; } +} + +@media screen and (max-width:768px) { + w-header { + display: none; + } +} - w-search { +.header-search { + &-wrapper { line-height: 70px; border-left: 1px solid @color-disabled-100; margin-left: 40px; padding-left: 46px; display: none; - & input { - border: 1px transparent solid; - font-family: @font-roboto-regular; - font-size: 15px; - letter-spacing: -0.3px; - text-align: left; - width: 200px; - color: @color-disabled-600; - transition: 0.3s all; - cursor: pointer; - } - & input:focus { - border-bottom: 1px @color-disabled-600 solid; - cursor: text; - } } -} - -@media screen and (max-width:768px) { - w-header { - display: none; - } + &-input { + border: 1px transparent solid; + font-family: @font-roboto-regular; + font-size: 15px; + letter-spacing: -0.3px; + text-align: left; + width: 200px; + color: @color-disabled-600; + transition: 0.3s all; + cursor: pointer; + } + &-input:focus { + border-bottom: 1px @color-disabled-600 solid; + cursor: text; + } } diff --git a/src/modules/ui/directives/selectFilter/selectFilter.html b/src/modules/ui/directives/selectFilter/selectFilter.html index d9c9239205..37677fe736 100644 --- a/src/modules/ui/directives/selectFilter/selectFilter.html +++ b/src/modules/ui/directives/selectFilter/selectFilter.html @@ -19,7 +19,12 @@ - + + +
diff --git a/src/modules/ui/directives/smartTable/smart-table.less b/src/modules/ui/directives/smartTable/smart-table.less index 4d09b6a9ff..9b636907c0 100644 --- a/src/modules/ui/directives/smartTable/smart-table.less +++ b/src/modules/ui/directives/smartTable/smart-table.less @@ -5,6 +5,67 @@ @cell-height: 64px; @responsive-cell-height: auto; +.search { + &-wrapper { + height: 100%; + width: 100%; + display: inline-block; + } + + &-input { + background: @input-search-icon 8px center no-repeat @color-white; + height: 100%; + width: 100%; + padding-left: 31px; + cursor: pointer; + color: @color-disabled-900; + transition: .3s; + border: 1px solid transparent; + font-size: @font-size-caption-2; + + &:focus { + border-color: @color-submit-300; + cursor: default; + } + } +} + +.portfolio { + .smart-table { + .search-input { + width: 36px; + border-radius: @border-radius; + margin-right: 10px; + text-indent: -999px; + border-color: @color-basic-200; + z-index: 1; + background-position: 10px center; + padding-left: 35px; + .footnote-1(); + + &:focus { + width: 200px; + text-indent: 0; + border-color: @color-submit-300; + } + + &.not-empty { + border-color: @color-submit-300; + } + } + } +} + +.dex { + .smart-table { + .search-input { + &:focus { + border-color: transparent; + } + } + } +} + .smart-table { display: block; height: 100%; @@ -139,32 +200,7 @@ left: 20px; top: 13px; z-index: 1; - - input { - height: 36px; - width: 36px; - border-radius: @border-radius; - color: @color-disabled-900; - background: @input-search-icon 10px center no-repeat @color-white; - border: 1px solid @color-basic-200; - cursor: pointer; - margin-right: 10px; - transition: .3s; - font-size: 0; - z-index: 1; - - &:focus { - width: 200px; - padding-left: 35px; - cursor: default; - border-color: @color-submit-300; - .footnote-1(); - } - - &.not-empty { - border-color: @color-submit-300; - } - } + height: 36px; } } diff --git a/src/modules/ui/directives/smartTable/templates/headerCell.html b/src/modules/ui/directives/smartTable/templates/headerCell.html index 850085ec9e..26bed13628 100644 --- a/src/modules/ui/directives/smartTable/templates/headerCell.html +++ b/src/modules/ui/directives/smartTable/templates/headerCell.html @@ -1,11 +1,15 @@
- + + + diff --git a/src/modules/utils/modals/pinAsset/pinAsset.html b/src/modules/utils/modals/pinAsset/pinAsset.html index 980e29e5eb..5bc1293611 100644 --- a/src/modules/utils/modals/pinAsset/pinAsset.html +++ b/src/modules/utils/modals/pinAsset/pinAsset.html @@ -5,11 +5,14 @@

- + + +
diff --git a/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html new file mode 100644 index 0000000000..c2992546d8 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html @@ -0,0 +1,13 @@ +
+
+
+ + +
+
+ +
+
+
+
diff --git a/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.js b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.js new file mode 100644 index 0000000000..bf7b3e0685 --- /dev/null +++ b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.js @@ -0,0 +1,32 @@ +(function () { + 'use strict'; + + const controller = function () { + + class Data { + + /** + * {object} + */ + props = null; + + $postLink() { + this.typeName = this.props.typeName; + this.subheaderParams = { + time: this.props.time + }; + } + + } + + return new Data(); + }; + + angular.module('app.ui').component('wData', { + bindings: { + props: '<' + }, + templateUrl: 'modules/ui/directives/transaction/types/data/script-invocation.html', + controller + }); +})(); From aba784acd46ae212fe44972e4c7d772221878e35 Mon Sep 17 00:00:00 2001 From: uiskander Date: Tue, 30 Apr 2019 13:14:11 +0300 Subject: [PATCH 122/150] Merge branch 'dev' of https://github.com/wavesplatform/WavesGUI into client-1784-stand-update # Conflicts: # src/modules/utils/modals/tutorialModals/tutorialModals.less # src/modules/wallet/modules/leasing/templates/leasing.html # src/modules/welcome/templates/welcome.html --- src/modules/dex/directives/createOrder/createOrder.less | 1 - src/modules/ui/directives/sign/sign.html | 6 ++++-- src/modules/ui/directives/sign/sign.less | 2 -- src/modules/utils/modals/signByDevice/signByDevice.html | 8 ++++---- src/modules/utils/modals/signByDevice/signByDevice.less | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/modules/dex/directives/createOrder/createOrder.less b/src/modules/dex/directives/createOrder/createOrder.less index 9381af744c..699ecdc7ea 100644 --- a/src/modules/dex/directives/createOrder/createOrder.less +++ b/src/modules/dex/directives/createOrder/createOrder.less @@ -422,7 +422,6 @@ w-create-order { } } } - } } } diff --git a/src/modules/ui/directives/sign/sign.html b/src/modules/ui/directives/sign/sign.html index 44fc757172..43a992523e 100644 --- a/src/modules/ui/directives/sign/sign.html +++ b/src/modules/ui/directives/sign/sign.html @@ -25,7 +25,9 @@
-
-
+
+
+
+
diff --git a/src/modules/ui/directives/sign/sign.less b/src/modules/ui/directives/sign/sign.less index 8e41012f9c..c617877a3d 100644 --- a/src/modules/ui/directives/sign/sign.less +++ b/src/modules/ui/directives/sign/sign.less @@ -19,8 +19,6 @@ w-sign { } .sign-loader { - height: 60px; - w-loader { position: relative; margin: 0 auto; diff --git a/src/modules/utils/modals/signByDevice/signByDevice.html b/src/modules/utils/modals/signByDevice/signByDevice.html index 9716c08bd6..143d391a07 100644 --- a/src/modules/utils/modals/signByDevice/signByDevice.html +++ b/src/modules/utils/modals/signByDevice/signByDevice.html @@ -81,9 +81,9 @@

-
-
@@ -104,9 +104,9 @@

-
-
diff --git a/src/modules/utils/modals/signByDevice/signByDevice.less b/src/modules/utils/modals/signByDevice/signByDevice.less index a37814ca80..1f46450c4a 100644 --- a/src/modules/utils/modals/signByDevice/signByDevice.less +++ b/src/modules/utils/modals/signByDevice/signByDevice.less @@ -38,7 +38,7 @@ } .cancel-order-mode, .create-order-mode { - padding-top: 30px; + padding-top: 60px; } .cancel-order-icon { background: @cancelorder-icon; From 157d46af222343cb522bd14ffa61256b5a71c8a2 Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Tue, 30 Apr 2019 15:08:08 +0300 Subject: [PATCH 123/150] CLIENT-1784: stand update 2 --- src/modules/stand/controller/StandCtrl.js | 73 ++++++++++++++++++++++- src/modules/stand/templates/stand.html | 12 +++- 2 files changed, 82 insertions(+), 3 deletions(-) diff --git a/src/modules/stand/controller/StandCtrl.js b/src/modules/stand/controller/StandCtrl.js index 2b8b6a65c3..5db7510cf9 100644 --- a/src/modules/stand/controller/StandCtrl.js +++ b/src/modules/stand/controller/StandCtrl.js @@ -7,7 +7,7 @@ * @param $scope * @return {StandCtrl} */ - const controller = function (Base, $scope) { + const controller = function (Base, $scope, userNotification, notification) { class StandCtrl extends Base { @@ -37,6 +37,75 @@ * @type {string} */ this.seed = seed; + + const loop = (index) => { + userNotification.info({ + body: { + literal: index + 1 + } + }).then(() => loop(index + 1)); + }; + + loop(0); + + const loop2 = (index) => { + userNotification.error({ + body: { + literal: index + 1 + } + }).then(() => loop2(index + 1)); + }; + + loop2(0); + + const loop3 = (index) => { + userNotification.success({ + body: { + literal: index + 1 + } + }).then(() => loop3(index + 1)); + }; + + loop3(0); + + const loop4 = (index) => { + userNotification.warn({ + body: { + literal: index + 1 + } + }).then(() => loop4(index + 1)); + }; + + loop4(0); + + const loop0 = (index) => { + notification.info({ + title: { + literal: 'Title info' + }, + body: { + literal: 'Text body info' + } + }).then(() => loop0(index + 1)); + }; + + loop0(0); + + + const loop5 = (index) => { + notification.error({ + title: { + literal: 'Title error' + }, + body: { + literal: 'Text body error' + } + }).then(() => loop5(index + 1)); + }; + + loop5(0); + + } } @@ -44,7 +113,7 @@ return new StandCtrl(); }; - controller.$inject = ['Base', '$scope']; + controller.$inject = ['Base', '$scope', 'userNotification', 'notification']; angular.module('app.stand').controller('StandCtrl', controller); })(); diff --git a/src/modules/stand/templates/stand.html b/src/modules/stand/templates/stand.html index 847587de52..22a9e1664c 100644 --- a/src/modules/stand/templates/stand.html +++ b/src/modules/stand/templates/stand.html @@ -489,11 +489,21 @@

Search

-
+

Notifications

+ +
+
+ +
+
+
+
+ +
From 696e0ee8c820f18e19de002dfe5dd059c419bd9a Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Tue, 30 Apr 2019 15:08:49 +0300 Subject: [PATCH 124/150] CLIENT-1784: stand update 2 --- src/modules/stand/controller/StandCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/stand/controller/StandCtrl.js b/src/modules/stand/controller/StandCtrl.js index 5db7510cf9..615dfccb4b 100644 --- a/src/modules/stand/controller/StandCtrl.js +++ b/src/modules/stand/controller/StandCtrl.js @@ -7,7 +7,7 @@ * @param $scope * @return {StandCtrl} */ - const controller = function (Base, $scope, userNotification, notification) { + const controller = function (Base, $scope, userNotification, notification) { class StandCtrl extends Base { From ef6ffdc632909bd8738952414a8a9df884826e93 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 30 Apr 2019 17:10:25 +0300 Subject: [PATCH 125/150] CLIENT-1690: parse script invocation --- data-service/api/transactions/interface.d.ts | 43 +++++++++++++++++-- data-service/api/transactions/parse.ts | 8 ++-- .../waves/node/content/Transactions.js | 3 +- .../ui/directives/transaction/Transaction.js | 1 - .../transaction/types/data/data.html | 2 +- .../script-invocation/script-invocation.html | 22 +++++----- .../script-invocation/script-invocation.js | 26 +---------- 7 files changed, 60 insertions(+), 45 deletions(-) diff --git a/data-service/api/transactions/interface.d.ts b/data-service/api/transactions/interface.d.ts index d54adac575..a4abaeebf6 100644 --- a/data-service/api/transactions/interface.d.ts +++ b/data-service/api/transactions/interface.d.ts @@ -17,7 +17,8 @@ export type T_API_TX = txApi.IData | txApi.ISponsorship | txApi.ISetScript | - txApi.ISetAssetScript; + txApi.ISetAssetScript | + tx.Api.IScriptInvocation; export type T_TX = IIssue | @@ -159,9 +160,11 @@ export module txApi { } export interface IScriptInvocation extends IBaseTransaction { - type: TRANSACTION_TYPE_NUMBER.SCRIPT_INVOCATION; + type: 16; version?: number; - script: string; + call: ICall; + dappAddress: string; + payment?: Array; } export interface IExchangeOrder { @@ -324,6 +327,18 @@ export interface IExchangeOrder { timestamp: number; } +export interface IScriptInvocation extends IBaseTransaction { + version?: number; + call: ICall; + dappAddress: string; + payment?:IPayment; +} + +export interface ICall { + args: Array; + function: string; +} + export type TDataEntry = TDataEntryInteger | TDataEntryBoolean | TDataEntryBinary | TDataEntryString; export interface TDataEntryInteger { @@ -349,3 +364,25 @@ export interface TDataEntryString { key: string; value: string; } + +export type TCallArgs = TCallArgsInteger | TCallArgsBoolean | TCallArgsBinary | TCallArgsString; + +export interface TCallArgsInteger { + type: 'integer'; + value: number; +} + +export interface TCallArgsBoolean { + type: 'boolean'; + value: boolean; +} + +export interface TCallArgsBinary { + type: 'binary'; + value: string; // base64 +} + +export interface TCallArgsString { + type: 'string'; + value: string; +} diff --git a/data-service/api/transactions/parse.ts b/data-service/api/transactions/parse.ts index 184dfe562d..df09837908 100644 --- a/data-service/api/transactions/parse.ts +++ b/data-service/api/transactions/parse.ts @@ -15,6 +15,7 @@ import { ISetScript, ISponsorship, ISetAssetScript, + IScriptInvocation, ITransfer, T_API_TX, T_TX, @@ -100,6 +101,8 @@ export function parseTx(transactions: Array, isUTX: boolean, isTokens? return parseScriptTx(transaction, hash, isUTX); case TRANSACTION_TYPE_NUMBER.SET_ASSET_SCRIPT: return parseAssetScript(transaction, hash, isUTX); + case 16: + return parseInvocationTx(transaction, hash, isUTX); default: return transaction; } @@ -265,10 +268,9 @@ export function parseDataTx(tx: txApi.IData, assetsHash: IHash, isUTX: bo return { ...tx, stringifiedData, fee, isUTX }; } -export function parseInvocationTx(tx: txApi.IData, assetsHash: IHash, isUTX: boolean): IData { +export function parseInvocationTx(tx: txApi.IScriptInvocation, assetsHash: IHash, isUTX: boolean): IScriptInvocation { const fee = new Money(tx.fee, assetsHash[WAVES_ID]); - const stringifiedData = JSON.stringify(tx.data, null, 4); - return { ...tx, stringifiedData, fee, isUTX }; + return { ...tx, fee, isUTX }; } function parseSponsorshipTx(tx: txApi.ISponsorship, assetsHash: IHash, isUTX: boolean): ISponsorship { diff --git a/src/modules/app/services/waves/node/content/Transactions.js b/src/modules/app/services/waves/node/content/Transactions.js index 8069808896..738c60b785 100644 --- a/src/modules/app/services/waves/node/content/Transactions.js +++ b/src/modules/app/services/waves/node/content/Transactions.js @@ -120,7 +120,6 @@ */ _pipeTransaction() { return (tx) => { - tx.timestamp = new Date(tx.timestamp); tx.typeName = utils.getTransactionTypeName(tx); tx.templateType = Transactions._getTemplateType(tx); @@ -218,7 +217,7 @@ case TYPES.SPONSORSHIP_FEE: return 'sponsorship_fee'; case TYPES.SCRIPT_INVOCATION: - return 'script_invocation'; + return 'script-invocation'; case TYPES.UNKNOWN: return 'unknown'; default: diff --git a/src/modules/ui/directives/transaction/Transaction.js b/src/modules/ui/directives/transaction/Transaction.js index 5e0ea3f288..30e942f56e 100644 --- a/src/modules/ui/directives/transaction/Transaction.js +++ b/src/modules/ui/directives/transaction/Transaction.js @@ -54,7 +54,6 @@ */ getCopyAllData() { const tx = this.transaction; - const id = `Transaction ID: ${tx.id}`; const type = `Type: ${tx.type} (${this.typeName})`; diff --git a/src/modules/ui/directives/transaction/types/data/data.html b/src/modules/ui/directives/transaction/types/data/data.html index e7bd83e3e6..5dc4e521ee 100644 --- a/src/modules/ui/directives/transaction/types/data/data.html +++ b/src/modules/ui/directives/transaction/types/data/data.html @@ -10,4 +10,4 @@
-
+
\ No newline at end of file diff --git a/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html index c2992546d8..9edef431ed 100644 --- a/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html +++ b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html @@ -1,13 +1,13 @@
-
-
- - -
-
- -
-
-
+ + + + + + + + + + +
diff --git a/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.js b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.js index bf7b3e0685..88c98ec19f 100644 --- a/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.js +++ b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.js @@ -1,32 +1,10 @@ (function () { 'use strict'; - const controller = function () { - - class Data { - - /** - * {object} - */ - props = null; - - $postLink() { - this.typeName = this.props.typeName; - this.subheaderParams = { - time: this.props.time - }; - } - - } - - return new Data(); - }; - - angular.module('app.ui').component('wData', { + angular.module('app.ui').component('wScriptInvocation', { bindings: { props: '<' }, - templateUrl: 'modules/ui/directives/transaction/types/data/script-invocation.html', - controller + templateUrl: 'modules/ui/directives/transaction/types/script-invocation/script-invocation.html' }); })(); From 9df14483b1101bd8eace0bb0d061f1619725d4d7 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 30 Apr 2019 17:23:03 +0300 Subject: [PATCH 126/150] CLIENT-1690: less complexity --- src/modules/utils/services/utils.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/modules/utils/services/utils.js b/src/modules/utils/services/utils.js index df75e20bea..f35a046d1f 100644 --- a/src/modules/utils/services/utils.js +++ b/src/modules/utils/services/utils.js @@ -1529,7 +1529,7 @@ case SIGN_TYPE.MASS_TRANSFER: return utils.isMyPublicKey(tx.senderPublicKey) ? TYPES.MASS_SEND : TYPES.MASS_RECEIVE; case SIGN_TYPE.EXCHANGE: - return tx.exchangeType === 'buy' ? TYPES.EXCHANGE_BUY : TYPES.EXCHANGE_SELL; + return utils.typOfExchange(tx); case SIGN_TYPE.LEASE: return utils.isMyPublicKey(tx.senderPublicKey) ? TYPES.LEASE_OUT : TYPES.LEASE_IN; case SIGN_TYPE.CANCEL_LEASING: @@ -1550,11 +1550,23 @@ return tx.minSponsoredAssetFee.getCoins().gt(0) ? SPONSOR_START : SPONSOR_STOP; case SIGN_TYPE.SET_ASSET_SCRIPT: return TYPES.SET_ASSET_SCRIPT; + case SIGN_TYPE.SCRIPT_INVOCATION: + return TYPES.SCRIPT_INVOCATION; default: return TYPES.UNKNOWN; } }, + /** + * @name app.utils#typOfExchange + * @param tx + * @return string + */ + typOfExchange({ exchangeType }) { + const TYPES = WavesApp.TRANSACTION_TYPES.EXTENDED; + return exchangeType === 'buy' ? TYPES.EXCHANGE_BUY : TYPES.EXCHANGE_SELL; + }, + /** * @name app.utils#isMyPublicKey * @param publicKey From 99d3ace4ad259fffa7f7c7a5aacf207c84381461 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Mon, 6 May 2019 11:40:26 +0300 Subject: [PATCH 127/150] CLIENT-1690: script-invocation-row template --- .../script-invocation/script-invocation.html | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html index 9edef431ed..ffac7e8f57 100644 --- a/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html +++ b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html @@ -1,13 +1,21 @@
- - - - - - - - - - - +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
From 879b83b2b8d3a31469aff1c7aad14a8e842edb7c Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Mon, 6 May 2019 12:29:09 +0300 Subject: [PATCH 128/150] CLIENT-1690: edit template --- .../types/script-invocation/script-invocation.html | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html index ffac7e8f57..c738e507a3 100644 --- a/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html +++ b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html @@ -8,14 +8,5 @@ params="{time: $ctrl.props.time, address: $ctrl.props.dappAddress}">
-
-
- -
-
- -
-
+
From 9c25f24899fe78b24a36afdcd3ff2ec01f6fab0e Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 7 May 2019 12:26:59 +0300 Subject: [PATCH 129/150] CLIENT-1690: edit parse script invocation, added field with function call --- data-service/api/transactions/interface.d.ts | 4 +- data-service/api/transactions/parse.ts | 3 +- .../transactionInfo/TransactionInfo.js | 3 +- .../transaction-info-content.html | 1 + .../transactionInfo/transactionInfo.less | 50 +++++++++++++++++ .../script-invocation-header.html | 3 + .../script-invocation-info.html | 27 +++++++++ .../script-invocation/scriptInvocation.js | 55 +++++++++++++++++++ .../scriptInvocationHeader.js | 10 ++++ 9 files changed, 152 insertions(+), 4 deletions(-) create mode 100644 src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-header.html create mode 100644 src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html create mode 100644 src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js create mode 100644 src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocationHeader.js diff --git a/data-service/api/transactions/interface.d.ts b/data-service/api/transactions/interface.d.ts index a4abaeebf6..06e2875a74 100644 --- a/data-service/api/transactions/interface.d.ts +++ b/data-service/api/transactions/interface.d.ts @@ -164,7 +164,7 @@ export module txApi { version?: number; call: ICall; dappAddress: string; - payment?: Array; + payment?: Array<{ amount: number; assetId: string; }>; } export interface IExchangeOrder { @@ -331,7 +331,7 @@ export interface IScriptInvocation extends IBaseTransaction { version?: number; call: ICall; dappAddress: string; - payment?:IPayment; + payment?: Array; } export interface ICall { diff --git a/data-service/api/transactions/parse.ts b/data-service/api/transactions/parse.ts index df09837908..3f8eee4cfe 100644 --- a/data-service/api/transactions/parse.ts +++ b/data-service/api/transactions/parse.ts @@ -270,7 +270,8 @@ export function parseDataTx(tx: txApi.IData, assetsHash: IHash, isUTX: bo export function parseInvocationTx(tx: txApi.IScriptInvocation, assetsHash: IHash, isUTX: boolean): IScriptInvocation { const fee = new Money(tx.fee, assetsHash[WAVES_ID]); - return { ...tx, fee, isUTX }; + const payment = tx.payment.map(payment => new Money(payment.amount, assetsHash[WAVES_ID])); + return { ...tx, fee, payment, isUTX }; } function parseSponsorshipTx(tx: txApi.ISponsorship, assetsHash: IHash, isUTX: boolean): ISponsorship { diff --git a/src/modules/ui/directives/transactionInfo/TransactionInfo.js b/src/modules/ui/directives/transactionInfo/TransactionInfo.js index 3854a3e62c..39000ed6d1 100644 --- a/src/modules/ui/directives/transactionInfo/TransactionInfo.js +++ b/src/modules/ui/directives/transactionInfo/TransactionInfo.js @@ -26,7 +26,8 @@ [SIGN_TYPE.DATA]: 'Data', [SIGN_TYPE.SET_SCRIPT]: 'Set Script', [SIGN_TYPE.SPONSORSHIP]: 'Sponsorship', - [SIGN_TYPE.SET_ASSET_SCRIPT]: 'Set Asset Script' + [SIGN_TYPE.SET_ASSET_SCRIPT]: 'Set Asset Script', + [SIGN_TYPE.SCRIPT_INVOCATION]: 'Script Invocation' }; class TransactionInfoCtrl extends Base { diff --git a/src/modules/ui/directives/transactionInfo/transaction-info-content.html b/src/modules/ui/directives/transactionInfo/transaction-info-content.html index c67033baba..b1d025bceb 100644 --- a/src/modules/ui/directives/transactionInfo/transaction-info-content.html +++ b/src/modules/ui/directives/transactionInfo/transaction-info-content.html @@ -12,6 +12,7 @@ + diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index 6ee8dee97c..1060971aa5 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -403,6 +403,56 @@ w-transaction-info-header + w-transaction-info-general { } } +.transaction-details { + display: flex; + flex-direction: column; + margin-bottom: 13px; + padding: 0 16px; + border-radius: 4px; + max-height: 179px; + overflow-y: auto; + background-color: @color-basic-50; + transition: max-height 0.3s, margin 0.3s; + &.ng-hide { + max-height: 0; + margin-bottom: 0; + } + &.ng-hide-add { + overflow-y: hidden; + } + &.ng-hide-remove { + overflow-y: hidden; + } + + &__item { + width: 100%; + display: flex; + align-items: flex-start; + justify-content: space-between; + border-top: 1px dashed @color-basic-100; + padding: 12px 0 13px; + &:first-child { + padding-top: 16px; + border-top: 0; + } + &:last-child { + padding-bottom: 16px; + } + } +} + +@media screen and (max-width: @width-media-tiny) { + .recipients-row { + padding: 9px 0 10px; + &:first-child { + padding-top: 12px; + } + &:last-child { + padding-bottom: 12px; + } + } +} + @media screen and (max-width: 540px) { .txinfo { &__lead { diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-header.html b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-header.html new file mode 100644 index 0000000000..7061567aa8 --- /dev/null +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-header.html @@ -0,0 +1,3 @@ +
+

+
diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html new file mode 100644 index 0000000000..ae27af131e --- /dev/null +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html @@ -0,0 +1,27 @@ +
+
+
{{::$ctrl.function}}
+
+
+
+
+
+ +
+
+
    +
  • + {{::arg.type}} + {{::arg.value}} +
  • +
+ + +
+
+ + \ No newline at end of file diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js b/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js new file mode 100644 index 0000000000..75ef4e6b1d --- /dev/null +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js @@ -0,0 +1,55 @@ +(function () { + 'use strict'; + + /** + * @param {$rootScope.Scope} $scope + * @return {DataInfo} + */ + const controller = function ($scope) { + + class DataInfo { + + /** + * @type {Signable} + */ + signable; + /** + * @type {boolean} + */ + dataVisible = false; + /** + * @type {boolean} + */ + allVisible = false; + /** + * @type {string} + */ + function; + + + $postLink() { + this.transaction = this.signable.getTxData(); + this.args = this.transaction.call.args; + this.function = this.transaction.call.function; + (this.transaction.id ? Promise.resolve(this.transaction.id) : this.signable.getId()) + .then(id => { + this.id = id; + $scope.$apply(); + }); + } + + } + + return new DataInfo(); + }; + + controller.$inject = ['$scope']; + + angular.module('app.ui').component('wScriptInvocationInfo', { + bindings: { + signable: '<' + }, + controller, + templateUrl: 'modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html' + }); +})(); diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocationHeader.js b/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocationHeader.js new file mode 100644 index 0000000000..900d51df54 --- /dev/null +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocationHeader.js @@ -0,0 +1,10 @@ +(function () { + 'use strict'; + + angular.module('app.ui').component('wScriptInvocationHeader', { + bindings: { + signable: '<' + }, + templateUrl: 'modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-header.html' + }); +})(); From ce40e99effdcbe8398723f20327061d7ce1569c6 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 7 May 2019 14:28:13 +0300 Subject: [PATCH 130/150] CLIENT-1690: edit show btn literal, copy json --- .../script-invocation-info.html | 5 +++-- .../types/script-invocation/scriptInvocation.js | 16 ++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html index ae27af131e..76931e93a6 100644 --- a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html @@ -4,7 +4,8 @@
-
@@ -16,7 +17,7 @@ {{::arg.value}} - + diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js b/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js index 75ef4e6b1d..4aad81fd41 100644 --- a/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js @@ -5,7 +5,7 @@ * @param {$rootScope.Scope} $scope * @return {DataInfo} */ - const controller = function ($scope) { + const controller = function () { class DataInfo { @@ -25,17 +25,19 @@ * @type {string} */ function; + /** + * @type {string} + */ + json; $postLink() { this.transaction = this.signable.getTxData(); this.args = this.transaction.call.args; this.function = this.transaction.call.function; - (this.transaction.id ? Promise.resolve(this.transaction.id) : this.signable.getId()) - .then(id => { - this.id = id; - $scope.$apply(); - }); + this.signable.getDataForApi().then(json => { + this.json = WavesApp.stringifyJSON(json, null, 4); + }); } } @@ -43,8 +45,6 @@ return new DataInfo(); }; - controller.$inject = ['$scope']; - angular.module('app.ui').component('wScriptInvocationInfo', { bindings: { signable: '<' From 3d3d8c12887e3b1c83cc1f4710908a8c2e19052d Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 7 May 2019 15:18:48 +0300 Subject: [PATCH 131/150] CLIENT-1690: added txid, payment, script address fields --- .../script-invocation-info.html | 22 +++++++++++++++---- .../script-invocation/scriptInvocation.js | 11 +++++++--- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html index 76931e93a6..d7faa8a74f 100644 --- a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html @@ -1,18 +1,19 @@
-
{{::$ctrl.function}}
+
{{::$ctrl.transaction.call.function}}
+
- -
+
    -
  • +
  • {{::arg.type}} {{::arg.value}}
  • @@ -21,6 +22,19 @@
+
+
+
{{::$ctrl.transaction.dappAddress}}
+
+
+
+
{{::$ctrl.payment}}
+
+
+
+
{{::$ctrl.transaction.id}}
+
+ { this.json = WavesApp.stringifyJSON(json, null, 4); }); + if (this.transaction.payment.length > 0) { + const payment = this.transaction.payment[0]; + this.payment = `${payment.getTokens().toFormat()} ${payment.asset.displayName}`; + } } } From adc3c3551f9fd47fd8e64e4821157e435b68defa Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Tue, 7 May 2019 15:25:16 +0300 Subject: [PATCH 132/150] CLIENT-1690: add icon --- src/img/icons/transaction-icons-30.svg | 310 ++++++++--------- src/img/icons/transaction-icons-80.svg | 320 +++++++++--------- src/modules/app/less/app-icons.less | 8 + .../directives/transaction/transactions.less | 4 + .../transactionInfo/transactionInfo.less | 4 + 5 files changed, 342 insertions(+), 304 deletions(-) diff --git a/src/img/icons/transaction-icons-30.svg b/src/img/icons/transaction-icons-30.svg index fc6d382c77..6918471889 100644 --- a/src/img/icons/transaction-icons-30.svg +++ b/src/img/icons/transaction-icons-30.svg @@ -1,158 +1,164 @@ - - - icons-30 + + + Group 2 Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/img/icons/transaction-icons-80.svg b/src/img/icons/transaction-icons-80.svg index d23528cbcd..3c6bf0c1b0 100644 --- a/src/img/icons/transaction-icons-80.svg +++ b/src/img/icons/transaction-icons-80.svg @@ -1,158 +1,174 @@ - - - icons-80 + + + Group 2 Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/modules/app/less/app-icons.less b/src/modules/app/less/app-icons.less index ed7b9237a3..fc6afd7844 100644 --- a/src/modules/app/less/app-icons.less +++ b/src/modules/app/less/app-icons.less @@ -305,6 +305,14 @@ background-color: rgba(90, 129, 234, 0.1); } +.icon-tx-script-invocation { + &::before { + display: block; + background-position-x: -@tx-icon-size * 22; + } + background-color: rgba(90, 129, 234, 0.1); +} + .icon-info { width: 20px; height: 20px; diff --git a/src/modules/ui/directives/transaction/transactions.less b/src/modules/ui/directives/transaction/transactions.less index 6c798e90df..e9e928832a 100644 --- a/src/modules/ui/directives/transaction/transactions.less +++ b/src/modules/ui/directives/transaction/transactions.less @@ -129,6 +129,10 @@ w-transaction .transaction { &.set-asset-script { .icon-tx-set-asset-script(); } + + &.script-invocation { + .icon-tx-script-invocation(); + } } &.spam .icon { diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index 1060971aa5..cd47d80c73 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -304,6 +304,10 @@ w-transaction-info-header + w-transaction-info-general { .icon-tx-set-asset-script(); } + &.script-invocation { + .icon-tx-script-invocation(); + } + &::before { width: @tx-icon-size; height: @tx-icon-size; From 632c162f4c702c020213cd12c5f20dd87b633f7c Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 7 May 2019 15:36:22 +0300 Subject: [PATCH 133/150] CLIENT-1690: fix parse payment --- data-service/api/transactions/parse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-service/api/transactions/parse.ts b/data-service/api/transactions/parse.ts index 3f8eee4cfe..4a9f7d743e 100644 --- a/data-service/api/transactions/parse.ts +++ b/data-service/api/transactions/parse.ts @@ -270,7 +270,7 @@ export function parseDataTx(tx: txApi.IData, assetsHash: IHash, isUTX: bo export function parseInvocationTx(tx: txApi.IScriptInvocation, assetsHash: IHash, isUTX: boolean): IScriptInvocation { const fee = new Money(tx.fee, assetsHash[WAVES_ID]); - const payment = tx.payment.map(payment => new Money(payment.amount, assetsHash[WAVES_ID])); + const payment = tx.payment.map(payment => new Money(payment.amount, assetsHash[normalizeAssetId(payment.assetId)])); return { ...tx, fee, payment, isUTX }; } From 2713d5c080550e642641bd8dfa0fa98572b45852 Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Tue, 7 May 2019 18:22:15 +0300 Subject: [PATCH 134/150] CLIENT-1690: styled popup --- .../transactionInfo/transactionInfo.less | 37 ++++++++++++++++++- .../script-invocation-info.html | 10 +++-- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index cd47d80c73..b7657bedc8 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -1,5 +1,6 @@ @import (reference) '../../../app/less/typography'; @import (reference) "../../../app/less/app-icons"; +@import (reference) '../../../app/less/app'; @import (reference) 'config'; @import (reference) 'icons'; @@ -194,6 +195,11 @@ w-transaction-info-header + w-transaction-info-general { max-height: 140px; overflow: scroll; } + + &__button { + color: @color-submit-300; + cursor: pointer; + } } &-border-ts { @@ -411,7 +417,7 @@ w-transaction-info-header + w-transaction-info-general { display: flex; flex-direction: column; margin-bottom: 13px; - padding: 0 16px; + padding: 0 16px 16px; border-radius: 4px; max-height: 179px; overflow-y: auto; @@ -427,7 +433,10 @@ w-transaction-info-header + w-transaction-info-general { &.ng-hide-remove { overflow-y: hidden; } - + &__list { + padding-left: 0; + margin: 0; + } &__item { width: 100%; display: flex; @@ -443,6 +452,30 @@ w-transaction-info-header + w-transaction-info-general { padding-bottom: 16px; } } + &__actions { + display: flex; + justify-content: flex-end; + } + &__action { + cursor: pointer; + display: inline-flex; + align-items: center; + + &:not(:first-child) { + &:before { + content: ''; + background: @color-basic-500; + width: 1px; + height: 12px; + margin: 0 10px; + } + } + } +} + +.invoke-args-list__item-value { + max-width: 216px; + .ellipsis(); } @media screen and (max-width: @width-media-tiny) { diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html index d7faa8a74f..d05aa0f976 100644 --- a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html @@ -5,21 +5,23 @@
-
-
    +
    • {{::arg.type}} {{::arg.value}}
    - - +
    + + +
From 64b87b9c36e0f6965aa082377876e11d2231e5a8 Mon Sep 17 00:00:00 2001 From: ekomarovskaya Date: Mon, 22 Apr 2019 13:25:03 +0300 Subject: [PATCH 135/150] CLIENT-1563: add amim delete order --- .../dex/directives/dexMyOrders/DexMyOrders.js | 177 ++++++++++-------- .../dex/directives/dexMyOrders/myOrders.html | 3 +- .../dex/directives/dexMyOrders/myOrders.less | 3 +- 3 files changed, 97 insertions(+), 86 deletions(-) diff --git a/src/modules/dex/directives/dexMyOrders/DexMyOrders.js b/src/modules/dex/directives/dexMyOrders/DexMyOrders.js index a4d5466ad1..7b9970eaef 100644 --- a/src/modules/dex/directives/dexMyOrders/DexMyOrders.js +++ b/src/modules/dex/directives/dexMyOrders/DexMyOrders.js @@ -160,6 +160,84 @@ } } + /** + * @return {Promise | never>} + * @private + */ + static _getAllOrders() { + return waves.matcher.getOrders() + .then(filter(whereEq({ isActive: true }))) + .catch(() => (this.loadingError = true)); + } + + static _animateNotification($element) { + return utils.animate($element, { t: 100 }, { + duration: 1200, + step: function (tween) { + const progress = ease.bounceOut(tween / 100); + $element.css('transform', `translate(0, ${-100 + progress * 100}%)`); + } + }) + .then(() => utils.wait(700)) + .then(() => { + return utils.animate($element, { t: 0 }, { + duration: 500, + step: function (tween) { + const progress = ease.linear(tween / 100); + $element.css('transform', `translate(0, ${(-((1 - progress) * 100))}%)`); + } + }); + }); + } + + static _getTransactionsByOrderIdHash(txList) { + const uniqueList = uniqBy(prop('id'), txList); + const transactionsByOrderHash = Object.create(null); + uniqueList.forEach((tx) => { + ['order1', 'order2'].forEach((orderFieldName) => { + if (!transactionsByOrderHash[tx[orderFieldName].id]) { + transactionsByOrderHash[tx[orderFieldName].id] = []; + } + transactionsByOrderHash[tx[orderFieldName].id].push(DexMyOrders._remapTx(tx)); + }); + }); + return transactionsByOrderHash; + } + + static _remapTx(tx) { + const fee = (tx, order) => order.orderType === 'sell' ? tx.sellMatcherFee : tx.buyMatcherFee; + const emptyFee = new Money(0, tx.fee.asset); + const userFee = [tx.order1, tx.order2] + .filter((order) => order.sender === user.address) + .reduce((acc, order) => acc.add(fee(tx, order)), emptyFee); + + return { ...tx, userFee }; + } + + /** + * @param {IOrder} order + * @private + */ + static _remapOrders(matcherPublicKey) { + return order => { + const assetPair = order.assetPair; + const pair = `${assetPair.amountAsset.displayName} / ${assetPair.priceAsset.displayName}`; + const isNew = DexMyOrders._isNewOrder(order.timestamp.getTime()); + const percent = new BigNumber(order.progress * 100).dp(2).toFixed(); + return waves.matcher.getCreateOrderFee({ ...order, matcherPublicKey }) + .then(fee => ({ ...order, isNew, percent, pair, fee })); + }; + } + + /** + * @param {number} timestamp + * @return {boolean} + * @private + */ + static _isNewOrder(timestamp) { + return ds.utils.normalizeTime(Date.now()) < timestamp + 1000 * 8; + } + /** * @param {IOrder} order */ @@ -221,7 +299,7 @@ /** * @param order */ - dropOrder(order, element) { + dropOrder(order) { if (!permissionManager.isPermitted('CAN_CANCEL_ORDER')) { const $notify = $element.find('.js-order-notification'); DexMyOrders._animateNotification($notify); @@ -229,12 +307,23 @@ } const dataPromise = this.dropOrderGetSignData(order); - const row = element.closest('.order-row'); - row.classList.add('pre-leave'); + + const classNameToOrder = (className, isRemove = false) => { + const $row = $element.find(`.order_${order.id}`).closest('.order-row'); + + if (isRemove) { + $row.removeClass(className); + } else { + $row.addClass(className); + } + }; + + classNameToOrder('pre-leave'); + dataPromise .then((signedTxData) => ds.cancelOrder(signedTxData, order.amount.asset.id, order.price.asset.id)) .then(() => { - row.classList.add('force-leave'); + classNameToOrder('force-leave'); const canceledOrder = this.orders.find(whereEq({ id: order.id })); canceledOrder.state = 'Canceled'; notification.info({ @@ -247,7 +336,7 @@ } }) .catch(e => { - row.classList.remove('pre-leave'); + classNameToOrder('pre-leave', true); const error = utils.parseError(e); notification.error({ ns: 'app.dex', @@ -312,84 +401,6 @@ }); } - /** - * @return {Promise | never>} - * @private - */ - static _getAllOrders() { - return waves.matcher.getOrders() - .then(filter(whereEq({ isActive: true }))) - .catch(() => (this.loadingError = true)); - } - - static _animateNotification($element) { - return utils.animate($element, { t: 100 }, { - duration: 1200, - step: function (tween) { - const progress = ease.bounceOut(tween / 100); - $element.css('transform', `translate(0, ${-100 + progress * 100}%)`); - } - }) - .then(() => utils.wait(700)) - .then(() => { - return utils.animate($element, { t: 0 }, { - duration: 500, - step: function (tween) { - const progress = ease.linear(tween / 100); - $element.css('transform', `translate(0, ${(-((1 - progress) * 100))}%)`); - } - }); - }); - } - - static _getTransactionsByOrderIdHash(txList) { - const uniqueList = uniqBy(prop('id'), txList); - const transactionsByOrderHash = Object.create(null); - uniqueList.forEach((tx) => { - ['order1', 'order2'].forEach((orderFieldName) => { - if (!transactionsByOrderHash[tx[orderFieldName].id]) { - transactionsByOrderHash[tx[orderFieldName].id] = []; - } - transactionsByOrderHash[tx[orderFieldName].id].push(DexMyOrders._remapTx(tx)); - }); - }); - return transactionsByOrderHash; - } - - static _remapTx(tx) { - const fee = (tx, order) => order.orderType === 'sell' ? tx.sellMatcherFee : tx.buyMatcherFee; - const emptyFee = new Money(0, tx.fee.asset); - const userFee = [tx.order1, tx.order2] - .filter((order) => order.sender === user.address) - .reduce((acc, order) => acc.add(fee(tx, order)), emptyFee); - - return { ...tx, userFee }; - } - - /** - * @param {IOrder} order - * @private - */ - static _remapOrders(matcherPublicKey) { - return order => { - const assetPair = order.assetPair; - const pair = `${assetPair.amountAsset.displayName} / ${assetPair.priceAsset.displayName}`; - const isNew = DexMyOrders._isNewOrder(order.timestamp.getTime()); - const percent = new BigNumber(order.progress * 100).dp(2).toFixed(); - return waves.matcher.getCreateOrderFee({ ...order, matcherPublicKey }) - .then(fee => ({ ...order, isNew, percent, pair, fee })); - }; - } - - /** - * @param {number} timestamp - * @return {boolean} - * @private - */ - static _isNewOrder(timestamp) { - return ds.utils.normalizeTime(Date.now()) < timestamp + 1000 * 8; - } - } return new DexMyOrders(); diff --git a/src/modules/dex/directives/dexMyOrders/myOrders.html b/src/modules/dex/directives/dexMyOrders/myOrders.html index 976f0e7c79..f5d3f96d1b 100644 --- a/src/modules/dex/directives/dexMyOrders/myOrders.html +++ b/src/modules/dex/directives/dexMyOrders/myOrders.html @@ -75,8 +75,9 @@
-
diff --git a/src/modules/dex/directives/dexMyOrders/myOrders.less b/src/modules/dex/directives/dexMyOrders/myOrders.less index edca1552a3..4de2f55623 100644 --- a/src/modules/dex/directives/dexMyOrders/myOrders.less +++ b/src/modules/dex/directives/dexMyOrders/myOrders.less @@ -25,14 +25,13 @@ w-dex-my-orders { .repeatItemTransition.ng-leave, .repeatItemTransition.ng-enter.ng-enter-active { opacity: 1; + max-height: 30px; pointer-events: none; &.pre-leave { opacity: 0.3; } - max-height: 30px; - @media screen and (max-width: 1024px) { max-height: 69px; } From a7a53723782f7e79531ff267ceed669fc8aa1196 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Mon, 13 May 2019 15:50:47 +0300 Subject: [PATCH 136/150] CLIENT-1690: new adapter, dapp name, style for invoke info --- data-service/api/transactions/interface.d.ts | 4 +- package-lock.json | 37 +++++++--- package.json | 4 +- .../script-invocation/script-invocation.html | 2 +- .../transactionInfo/transactionInfo.less | 67 ++++++++++++++++++- .../script-invocation-info.html | 23 ++++--- 6 files changed, 112 insertions(+), 25 deletions(-) diff --git a/data-service/api/transactions/interface.d.ts b/data-service/api/transactions/interface.d.ts index 06e2875a74..b99ebb9b86 100644 --- a/data-service/api/transactions/interface.d.ts +++ b/data-service/api/transactions/interface.d.ts @@ -163,7 +163,7 @@ export module txApi { type: 16; version?: number; call: ICall; - dappAddress: string; + dApp: string; payment?: Array<{ amount: number; assetId: string; }>; } @@ -330,7 +330,7 @@ export interface IExchangeOrder { export interface IScriptInvocation extends IBaseTransaction { version?: number; call: ICall; - dappAddress: string; + dApp: string; payment?: Array; } diff --git a/package-lock.json b/package-lock.json index f97c9d1ebf..9456126775 100644 --- a/package-lock.json +++ b/package-lock.json @@ -659,9 +659,9 @@ } }, "@waves/marshall": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@waves/marshall/-/marshall-0.6.1.tgz", - "integrity": "sha512-/YLfMi664CCEqEFiju+eswFZxXg/TQZcVsb9Q7jDiLpESwno8qBDwikeLY5BIJ37g9t9JEc6TUIeUnGDoVE9TA==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@waves/marshall/-/marshall-0.7.2.tgz", + "integrity": "sha512-rZnIM92R7wY/vpmG0ZoArlyYGddyAL/fI3z/u6thFmekR44S+UDeSmQjHVB9+QKTtyRdMejpAwL0aZPj+DsJmw==", "requires": { "@types/base64-js": "^1.2.5", "@types/long": "^4.0.0", @@ -683,14 +683,14 @@ "integrity": "sha512-1qxL22a8LRA38xxzmmJktdVdGTfz2d9SXr9SI2gPpCJSKYrKb7SNGbOE3TgIyCRY0fquOHMtkwXuKGRw+LsJoA==" }, "@waves/signature-adapter": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/@waves/signature-adapter/-/signature-adapter-4.3.4.tgz", - "integrity": "sha512-E/0mBURAEeQn8PM4xdhZRO6A+ggHbIsoFmRAOX7DemL3HNIZ+ZfycAq4IOFI/SEOSuUnxHdw1PrBieSwlilQJw==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@waves/signature-adapter/-/signature-adapter-4.5.1.tgz", + "integrity": "sha512-bVJqFVRkKivkkkwgLfhwgyp8hnKFZIp0vvvZlBmMOctbp6Tqt1jUTBOTWdo7r7u2I6RbtyrAzGx6SfpQ7h9yjA==", "requires": { "@types/ramda": "^0.25.46", "@waves/data-entities": "^1.6.3", "@waves/ledger": "^3.3.3", - "@waves/marshall": "^0.6.1", + "@waves/marshall": "^0.7.2", "@waves/signature-generator": "^5.0.1", "@waves/ts-types": "^0.2.0-beta-1", "ramda": "^0.25.0" @@ -701,6 +701,18 @@ "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.25.51.tgz", "integrity": "sha512-xcmtfHIgF9SYjhGdsZR1nQslxG4hu0cIpFfLQ4CWdw3KzHvl7ki1AzFLQUkbDTG42ZN3ZsQfdRzXRlkAvbIy5Q==" }, + "@waves/marshall": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@waves/marshall/-/marshall-0.7.2.tgz", + "integrity": "sha512-rZnIM92R7wY/vpmG0ZoArlyYGddyAL/fI3z/u6thFmekR44S+UDeSmQjHVB9+QKTtyRdMejpAwL0aZPj+DsJmw==", + "requires": { + "@types/base64-js": "^1.2.5", + "@types/long": "^4.0.0", + "base64-js": "^1.3.0", + "long": "^4.0.0", + "parse-json-bignumber": "^0.1.2" + } + }, "@waves/signature-generator": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/@waves/signature-generator/-/signature-generator-5.0.1.tgz", @@ -713,9 +725,14 @@ } }, "@waves/ts-types": { - "version": "0.2.0-beta-1", - "resolved": "https://registry.npmjs.org/@waves/ts-types/-/ts-types-0.2.0-beta-1.tgz", - "integrity": "sha512-IYEV2NenNfja8rGVtaFiCu7l0KniKgVBcIaUqrdHX7ISGlL+HtRMo7PFn85wMjxhZ9Ulu8CSmLlQYP4nMP9z/w==" + "version": "0.2.0-beta-4", + "resolved": "https://registry.npmjs.org/@waves/ts-types/-/ts-types-0.2.0-beta-4.tgz", + "integrity": "sha512-a3MNk0cLlTB/cULOpv4/C4InCHucQJqCkkv7iqniDkeP60QPaYCohfGkPaF2T/9gVc6ODozJxZnPQg9coSs74A==" + }, + "parse-json-bignumber": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/parse-json-bignumber/-/parse-json-bignumber-0.1.3.tgz", + "integrity": "sha512-eE2NSq0PNe3yrtGVTuxrJSpP1pm2/NTRhfhsKA8oy2jDiYAK8BETabTFSymvw3pz6uuu8c4GpWRCCuVEdDFr8g==" } } }, diff --git a/package.json b/package.json index eb85b00ceb..7579a729d5 100644 --- a/package.json +++ b/package.json @@ -97,9 +97,9 @@ "@waves/data-service-client-js": "^2.0.0", "@waves/event-sender": "^0.5.0", "@waves/ledger": "^3.3.3", - "@waves/marshall": "^0.6.1", + "@waves/marshall": "^0.7.2", "@waves/oracle-data": "^0.0.6", - "@waves/signature-adapter": "^4.3.4", + "@waves/signature-adapter": "^4.5.1", "@waves/signature-generator": "^5.0.0", "@waves/ts-types": "0.0.2", "@waves/waves-browser-bus": "^0.1.4", diff --git a/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html index c738e507a3..27e71da500 100644 --- a/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html +++ b/src/modules/ui/directives/transaction/types/script-invocation/script-invocation.html @@ -5,7 +5,7 @@
+ params="{time: $ctrl.props.time, address: $ctrl.props.dApp}">
diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index b7657bedc8..5bd369fc70 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -419,8 +419,8 @@ w-transaction-info-header + w-transaction-info-general { margin-bottom: 13px; padding: 0 16px 16px; border-radius: 4px; - max-height: 179px; - overflow-y: auto; + max-height: 217px; + overflow-y: hidden; background-color: @color-basic-50; transition: max-height 0.3s, margin 0.3s; &.ng-hide { @@ -436,6 +436,9 @@ w-transaction-info-header + w-transaction-info-general { &__list { padding-left: 0; margin: 0; + max-height: 179px; + overflow: hidden; + transition: max-height 0.3s, margin 0.3s; } &__item { width: 100%; @@ -471,13 +474,73 @@ w-transaction-info-header + w-transaction-info-general { } } } + &.show-all { + max-height: 304px; + .transaction-details__list { + overflow-y: auto; + max-height: 270px; + } + } } .invoke-args-list__item-value { max-width: 216px; + &:hover ~ .tooltip { + display: block; + } .ellipsis(); } +.invoke-args-list__item { + position: relative; +} + + +.tooltip { + display: none; + width: auto; + position: absolute; + padding: 6px 12px; + top: 35px; + right: 149px; + transform-origin: center; + color: @color-white; + font-size: @font-size-caption-2; + line-height: 13px; + cursor: pointer; + text-shadow: 0 1px 6px rgba(78, 92, 110, 0.6); + z-index: 10; + text-align: left; + word-wrap: break-word; + border-radius: @border-radius; + background: rgba(78, 92, 110, 0.8); + span { + overflow: hidden; + text-overflow: ellipsis; + display: inline-block; + text-align: center; + } + + &::before { + position: absolute; + content: ''; + z-index: -1; + top: -5px; + right: 10px; + opacity: .8; + width: 0; + height: 0; + border: 5px solid transparent; + border-bottom-color: @color-basic-700; + border-top: 0 none; + transform: translate(0); + } + + &.right { + right: 0; + } +} + @media screen and (max-width: @width-media-tiny) { .recipients-row { padding: 9px 0 10px; diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html index d05aa0f976..b6fb2e52fa 100644 --- a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html @@ -3,34 +3,41 @@
{{::$ctrl.transaction.call.function}}
-
+
-
-
-
    +
    +
    +
    • {{::arg.type}} {{::arg.value}} +
      {{arg.value}}
    - - + +
    -
    {{::$ctrl.transaction.dappAddress}}
    +
    {{::$ctrl.transaction.dApp}}
    -
    {{::$ctrl.payment}}
    +
    {{::$ctrl.payment}}
    From 575d12f74bc5bbde86290d0b9c47a55f07ceb85f Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Mon, 13 May 2019 18:01:49 +0300 Subject: [PATCH 137/150] CLIENT-1690: tooltip in title --- .../transactionInfo/transactionInfo.less | 14 +++++++------- .../script-invocation/script-invocation-info.html | 14 ++++++++------ .../types/script-invocation/scriptInvocation.js | 5 +++++ 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index 5bd369fc70..b288fde9c5 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -417,7 +417,7 @@ w-transaction-info-header + w-transaction-info-general { display: flex; flex-direction: column; margin-bottom: 13px; - padding: 0 16px 16px; + padding: 0 0 16px; border-radius: 4px; max-height: 217px; overflow-y: hidden; @@ -434,9 +434,9 @@ w-transaction-info-header + w-transaction-info-general { overflow-y: hidden; } &__list { - padding-left: 0; + padding: 0 16px; margin: 0; - max-height: 179px; + max-height: 178px; overflow: hidden; transition: max-height 0.3s, margin 0.3s; } @@ -458,12 +458,12 @@ w-transaction-info-header + w-transaction-info-general { &__actions { display: flex; justify-content: flex-end; + padding: 0 16px; } &__action { cursor: pointer; display: inline-flex; align-items: center; - &:not(:first-child) { &:before { content: ''; @@ -475,10 +475,10 @@ w-transaction-info-header + w-transaction-info-general { } } &.show-all { - max-height: 304px; + max-height: 260px; .transaction-details__list { overflow-y: auto; - max-height: 270px; + max-height: 226px; } } } @@ -498,7 +498,7 @@ w-transaction-info-header + w-transaction-info-general { .tooltip { display: none; - width: auto; + max-width: 100%; position: absolute; padding: 6px 12px; top: 35px; diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html index b6fb2e52fa..538f0be0a1 100644 --- a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html @@ -3,22 +3,22 @@
    {{::$ctrl.transaction.call.function}}
    -
    +
    -
    +
    • + title="{{arg.value}}" + ng-repeat="arg in $ctrl.args track by $index"> {{::arg.type}} {{::arg.value}} -
      {{arg.value}}
    @@ -26,8 +26,10 @@ w-copy="::$ctrl.json" w-i18n="transaction.modals.copyCode"> + w-i18n="{{$ctrl.allVisible ? 'transaction.modals.hideAll' : 'transaction.modals.seeAll'}}"> +
    @@ -35,7 +37,7 @@
    {{::$ctrl.transaction.dApp}}
    -
    +
    {{::$ctrl.payment}}
    diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js b/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js index 784fa2f34b..284020a09a 100644 --- a/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js @@ -32,6 +32,10 @@ * @type {string} */ payment; + /** + * @type {string} + */ + args; $postLink() { @@ -43,6 +47,7 @@ const payment = this.transaction.payment[0]; this.payment = `${payment.getTokens().toFormat()} ${payment.asset.displayName}`; } + this.args = this.transaction.call.args; } } From 34baca07f66b9552858521c6450244e9340f2f5b Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Mon, 13 May 2019 18:12:24 +0300 Subject: [PATCH 138/150] CLIENT-1690: edit hide animation --- .../ui/directives/transactionInfo/transactionInfo.less | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index b288fde9c5..d52f1fde99 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -422,10 +422,11 @@ w-transaction-info-header + w-transaction-info-general { max-height: 217px; overflow-y: hidden; background-color: @color-basic-50; - transition: max-height 0.3s, margin 0.3s; + transition: max-height 0.3s, margin 0.3s, padding 0.3s; &.ng-hide { max-height: 0; margin-bottom: 0; + padding: 0; } &.ng-hide-add { overflow-y: hidden; @@ -459,6 +460,7 @@ w-transaction-info-header + w-transaction-info-general { display: flex; justify-content: flex-end; padding: 0 16px; + max-height: 100%; } &__action { cursor: pointer; From 30521204e46a1664028fca8cd082079745e5acb6 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Mon, 13 May 2019 18:36:01 +0300 Subject: [PATCH 139/150] CLIENT-1690: add scroll to top --- .../script-invocation-info.html | 4 ++-- .../script-invocation/scriptInvocation.js | 21 ++++++++++++++++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html index 538f0be0a1..5c3a72c810 100644 --- a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html @@ -7,7 +7,7 @@
    + ng-click="$ctrl.toggleVisible()">
    diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js b/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js index 284020a09a..7fad7b3473 100644 --- a/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js @@ -2,9 +2,10 @@ 'use strict'; /** + * @param {JQuery} $element * @return {DataInfo} */ - const controller = function () { + const controller = function ($element) { class DataInfo { @@ -50,11 +51,29 @@ this.args = this.transaction.call.args; } + /** + * @public + */ + toggleAll() { + this.allVisible = !this.allVisible; + $element.find('.transaction-details__list').stop().animate({ scrollTop: 0 }, 300); + } + + /** + * @public + */ + toggleVisible() { + this.allVisible = false; + this.dataVisible = !this.dataVisible; + } + } return new DataInfo(); }; + controller.$inject = ['$element']; + angular.module('app.ui').component('wScriptInvocationInfo', { bindings: { signable: '<' From ab1e5d34d69380894e18869d7ff2d720eaa13099 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Mon, 13 May 2019 19:35:12 +0300 Subject: [PATCH 140/150] CLIENT-1690: edit data tx --- .../transactionInfo/transactionInfo.less | 6 ++- .../transactionInfo/types/data/DataInfo.js | 34 +++++++++++-- .../transactionInfo/types/data/data-info.html | 50 +++++++++++++------ 3 files changed, 69 insertions(+), 21 deletions(-) diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index d52f1fde99..640eab24ef 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -389,7 +389,7 @@ w-transaction-info-header + w-transaction-info-general { display: flex; flex: 1 1 0; overflow: hidden; - + margin-right: 10px; .txinfo__unit { text-overflow: ellipsis; overflow: hidden; @@ -398,6 +398,7 @@ w-transaction-info-header + w-transaction-info-general { &:last-child { justify-content: flex-end; + margin-right: 0; } } @@ -448,6 +449,9 @@ w-transaction-info-header + w-transaction-info-general { justify-content: space-between; border-top: 1px dashed @color-basic-100; padding: 12px 0 13px; + &_header { + color: @color-basic-500; + } &:first-child { padding-top: 16px; border-top: 0; diff --git a/src/modules/ui/directives/transactionInfo/types/data/DataInfo.js b/src/modules/ui/directives/transactionInfo/types/data/DataInfo.js index dd424a086e..df0fbf41d1 100644 --- a/src/modules/ui/directives/transactionInfo/types/data/DataInfo.js +++ b/src/modules/ui/directives/transactionInfo/types/data/DataInfo.js @@ -3,9 +3,10 @@ /** * @param {$rootScope.Scope} $scope + * @param {JQuery} $element * @return {DataInfo} */ - const controller = function ($scope) { + const controller = function ($scope, $element) { class DataInfo { @@ -13,14 +14,25 @@ * @type {Signable} */ signable; + /** + * @type {string} + */ + json; + /** + * @type {boolean} + */ + dataVisible = false; /** * @type {boolean} */ - isShowAllFields = false; + allVisible = false; $postLink() { this.transaction = this.signable.getTxData(); + this.signable.getDataForApi().then(json => { + this.json = WavesApp.stringifyJSON(json, null, 4); + }); (this.transaction.id ? Promise.resolve(this.transaction.id) : this.signable.getId()) .then(id => { this.id = id; @@ -28,8 +40,20 @@ }); } - getShownFields() { - return this.isShowAllFields ? this.transaction.data : this.transaction.data.slice(0, 3); + /** + * @public + */ + toggleAll() { + this.allVisible = !this.allVisible; + $element.find('.transaction-details__list').stop().animate({ scrollTop: 0 }, 300); + } + + /** + * @public + */ + toggleVisible() { + this.allVisible = false; + this.dataVisible = !this.dataVisible; } } @@ -37,7 +61,7 @@ return new DataInfo(); }; - controller.$inject = ['$scope']; + controller.$inject = ['$scope', '$element']; angular.module('app.ui').component('wDataInfo', { bindings: { diff --git a/src/modules/ui/directives/transactionInfo/types/data/data-info.html b/src/modules/ui/directives/transactionInfo/types/data/data-info.html index 2f7548139f..43bf41df81 100644 --- a/src/modules/ui/directives/transactionInfo/types/data/data-info.html +++ b/src/modules/ui/directives/transactionInfo/types/data/data-info.html @@ -1,22 +1,42 @@ -
    -
    -
    -
    -
    -
    -
    -
    -
    {{transaction.key}}
    -
    {{transaction.type}}
    -
    {{transaction.value}}
    +
    +
    +
    +
    +
    +
    +
      +
    • +
      +
      +
      +
    • +
    • +
      {{transaction.key}}
      +
      {{transaction.type}}
      +
      {{transaction.value}}
      +
    • +
    +
    + + +
    -
    - - -
    + + Date: Tue, 14 May 2019 11:51:52 +0300 Subject: [PATCH 141/150] CLIENT-1852: fix --- package-lock.json | 36 ++++++++++++++++++++++++++---------- package.json | 4 ++-- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index f97c9d1ebf..c96c5f2a2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -620,11 +620,27 @@ } }, "@waves/event-sender": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@waves/event-sender/-/event-sender-0.5.0.tgz", - "integrity": "sha512-uacDG7zKPLaXTLyNKBFtb6ltGDg383tN8f9jiANpG8xe6/AHsOMu+RiPd6suOG2yQPT4Y0AlbiWdBs/w9JoWhA==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@waves/event-sender/-/event-sender-0.5.4.tgz", + "integrity": "sha512-hKnx0mwz6i3+3vitm6hTPPOTXsZwUmUNxtR2ptF3NpJwu1HWm8reOqptGt7UGYnNyiZOqabQZ/1shVQO5aCMAQ==", "requires": { - "@waves/waves-browser-bus": "^0.1.4" + "@waves/waves-browser-bus": "^0.1.5" + }, + "dependencies": { + "@types/node": { + "version": "11.13.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.10.tgz", + "integrity": "sha512-leUNzbFTMX94TWaIKz8N15Chu55F9QSH+INKayQr5xpkasBQBRF3qQXfo3/dOnMU/dEIit+Y/SU8HyOjq++GwA==" + }, + "@waves/waves-browser-bus": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@waves/waves-browser-bus/-/waves-browser-bus-0.1.5.tgz", + "integrity": "sha512-K7iAF2jqSxkEW1DdCAa4Qda21LDuN1MPP5zV/aHJjsO40MvFgMiLcpYSV9xw8OqXzYdZyk1omb9bBOA7r69aIQ==", + "requires": { + "@types/node": "^11.9.4", + "typed-ts-events": "^1.0.5" + } + } } }, "@waves/ledger": { @@ -736,18 +752,18 @@ "integrity": "sha512-jXbEnZ8dwy4bOZgumFv/9BTjpcCRP/oGAWcOh5pFMoeA/LShDGm2NwIds+4tDf3sEJu+nLD8UjK6aueM0s87RA==" }, "@waves/waves-browser-bus": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@waves/waves-browser-bus/-/waves-browser-bus-0.1.4.tgz", - "integrity": "sha512-aCqF03qKIsBbd7YACpayB8EdjB/kIZ4Iar6UPu9ubQ0ypBz8UsvtuGPxaGHsGumR2ppF00w/9O4h2MzN8ciaUw==", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@waves/waves-browser-bus/-/waves-browser-bus-0.1.5.tgz", + "integrity": "sha512-K7iAF2jqSxkEW1DdCAa4Qda21LDuN1MPP5zV/aHJjsO40MvFgMiLcpYSV9xw8OqXzYdZyk1omb9bBOA7r69aIQ==", "requires": { "@types/node": "^11.9.4", "typed-ts-events": "^1.0.5" }, "dependencies": { "@types/node": { - "version": "11.10.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.10.4.tgz", - "integrity": "sha512-wa09itaLE8L705aXd8F80jnFpxz3Y1/KRHfKsYL2bPc0XF+wEWu8sR9n5bmeu8Ba1N9z2GRNzm/YdHcghLkLKg==" + "version": "11.13.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.10.tgz", + "integrity": "sha512-leUNzbFTMX94TWaIKz8N15Chu55F9QSH+INKayQr5xpkasBQBRF3qQXfo3/dOnMU/dEIit+Y/SU8HyOjq++GwA==" } } }, diff --git a/package.json b/package.json index 84e71ac33b..26ee237048 100644 --- a/package.json +++ b/package.json @@ -95,14 +95,14 @@ "@waves/assets-pairs-order": "4.0.0", "@waves/data-entities": "^1.10.1", "@waves/data-service-client-js": "^2.0.0", - "@waves/event-sender": "^0.5.0", + "@waves/event-sender": "^0.5.4", "@waves/ledger": "^3.3.3", "@waves/marshall": "^0.6.1", "@waves/oracle-data": "^0.0.6", "@waves/signature-adapter": "^4.3.4", "@waves/signature-generator": "^5.0.0", "@waves/ts-types": "0.0.2", - "@waves/waves-browser-bus": "^0.1.4", + "@waves/waves-browser-bus": "^0.1.5", "angular": "1.6.6", "angular-animate": "1.6.6", "angular-aria": "1.6.6", From 1777a7881bb39a7f4ba44c907b1124cc38c60ccd Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 14 May 2019 12:50:21 +0300 Subject: [PATCH 142/150] CLIENT-1690: support tx if there is not function in it --- data-service/api/transactions/interface.d.ts | 4 ++-- .../types/script-invocation/script-invocation-info.html | 2 +- .../types/script-invocation/scriptInvocation.js | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/data-service/api/transactions/interface.d.ts b/data-service/api/transactions/interface.d.ts index b99ebb9b86..5f6f447d1e 100644 --- a/data-service/api/transactions/interface.d.ts +++ b/data-service/api/transactions/interface.d.ts @@ -162,7 +162,7 @@ export module txApi { export interface IScriptInvocation extends IBaseTransaction { type: 16; version?: number; - call: ICall; + call?: ICall; dApp: string; payment?: Array<{ amount: number; assetId: string; }>; } @@ -329,7 +329,7 @@ export interface IExchangeOrder { export interface IScriptInvocation extends IBaseTransaction { version?: number; - call: ICall; + call?: ICall; dApp: string; payment?: Array; } diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html index 5c3a72c810..81d70f0242 100644 --- a/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/script-invocation-info.html @@ -1,6 +1,6 @@
    -
    {{::$ctrl.transaction.call.function}}
    +
    {{::$ctrl.transaction.call.function || 'Default function'}}
    diff --git a/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js b/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js index 7fad7b3473..25537043c8 100644 --- a/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js +++ b/src/modules/ui/directives/transactionInfo/types/script-invocation/scriptInvocation.js @@ -48,7 +48,9 @@ const payment = this.transaction.payment[0]; this.payment = `${payment.getTokens().toFormat()} ${payment.asset.displayName}`; } - this.args = this.transaction.call.args; + if (this.transaction.call) { + this.args = this.transaction.call.args; + } } /** From 895de15873a35db9674be24e76b7e0939ffd033b Mon Sep 17 00:00:00 2001 From: uiskander Date: Tue, 14 May 2019 13:16:17 +0300 Subject: [PATCH 143/150] CLIENT-1843: fix sign in by device order icon --- src/modules/utils/modals/signByDevice/signByDevice.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/utils/modals/signByDevice/signByDevice.less b/src/modules/utils/modals/signByDevice/signByDevice.less index 1f46450c4a..d6094ea262 100644 --- a/src/modules/utils/modals/signByDevice/signByDevice.less +++ b/src/modules/utils/modals/signByDevice/signByDevice.less @@ -31,7 +31,7 @@ .create-order-icon { background: @transaction-icons; background-repeat: no-repeat; - background-position-x: -240px; + background-position-x: -160px; } .create-order-cont { border-bottom: 1px solid @color-basic-100; From c285b4dfdd0e90c7fd12dddd0c6055f35f116b41 Mon Sep 17 00:00:00 2001 From: uiskander Date: Tue, 14 May 2019 15:18:37 +0300 Subject: [PATCH 144/150] CLIENT-1854: fix layout --- src/modules/app/less/classes.less | 5 ++++- .../ui/directives/transactionInfo/transactionInfo.less | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/modules/app/less/classes.less b/src/modules/app/less/classes.less index cd8170636d..d1ab508cb2 100644 --- a/src/modules/app/less/classes.less +++ b/src/modules/app/less/classes.less @@ -72,9 +72,11 @@ justify-content: center; align-items: center; } + ._internal-error { display: none; } + .flex { display: flex; } @@ -82,6 +84,7 @@ .flex-between { justify-content: space-between; } + .nowrap { white-space: nowrap; } @@ -110,4 +113,4 @@ .hide-selection { background: none transparent; -} \ No newline at end of file +} diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index 4f3a1b21e7..39b9a12c14 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -494,7 +494,9 @@ w-transaction-info-header + w-transaction-info-general { &:hover ~ .tooltip { display: block; } - .ellipsis(); + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; } .invoke-args-list__item { From 9910b4ff7e8d4ed71abe5cee5429ed2a69bd243c Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 14 May 2019 15:28:32 +0300 Subject: [PATCH 145/150] CLIENT-1854: fix isVerifiedOrGateway --- .../modules/portfolio/directives/portfolioRow/PortfolioRow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js b/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js index 95bef540a4..9fe35de7d4 100644 --- a/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js +++ b/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js @@ -230,7 +230,7 @@ const { isVerified, isGateway, isTokenomica, logo } = utils.getDataFromOracles(this.balance.asset.id); - this.isVerifiedOrGateway = isVerified && isGateway; + this.isVerifiedOrGateway = isVerified || isGateway; const html = template({ canSetAssetScript: this._isMyAsset && this.isSmart, From fd4477e4f1c2da58a75a1a21759821d9885727b2 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 14 May 2019 15:33:44 +0300 Subject: [PATCH 146/150] CLIENT-1854: fix asset's name in asset info --- src/modules/ui/directives/assetInfoHead/AssetInfoHead.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js index 9fc2017c91..cd956f7af0 100644 --- a/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js +++ b/src/modules/ui/directives/assetInfoHead/AssetInfoHead.js @@ -28,7 +28,7 @@ */ _getAssetInfo() { waves.node.assets.getAsset(this.assetId).then(asset => { - this.assetName = asset.displayName; + this.assetName = asset.name; this.ticker = asset.ticker; const { hasLabel } = utils.getDataFromOracles(asset.id); this.hasLabel = hasLabel; From e98d174c73e83e5a8a2da10e54c06b6a271b2eb1 Mon Sep 17 00:00:00 2001 From: uiskander Date: Tue, 14 May 2019 16:12:42 +0300 Subject: [PATCH 147/150] CLIENT-1854: fix tooltip --- .../transactionInfo/transactionInfo.less | 241 +++++++++--------- 1 file changed, 121 insertions(+), 120 deletions(-) diff --git a/src/modules/ui/directives/transactionInfo/transactionInfo.less b/src/modules/ui/directives/transactionInfo/transactionInfo.less index 39b9a12c14..ed9e9a79b3 100644 --- a/src/modules/ui/directives/transactionInfo/transactionInfo.less +++ b/src/modules/ui/directives/transactionInfo/transactionInfo.less @@ -412,143 +412,144 @@ w-transaction-info-header + w-transaction-info-general { cursor: pointer; } } -} -.transaction-details { - display: flex; - flex-direction: column; - margin-bottom: 13px; - padding: 0 0 16px; - border-radius: 4px; - max-height: 217px; - overflow-y: hidden; - background-color: @color-basic-50; - transition: max-height 0.3s, margin 0.3s, padding 0.3s; - &.ng-hide { - max-height: 0; - margin-bottom: 0; - padding: 0; - } - &.ng-hide-add { - overflow-y: hidden; - } - &.ng-hide-remove { - overflow-y: hidden; - } - &__list { - padding: 0 16px; - margin: 0; - max-height: 178px; - overflow: hidden; - transition: max-height 0.3s, margin 0.3s; - } - &__item { - width: 100%; + .transaction-details { display: flex; - align-items: flex-start; - justify-content: space-between; - border-top: 1px dashed @color-basic-100; - padding: 12px 0 13px; - &_header { - color: @color-basic-500; + flex-direction: column; + margin-bottom: 13px; + padding: 0 0 16px; + border-radius: 4px; + max-height: 217px; + overflow-y: hidden; + background-color: @color-basic-50; + transition: max-height 0.3s, margin 0.3s, padding 0.3s; + &.ng-hide { + max-height: 0; + margin-bottom: 0; + padding: 0; } - &:first-child { - padding-top: 16px; - border-top: 0; + &.ng-hide-add { + overflow-y: hidden; } - &:last-child { - padding-bottom: 16px; + &.ng-hide-remove { + overflow-y: hidden; } - } - &__actions { - display: flex; - justify-content: flex-end; - padding: 0 16px; - max-height: 100%; - } - &__action { - cursor: pointer; - display: inline-flex; - align-items: center; - &:not(:first-child) { - &:before { - content: ''; - background: @color-basic-500; - width: 1px; - height: 12px; - margin: 0 10px; + &__list { + padding: 0 16px; + margin: 0; + max-height: 178px; + overflow: hidden; + transition: max-height 0.3s, margin 0.3s; + } + &__item { + width: 100%; + display: flex; + align-items: flex-start; + justify-content: space-between; + border-top: 1px dashed @color-basic-100; + padding: 12px 0 13px; + &_header { + color: @color-basic-500; + } + &:first-child { + padding-top: 16px; + border-top: 0; + } + &:last-child { + padding-bottom: 16px; } } - } - &.show-all { - max-height: 260px; - .transaction-details__list { - overflow-y: auto; - max-height: 226px; + &__actions { + display: flex; + justify-content: flex-end; + padding: 0 16px; + max-height: 100%; + } + &__action { + cursor: pointer; + display: inline-flex; + align-items: center; + &:not(:first-child) { + &:before { + content: ''; + background: @color-basic-500; + width: 1px; + height: 12px; + margin: 0 10px; + } + } + } + &.show-all { + max-height: 260px; + .transaction-details__list { + overflow-y: auto; + max-height: 226px; + } } } -} - -.invoke-args-list__item-value { - max-width: 216px; - &:hover ~ .tooltip { - display: block; - } - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -} -.invoke-args-list__item { - position: relative; -} - - -.tooltip { - display: none; - max-width: 100%; - position: absolute; - padding: 6px 12px; - top: 35px; - right: 149px; - transform-origin: center; - color: @color-white; - font-size: @font-size-caption-2; - line-height: 13px; - cursor: pointer; - text-shadow: 0 1px 6px rgba(78, 92, 110, 0.6); - z-index: 10; - text-align: left; - word-wrap: break-word; - border-radius: @border-radius; - background: rgba(78, 92, 110, 0.8); - span { - overflow: hidden; + .invoke-args-list__item-value { + max-width: 216px; + &:hover ~ .tooltip { + display: block; + } text-overflow: ellipsis; - display: inline-block; - text-align: center; + overflow: hidden; + white-space: nowrap; } - &::before { - position: absolute; - content: ''; - z-index: -1; - top: -5px; - right: 10px; - opacity: .8; - width: 0; - height: 0; - border: 5px solid transparent; - border-bottom-color: @color-basic-700; - border-top: 0 none; - transform: translate(0); + .invoke-args-list__item { + position: relative; } - &.right { - right: 0; - } + // TODO tooltip + //.tooltip { + // display: none; + // max-width: 100%; + // position: absolute; + // padding: 6px 12px; + // top: 35px; + // right: 149px; + // transform-origin: center; + // color: @color-white; + // font-size: @font-size-caption-2; + // line-height: 13px; + // cursor: pointer; + // text-shadow: 0 1px 6px rgba(78, 92, 110, 0.6); + // z-index: 10; + // text-align: left; + // word-wrap: break-word; + // border-radius: @border-radius; + // background: rgba(78, 92, 110, 0.8); + // span { + // overflow: hidden; + // text-overflow: ellipsis; + // display: inline-block; + // text-align: center; + // } + // + // &::before { + // position: absolute; + // content: ''; + // z-index: -1; + // top: -5px; + // right: 10px; + // opacity: .8; + // width: 0; + // height: 0; + // border: 5px solid transparent; + // border-bottom-color: @color-basic-700; + // border-top: 0 none; + // transform: translate(0); + // } + // + // &.right { + // right: 0; + // } + //} } + @media screen and (max-width: @width-media-tiny) { .recipients-row { padding: 9px 0 10px; From 904c8640d26ca54fa4854dda634a253532b7a12c Mon Sep 17 00:00:00 2001 From: uiskander Date: Tue, 14 May 2019 16:20:53 +0300 Subject: [PATCH 148/150] CLIENT-1854: fix tooltip --- src/modules/ui/directives/helpIcon/helpIcon.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ui/directives/helpIcon/helpIcon.less b/src/modules/ui/directives/helpIcon/helpIcon.less index 20c6ee73bc..1b7e03216f 100644 --- a/src/modules/ui/directives/helpIcon/helpIcon.less +++ b/src/modules/ui/directives/helpIcon/helpIcon.less @@ -40,7 +40,7 @@ top: 21px; position: absolute; content: ''; - z-index: 0; + z-index: 1; } &.hovered::before, From 383a8f75eba50e4def1005c2f17de37e68cdfa65 Mon Sep 17 00:00:00 2001 From: Max Axenov Date: Tue, 14 May 2019 16:26:08 +0300 Subject: [PATCH 149/150] CLIENT-1854: fix sponsored modal --- src/modules/utils/modals/sponsored/SponsoredModalCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/utils/modals/sponsored/SponsoredModalCtrl.js b/src/modules/utils/modals/sponsored/SponsoredModalCtrl.js index 6b0aecbf13..d1232db99c 100644 --- a/src/modules/utils/modals/sponsored/SponsoredModalCtrl.js +++ b/src/modules/utils/modals/sponsored/SponsoredModalCtrl.js @@ -68,7 +68,7 @@ this.isCreateSponsored = isCreateSponsored; const { isVerified, isGateway, - isTokenomica, ticker, description } = utils.getDataFromOracles(this.balance.asset.id); + isTokenomica, ticker, description } = utils.getDataFromOracles(asset.id); this.isVerified = isVerified; this.isGateway = isGateway; this.isTokenomica = isTokenomica; From 25fffb76fe95063960a27960d973ec15bf26f57b Mon Sep 17 00:00:00 2001 From: Valentin Kuzmenkov Date: Tue, 14 May 2019 17:45:46 +0300 Subject: [PATCH 150/150] CLIENT-1854:up version + whats new --- package.json | 2 +- src/modules/utils/services/whatsNew.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e979288a39..8f95aca254 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "waves-client", - "version": "1.2.5", + "version": "1.2.6", "description": "The official client application for the Waves platform", "private": true, "repository": { diff --git a/src/modules/utils/services/whatsNew.js b/src/modules/utils/services/whatsNew.js index 67bbfaf6cf..7465454588 100644 --- a/src/modules/utils/services/whatsNew.js +++ b/src/modules/utils/services/whatsNew.js @@ -38,7 +38,8 @@ '1.2.0', '1.2.1', '1.2.2', - '1.2.3' + '1.2.3', + '1.2.6' ]; /**