(function () {
    'use strict';

    /**
     * @param {Base} Base
     * @param {Scope} $scope
     * @param {Poll} Poll
     * @param {AssetsService} assetsService
     * @param {DataFeed} dataFeed
     * @return {TradeHistory}
     */
    const controller = function (Base, $scope, Poll, assetsService, dataFeed) {

        class TradeHistory extends Base {

            constructor() {
                super();
                /**
                 * @type {string}
                 */
                this.amountAssetId = null;
                /**
                 * @type {string}
                 */
                this.priceAssetId = null;
                /**
                 * @type {IAssetInfo}
                 */
                this.priceAsset = null;
                /**
                 * @type {Array}
                 */
                this.orders = [];
                /**
                 * @type {Poll}
                 */
                this.poll = new Poll(this._getTradeHistory.bind(this), this._applyTradeHistory.bind(this), 5000);

                this.shema = new tsApiValidator.Schema({
                    type: 'array',
                    required: true,
                    content: {
                        type: 'object',
                        required: true,
                        content: {
                            price: { type: 'number', required: true },
                            size: { type: 'number', required: true, path: 'amount' },
                            date: { type: 'date', required: true, path: 'timestamp' },
                            type: { type: 'string', required: true }
                        }
                    }
                });

                this.observe(['amountAssetId', 'priceAssetId'], this._onChangeAssets);
            }

            $onDestroy() {
                super.$onDestroy();
                this.poll.destroy();
            }

            _onChangeAssets() {
                this.orders = [];
                this.poll.restart();
                assetsService.getAssetInfo(this.priceAssetId)
                    .then((asset) => {
                        this.priceAsset = asset;
                    });
            }

            _applyTradeHistory(data) {
                if (data) {
                    this.orders = data;
                } else {
                    this.orders = [];
                }
            }

            _getTradeHistory() {
                if (!this.amountAssetId || !this.priceAssetId) {
                    return null;
                }
                return dataFeed.trades(this.amountAssetId, this.priceAssetId)
                    .then(data => this.shema.parse(data));
            }

        }

        return new TradeHistory();
    };

    controller.$inject = ['Base', '$scope', 'Poll', 'assetsService', 'dataFeed', 'i18n'];

    angular.module('app.dex')
        .component('wDexTradeHistory', {
            bindings: {
                amountAssetId: '<',
                priceAssetId: '<'
            },
            templateUrl: '/modules/dex/directives/tradeHistory/tradeHistory.html',
            controller
        });
})();

@@ -1367,32 +1367,49 @@
 ce: %7B type: 
-'n
+tsApiValidator.N
 umber
-'
+Part
 , required: 
@@ -1462,16 +1462,33 @@
 pe: 
-'n
+tsApiValidator.N
 umber
-'
+Part
 , re
@@ -1565,14 +1565,31 @@
 pe: 
-'date'
+tsApiValidator.DatePart
 , re
@@ -1669,16 +1669,33 @@
 pe: 
-'s
+tsApiValidator.S
 tring
-'
+Part
 , re

Fix parse Schema