2018-12-27 18:50:45 +03:00
( window [ "webpackJsonp" ] = window [ "webpackJsonp" ] || [ ] ) . push ( [ [ "main" ] , {
/***/ "./src/$$_lazy_route_resource lazy recursive" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / $$ _lazy _route _resource lazy namespace object * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
function webpackEmptyAsyncContext ( req ) {
// Here Promise.resolve().then() is used instead of new Promise() to prevent
// uncaught exception popping up in devtools
return Promise . resolve ( ) . then ( function ( ) {
var e = new Error ( "Cannot find module '" + req + "'" ) ;
e . code = 'MODULE_NOT_FOUND' ;
throw e ;
} ) ;
}
webpackEmptyAsyncContext . keys = function ( ) { return [ ] ; } ;
webpackEmptyAsyncContext . resolve = webpackEmptyAsyncContext ;
module . exports = webpackEmptyAsyncContext ;
webpackEmptyAsyncContext . id = "./src/$$_lazy_route_resource lazy recursive" ;
/***/ } ) ,
/***/ "./src/app/_helpers/directives/input-validate/input-validate.directive.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / directives / input - validate / input - validate . directive . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: InputValidateDirective */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "InputValidateDirective" , function ( ) { return InputValidateDirective ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
2019-01-30 17:18:18 +02:00
/* harmony import */ var _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../../services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var InputValidateDirective = /** @class */ ( function ( ) {
2019-01-15 14:17:10 +02:00
function InputValidateDirective ( el , variablesService ) {
2018-12-27 18:50:45 +03:00
this . el = el ;
2019-01-15 14:17:10 +02:00
this . variablesService = variablesService ;
2018-12-27 18:50:45 +03:00
}
Object . defineProperty ( InputValidateDirective . prototype , "defineInputType" , {
set : function ( type ) {
2019-01-30 17:18:18 +02:00
this . type = type ;
2018-12-27 18:50:45 +03:00
} ,
enumerable : true ,
configurable : true
} ) ;
2019-01-30 17:18:18 +02:00
InputValidateDirective . prototype . handleInput = function ( event ) {
if ( this . type === 'money' ) {
this . moneyValidation ( event ) ;
}
else if ( this . type === 'integer' ) {
this . integerValidation ( event ) ;
}
} ;
InputValidateDirective . prototype . moneyValidation = function ( event ) {
var currentValue = event . target . value ;
var originalValue = currentValue ;
var OnlyD = /[^\d\.]/g ;
var _has _error = currentValue . match ( OnlyD ) ;
if ( _has _error && _has _error . length ) {
currentValue = currentValue . replace ( ',' , '.' ) . replace ( OnlyD , '' ) ;
}
var _double _separator = currentValue . match ( /\./g ) ;
if ( _double _separator && _double _separator . length > 1 ) {
currentValue = currentValue . substr ( 0 , currentValue . lastIndexOf ( '.' ) ) ;
}
if ( currentValue . indexOf ( '.' ) === 0 ) {
currentValue = '0' + currentValue ;
}
var _zero _fill = currentValue . split ( '.' ) ;
if ( _zero _fill [ 0 ] . length > 7 ) {
_zero _fill [ 0 ] = _zero _fill [ 0 ] . substr ( 0 , 7 ) ;
}
if ( 1 in _zero _fill && _zero _fill [ 1 ] . length ) {
_zero _fill [ 1 ] = _zero _fill [ 1 ] . substr ( 0 , this . variablesService . digits ) ;
}
currentValue = _zero _fill . join ( '.' ) ;
if ( currentValue !== originalValue ) {
var cursorPosition = event . target . selectionEnd ;
event . target . value = currentValue ;
event . target . setSelectionRange ( cursorPosition , cursorPosition ) ;
2019-02-19 17:33:37 +02:00
event . target . dispatchEvent ( new Event ( 'input' ) ) ;
2019-01-30 17:18:18 +02:00
}
} ;
InputValidateDirective . prototype . integerValidation = function ( event ) {
var currentValue = event . target . value ;
var originalValue = currentValue ;
var OnlyD = /[^\d]/g ;
var _has _error = currentValue . match ( OnlyD ) ;
if ( _has _error && _has _error . length ) {
currentValue = currentValue . replace ( OnlyD , '' ) ;
}
if ( currentValue !== originalValue ) {
var cursorPosition = event . target . selectionEnd ;
event . target . value = currentValue ;
event . target . setSelectionRange ( cursorPosition , cursorPosition ) ;
}
} ;
2018-12-27 18:50:45 +03:00
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( 'appInputValidate' ) ,
_ _metadata ( "design:type" , String ) ,
_ _metadata ( "design:paramtypes" , [ String ] )
] , InputValidateDirective . prototype , "defineInputType" , null ) ;
2019-01-30 17:18:18 +02:00
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "HostListener" ] ) ( 'input' , [ '$event' ] ) ,
_ _metadata ( "design:type" , Function ) ,
_ _metadata ( "design:paramtypes" , [ Event ] ) ,
_ _metadata ( "design:returntype" , void 0 )
] , InputValidateDirective . prototype , "handleInput" , null ) ;
2018-12-27 18:50:45 +03:00
InputValidateDirective = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Directive" ] ) ( {
selector : '[appInputValidate]'
} ) ,
2019-01-30 17:18:18 +02:00
_ _metadata ( "design:paramtypes" , [ _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ElementRef" ] , _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "VariablesService" ] ] )
2018-12-27 18:50:45 +03:00
] , InputValidateDirective ) ;
return InputValidateDirective ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/_helpers/directives/modal-container/modal-container.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / directives / modal - container / modal - container . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-01-31 16:10:02 +02:00
module . exports = "<div class=\"modal\">\r\n <div class=\"content\">\r\n <i class=\"icon\" [class.error]=\"type === 'error'\" [class.success]=\"type === 'success'\" [class.info]=\"type === 'info'\"></i>\r\n <div class=\"message-container\">\r\n <span class=\"title\">{{title}}</span>\r\n <span class=\"message\" [innerHTML]=\"message\"></span>\r\n </div>\r\n </div>\r\n <button type=\"button\" class=\"action-button\" (click)=\"onClose()\" #btn>{{ 'MODALS.OK' | translate }}</button>\r\n <button type=\"button\" class=\"close-button\" (click)=\"onClose()\"><i class=\"icon close\"></i></button>\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/_helpers/directives/modal-container/modal-container.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / directives / modal - container / modal - container . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = " : host { \ n position : fixed ; \ n top : 0 ; \ n bottom : 0 ; \ n left : 0 ; \ n right : 0 ; \ n display : flex ; \ n align - items : center ; \ n justify - content : center ; \ n background : rgba ( 255 , 255 , 255 , 0.25 ) ; } \ n \ n . modal { \ n position : relative ; \ n display : flex ; \ n flex - direction : column ; \ n background - position : center ; \ n background - size : 200 % ; \ n padding : 2 rem ; \ n width : 34 rem ; } \ n \ n . modal . content { \ n display : flex ; \ n margin : 1.2 rem 0 ; } \ n \ n . modal . content . icon { \ n flex : 0 0 auto ; \ n width : 4.4 rem ; \ n height : 4.4 rem ; } \ n \ n . modal . content . icon . error { \ n - webkit - mask : url ( 'modal-alert.svg' ) no - repeat center ; \ n mask : url ( 'modal-alert.svg' ) no - repeat center ; } \ n \ n . modal . content . icon . success { \ n - webkit - mask : url ( 'modal-success.svg' ) no - repeat center ; \ n mask : url ( 'modal-success.svg' ) no - repeat center ; } \ n \ n . modal . content . icon . info { \ n - webkit - mask : url ( 'modal-info.svg' ) no - repeat center ; \ n mask : url ( 'modal-info.svg' ) no - repeat center ; } \ n \ n . modal . content . message - container { \ n display : flex ; \ n flex - direction : column ; \ n margin - left : 2 rem ; } \ n \ n . modal . content . message - container . title { \ n font - size : 1.8 rem ; \ n font - weight : 600 ; \ n line - height : 2.2 rem ; } \ n \ n . modal . content . message - container . message { \ n font - size : 1.3 rem ; \ n line - height : 1.8 rem ; \ n margin - top : 0.4 rem ; } \ n \ n . modal . action - button { \ n margin : 1.2 rem auto 0.6 rem ; \ n width : 10 rem ; \ n height : 2.4 rem ; } \ n \ n . modal . close - button { \ n position : absolute ; \ n top : 0 ; \ n right : 0 ; \ n display : flex ; \ n align - items : center ; \ n justify - content : center ; \ n background : transparent ; \ n margin : 0 ; \ n padding : 0 ; \ n width : 2.4 rem ; \ n height : 2.4 rem ; } \ n \ n . modal . close - button . icon { \ n - webkit - mask : url ( 'close.svg' ) no - repeat center ; \ n mask : url ( 'close.svg' ) no - repeat center ; \ n width : 2.4 rem ; \ n height : 2.4 rem ; } \ n \ n / * # sourceMappingURL = data : application / json ; base64 , eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvX2hlbHBlcnMvZGlyZWN0aXZlcy9tb2RhbC1jb250YWluZXIvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxcX2hlbHBlcnNcXGRpcmVjdGl2ZXNcXG1vZGFsLWNvbnRhaW5lclxcbW9kYWwtY29udGFpbmVyLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZUFBZTtFQUNmLE1BQU07RUFDTixTQUFTO0VBQ1QsT0FBTztFQUNQLFFBQVE7RUFDUixhQUFhO0VBQ2IsbUJBQW1CO0VBQ25CLHVCQUF1QjtFQUN2QixxQ0FBcUMsRUFBQTs7QUFFdkM7RUFDRSxrQkFBa0I7RUFDbEIsYUFBYTtFQUNiLHNCQUFzQjtFQUN0QiwyQkFBMkI7RUFDM0IscUJBQXFCO0VBQ3JCLGFBQWE7RUFDYixZQUFZLEVBQUE7O0FBUGQ7SUFVSSxhQUFhO0lBQ2IsZ0JBQWdCLEVBQUE7O0FBWHBCO01BY00sY0FBYztNQUNkLGFBQWE7TUFDYixjQUFjLEVBQUE7O0FBaEJwQjtRQW1CUSxxREFBNkQ7Z0JBQTdELDZDQUE2RCxFQUFBOztBQW5CckU7UUF1QlEsdURBQStEO2dCQUEvRCwrQ0FBK0QsRUFBQTs7QUF2QnZFO1FBMkJRLG9EQUE0RDtnQkFBNUQsNENBQTRELEVBQUE7O0FBM0JwRTtNQWdDTSxhQUFhO01BQ2Isc0JBQXNCO01BQ3RCLGlCQUFpQixFQUFBOztBQWxDdkI7UUFxQ1EsaUJBQWlCO1FBQ2pCLGdCQUFnQjtRQUNoQixtQkFBbUIsRUFBQTs7QUF2QzNCO1FBMkNRLGlCQUFpQjtRQUNqQixtQkFBbUI7UUFDbkIsa0JBQWtCLEVBQUE7O0FBN0MxQjtJQW1ESSwwQkFBMEI7SUFDMUIsWUFBWTtJQUNaLGNBQWMsRUFBQTs7QUFyRGxCO0lBeURJLGtCQUFrQjtJQUNsQixNQUFNO0lBQ04sUUFBUTtJQUNSLGFBQWE7SUFDYixtQkFBbUI7SUFDbkIsdUJBQXVCO0lBQ3ZCLHVCQUF1QjtJQUN2QixTQUFTO0lBQ1QsVUFBVTtJQUNWLGFBQWE7SUFDYixjQUFjLEVBQUE7O0FBbkVsQjtNQXNFTSwrQ0FBdUQ7Y0FBdkQsdUNBQXVEO01BQ3ZELGFBQWE7TUFDYixjQUFjLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9faGVscGVycy9kaXJlY3RpdmVzL21vZGFsLWNvbnRhaW5lci9tb2RhbC1jb250YWluZXIuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCB7XHJcbiAgcG9zaXRpb246IGZpeGVkO1xyXG4gIHRvcDogMDtcclxuICBib3R0b206IDA7XHJcbiAgbGVmdDogMDtcclxuICByaWdodDogMDtcclxuICBkaXNwbGF5OiBmbGV4O1xyXG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XHJcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XHJcbiAgYmFja2dyb3VuZDogcmdiYSgyNTUsIDI1NSwgMjU1LCAwLjI1KTtcclxufVxyXG4ubW9kYWwge1xyXG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcclxuICBkaXNwbGF5OiBmbGV4O1xyXG4gIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XHJcbiAgYmFja2dyb3VuZC1wb3NpdGlvbjogY2VudGVyO1xyXG4gIGJhY2tncm91bmQtc2l6ZTogMjAwJTtcclxuICBwYWRkaW5nOiAycmVtO1xyXG4gIHdpZHRoOiAzNHJlbTtcclxuXHJcbiAgLmNvbnRlbnQ
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/_helpers/directives/modal-container/modal-container.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / directives / modal - container / modal - container . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: ModalContainerComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "ModalContainerComponent" , function ( ) { return ModalContainerComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
2019-01-25 16:16:31 +02:00
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-25 16:16:31 +02:00
2018-12-27 18:50:45 +03:00
var ModalContainerComponent = /** @class */ ( function ( ) {
2019-01-25 16:16:31 +02:00
function ModalContainerComponent ( translate ) {
this . translate = translate ;
2019-01-09 15:25:03 +02:00
this . close = new _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "EventEmitter" ] ( ) ;
2018-12-27 18:50:45 +03:00
}
ModalContainerComponent . prototype . ngOnInit = function ( ) {
2019-01-09 15:25:03 +02:00
this . button . nativeElement . focus ( ) ;
switch ( this . type ) {
case 'error' :
2019-01-31 16:10:02 +02:00
this . title = this . translate . instant ( 'MODALS.ERROR' ) ;
2019-01-09 15:25:03 +02:00
break ;
case 'success' :
2019-01-31 16:10:02 +02:00
this . title = this . translate . instant ( 'MODALS.SUCCESS' ) ;
2019-01-09 15:25:03 +02:00
break ;
case 'info' :
2019-01-31 16:10:02 +02:00
this . title = this . translate . instant ( 'MODALS.INFO' ) ;
2019-01-09 15:25:03 +02:00
break ;
}
2018-12-27 18:50:45 +03:00
} ;
2019-01-09 15:25:03 +02:00
ModalContainerComponent . prototype . onClose = function ( ) {
this . close . emit ( ) ;
} ;
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( ) ,
_ _metadata ( "design:type" , String )
] , ModalContainerComponent . prototype , "type" , void 0 ) ;
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( ) ,
_ _metadata ( "design:type" , String )
] , ModalContainerComponent . prototype , "message" , void 0 ) ;
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Output" ] ) ( ) ,
_ _metadata ( "design:type" , Object )
] , ModalContainerComponent . prototype , "close" , void 0 ) ;
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ViewChild" ] ) ( 'btn' ) ,
_ _metadata ( "design:type" , _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ElementRef" ] )
] , ModalContainerComponent . prototype , "button" , void 0 ) ;
2018-12-27 18:50:45 +03:00
ModalContainerComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-modal-container' ,
template : _ _webpack _require _ _ ( /*! ./modal-container.component.html */ "./src/app/_helpers/directives/modal-container/modal-container.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./modal-container.component.scss */ "./src/app/_helpers/directives/modal-container/modal-container.component.scss" ) ]
} ) ,
2019-01-25 16:16:31 +02:00
_ _metadata ( "design:paramtypes" , [ _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "TranslateService" ] ] )
2018-12-27 18:50:45 +03:00
] , ModalContainerComponent ) ;
return ModalContainerComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/_helpers/directives/staking-switch/staking-switch.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / directives / staking - switch / s t a k i n g - s w i t c h . c o m p o n e n t . h t m l * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-01-31 16:10:02 +02:00
module . exports = "<div class=\"switch\" (click)=\"toggleStaking(); $event.stopPropagation()\">\r\n <span class=\"option\" *ngIf=\"staking\">{{ 'STAKING.SWITCH.ON' | translate }}</span>\r\n <span class=\"circle\" [class.on]=\"staking\" [class.off]=\"!staking\"></span>\r\n <span class=\"option\" *ngIf=\"!staking\">{{ 'STAKING.SWITCH.OFF' | translate }}</span>\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/_helpers/directives/staking-switch/staking-switch.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / directives / staking - switch / s t a k i n g - s w i t c h . c o m p o n e n t . s c s s * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ".switch {\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-radius: 1rem;\n cursor: pointer;\n font-size: 1rem;\n padding: 0.5rem;\n width: 5rem;\n height: 2rem; }\n .switch .circle {\n border-radius: 1rem;\n width: 1.2rem;\n height: 1.2rem; }\n .switch .option {\n margin: 0 0.2rem;\n line-height: 1.2rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvX2hlbHBlcnMvZGlyZWN0aXZlcy9zdGFraW5nLXN3aXRjaC9EOlxcUHJvamVjdHNcXFphbm9cXHNyY1xcZ3VpXFxxdC1kYWVtb25cXGh0bWxfc291cmNlL3NyY1xcYXBwXFxfaGVscGVyc1xcZGlyZWN0aXZlc1xcc3Rha2luZy1zd2l0Y2hcXHN0YWtpbmctc3dpdGNoLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsYUFBYTtFQUNiLG1CQUFtQjtFQUNuQiw4QkFBOEI7RUFDOUIsbUJBQW1CO0VBQ25CLGVBQWU7RUFDZixlQUFlO0VBQ2YsZUFBZTtFQUNmLFdBQVc7RUFDWCxZQUFZLEVBQUE7RUFUZDtJQVlJLG1CQUFtQjtJQUNuQixhQUFhO0lBQ2IsY0FBYyxFQUFBO0VBZGxCO0lBa0JJLGdCQUFnQjtJQUNoQixtQkFBbUIsRUFBQSIsImZpbGUiOiJzcmMvYXBwL19oZWxwZXJzL2RpcmVjdGl2ZXMvc3Rha2luZy1zd2l0Y2gvc3Rha2luZy1zd2l0Y2guY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuc3dpdGNoIHtcclxuICBkaXNwbGF5OiBmbGV4O1xyXG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XHJcbiAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xyXG4gIGJvcmRlci1yYWRpdXM6IDFyZW07XHJcbiAgY3Vyc29yOiBwb2ludGVyO1xyXG4gIGZvbnQtc2l6ZTogMXJlbTtcclxuICBwYWRkaW5nOiAwLjVyZW07XHJcbiAgd2lkdGg6IDVyZW07XHJcbiAgaGVpZ2h0OiAycmVtO1xyXG5cclxuICAuY2lyY2xlIHtcclxuICAgIGJvcmRlci1yYWRpdXM6IDFyZW07XHJcbiAgICB3aWR0aDogMS4ycmVtO1xyXG4gICAgaGVpZ2h0OiAxLjJyZW07XHJcbiAgfVxyXG5cclxuICAub3B0aW9uIHtcclxuICAgIG1hcmdpbjogMCAwLjJyZW07XHJcbiAgICBsaW5lLWhlaWdodDogMS4ycmVtO1xyXG4gIH1cclxufVxyXG4iXX0= */"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/_helpers/directives/staking-switch/staking-switch.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / directives / staking - switch / s t a k i n g - s w i t c h . c o m p o n e n t . t s * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: StakingSwitchComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "StakingSwitchComponent" , function ( ) { return StakingSwitchComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _services _backend _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../../services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _services _variables _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ../../services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var StakingSwitchComponent = /** @class */ ( function ( ) {
function StakingSwitchComponent ( backend , variablesService ) {
this . backend = backend ;
this . variablesService = variablesService ;
this . stakingChange = new _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "EventEmitter" ] ( ) ;
}
2019-01-09 15:25:03 +02:00
StakingSwitchComponent . prototype . ngOnInit = function ( ) { } ;
2018-12-27 18:50:45 +03:00
StakingSwitchComponent . prototype . toggleStaking = function ( ) {
var wallet = this . variablesService . getWallet ( this . wallet _id ) ;
if ( wallet && wallet . loaded ) {
this . stakingChange . emit ( ! this . staking ) ;
if ( ! this . staking ) {
this . backend . startPosMining ( this . wallet _id ) ;
}
else {
this . backend . stopPosMining ( this . wallet _id ) ;
}
}
} ;
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( ) ,
_ _metadata ( "design:type" , Boolean )
] , StakingSwitchComponent . prototype , "wallet_id" , void 0 ) ;
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( ) ,
_ _metadata ( "design:type" , Boolean )
] , StakingSwitchComponent . prototype , "staking" , void 0 ) ;
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Output" ] ) ( ) ,
_ _metadata ( "design:type" , Object )
] , StakingSwitchComponent . prototype , "stakingChange" , void 0 ) ;
StakingSwitchComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-staking-switch' ,
template : _ _webpack _require _ _ ( /*! ./staking-switch.component.html */ "./src/app/_helpers/directives/staking-switch/staking-switch.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./staking-switch.component.scss */ "./src/app/_helpers/directives/staking-switch/staking-switch.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _services _backend _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "BackendService" ] , _services _variables _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "VariablesService" ] ] )
] , StakingSwitchComponent ) ;
return StakingSwitchComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/_helpers/directives/tooltip.directive.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / directives / tooltip . directive . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: TooltipDirective */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "TooltipDirective" , function ( ) { return TooltipDirective ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
2019-02-14 17:28:29 +02:00
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-02-14 17:28:29 +02:00
2018-12-27 18:50:45 +03:00
var TooltipDirective = /** @class */ ( function ( ) {
2019-02-14 17:28:29 +02:00
function TooltipDirective ( el , renderer , route ) {
2018-12-27 18:50:45 +03:00
this . el = el ;
this . renderer = renderer ;
2019-02-14 17:28:29 +02:00
this . route = route ;
2019-01-17 16:48:37 +02:00
this . timeout = 0 ;
this . delay = 0 ;
2019-02-22 11:18:50 +02:00
this . showWhenNoOverflow = true ;
2018-12-27 18:50:45 +03:00
}
TooltipDirective . prototype . onMouseEnter = function ( ) {
2019-02-22 11:18:50 +02:00
if ( this . showWhenNoOverflow || ( ! this . showWhenNoOverflow && this . el . nativeElement . offsetWidth < this . el . nativeElement . scrollWidth ) ) {
this . cursor = 'pointer' ;
if ( ! this . tooltip ) {
this . show ( ) ;
}
else {
this . cancelHide ( ) ;
}
2019-01-09 15:25:03 +02:00
}
2018-12-27 18:50:45 +03:00
} ;
TooltipDirective . prototype . onMouseLeave = function ( ) {
if ( this . tooltip ) {
this . hide ( ) ;
}
} ;
TooltipDirective . prototype . show = function ( ) {
this . create ( ) ;
2019-02-22 16:21:44 +02:00
this . placement = this . placement === null ? 'top' : this . placement ;
this . setPosition ( this . placement ) ;
2018-12-27 18:50:45 +03:00
} ;
TooltipDirective . prototype . hide = function ( ) {
var _this = this ;
2019-01-09 15:25:03 +02:00
this . removeTooltipTimeout = setTimeout ( function ( ) {
2019-01-17 16:48:37 +02:00
_this . renderer . setStyle ( _this . tooltip , 'opacity' , '0' ) ;
2019-02-14 17:28:29 +02:00
_this . removeTooltipTimeoutInner = setTimeout ( function ( ) {
2019-01-17 16:48:37 +02:00
_this . renderer . removeChild ( document . body , _this . tooltip ) ;
_this . tooltip = null ;
} , _this . delay ) ;
} , this . timeout ) ;
2018-12-27 18:50:45 +03:00
} ;
2019-01-09 15:25:03 +02:00
TooltipDirective . prototype . cancelHide = function ( ) {
clearTimeout ( this . removeTooltipTimeout ) ;
2019-02-14 17:28:29 +02:00
clearTimeout ( this . removeTooltipTimeoutInner ) ;
2019-01-09 15:25:03 +02:00
this . renderer . setStyle ( this . tooltip , 'opacity' , '1' ) ;
} ;
2018-12-27 18:50:45 +03:00
TooltipDirective . prototype . create = function ( ) {
var _this = this ;
2019-01-17 16:48:37 +02:00
if ( typeof this . tooltipInner === 'string' ) {
this . tooltip = this . renderer . createElement ( 'div' ) ;
this . tooltip . innerHTML = this . tooltipInner ;
}
else {
this . tooltip = this . tooltipInner ;
}
2018-12-27 18:50:45 +03:00
this . renderer . appendChild ( document . body , this . tooltip ) ;
2019-02-14 17:28:29 +02:00
this . tooltip . addEventListener ( 'mouseenter' , function ( ) {
_this . cancelHide ( ) ;
} ) ;
this . tooltip . addEventListener ( 'mouseleave' , function ( ) {
if ( _this . tooltip ) {
_this . hide ( ) ;
}
} ) ;
2018-12-27 18:50:45 +03:00
this . renderer . setStyle ( document . body , 'position' , 'relative' ) ;
this . renderer . setStyle ( this . tooltip , 'position' , 'absolute' ) ;
if ( this . tooltipClass !== null ) {
2019-02-05 18:20:54 +02:00
var classes = this . tooltipClass . split ( ' ' ) ;
for ( var i = 0 ; i < classes . length ; i ++ ) {
this . renderer . addClass ( this . tooltip , classes [ i ] ) ;
}
2018-12-27 18:50:45 +03:00
}
2019-01-17 16:48:37 +02:00
this . renderer . setStyle ( this . tooltip , 'opacity' , '0' ) ;
this . renderer . setStyle ( this . tooltip , '-webkit-transition' , "opacity " + this . delay + "ms" ) ;
this . renderer . setStyle ( this . tooltip , '-moz-transition' , "opacity " + this . delay + "ms" ) ;
this . renderer . setStyle ( this . tooltip , '-o-transition' , "opacity " + this . delay + "ms" ) ;
this . renderer . setStyle ( this . tooltip , 'transition' , "opacity " + this . delay + "ms" ) ;
window . setTimeout ( function ( ) {
_this . renderer . setStyle ( _this . tooltip , 'opacity' , '1' ) ;
} , 0 ) ;
2018-12-27 18:50:45 +03:00
} ;
2019-02-22 16:21:44 +02:00
TooltipDirective . prototype . setPosition = function ( placement ) {
2018-12-27 18:50:45 +03:00
var hostPos = this . el . nativeElement . getBoundingClientRect ( ) ;
2019-02-22 16:21:44 +02:00
this . renderer . addClass ( this . tooltip , 'ng-tooltip-' + placement ) ;
var topExit = hostPos . top - this . tooltip . getBoundingClientRect ( ) . height - parseInt ( getComputedStyle ( this . tooltip ) . marginTop , 10 ) < 0 ;
var bottomExit = window . innerHeight < hostPos . bottom + this . tooltip . getBoundingClientRect ( ) . height + parseInt ( getComputedStyle ( this . tooltip ) . marginTop , 10 ) ;
switch ( placement ) {
case 'top' :
if ( topExit ) {
this . renderer . removeClass ( this . tooltip , 'ng-tooltip-' + placement ) ;
this . setPosition ( 'bottom' ) ;
return ;
}
else {
this . renderer . setStyle ( this . tooltip , 'left' , hostPos . left + ( hostPos . right - hostPos . left ) / 2 - this . tooltip . getBoundingClientRect ( ) . width / 2 + 'px' ) ;
this . renderer . setStyle ( this . tooltip , 'top' , hostPos . top - this . tooltip . getBoundingClientRect ( ) . height + 'px' ) ;
this . checkSides ( ) ;
}
break ;
case 'top-left' :
if ( topExit ) {
this . renderer . removeClass ( this . tooltip , 'ng-tooltip-' + placement ) ;
this . setPosition ( 'bottom-left' ) ;
return ;
}
else {
this . renderer . setStyle ( this . tooltip , 'left' , hostPos . left + 'px' ) ;
this . renderer . setStyle ( this . tooltip , 'top' , hostPos . top - this . tooltip . getBoundingClientRect ( ) . height + 'px' ) ;
this . checkSides ( ) ;
}
break ;
case 'top-right' :
if ( topExit ) {
this . renderer . removeClass ( this . tooltip , 'ng-tooltip-' + placement ) ;
this . setPosition ( 'bottom-right' ) ;
return ;
}
else {
this . renderer . setStyle ( this . tooltip , 'left' , hostPos . right - this . tooltip . offsetWidth + 'px' ) ;
this . renderer . setStyle ( this . tooltip , 'top' , hostPos . top - this . tooltip . getBoundingClientRect ( ) . height + 'px' ) ;
this . checkSides ( ) ;
}
break ;
case 'bottom' :
if ( bottomExit ) {
this . renderer . removeClass ( this . tooltip , 'ng-tooltip-' + placement ) ;
this . setPosition ( 'top' ) ;
return ;
}
else {
this . renderer . setStyle ( this . tooltip , 'top' , hostPos . bottom + 'px' ) ;
this . renderer . setStyle ( this . tooltip , 'left' , hostPos . left + ( hostPos . right - hostPos . left ) / 2 - this . tooltip . getBoundingClientRect ( ) . width / 2 + 'px' ) ;
this . checkSides ( ) ;
}
break ;
case 'bottom-left' :
if ( bottomExit ) {
this . renderer . removeClass ( this . tooltip , 'ng-tooltip-' + placement ) ;
this . setPosition ( 'top-left' ) ;
return ;
}
else {
this . renderer . setStyle ( this . tooltip , 'top' , hostPos . bottom + 'px' ) ;
this . renderer . setStyle ( this . tooltip , 'left' , hostPos . left + 'px' ) ;
this . checkSides ( ) ;
}
break ;
case 'bottom-right' :
if ( bottomExit ) {
this . renderer . removeClass ( this . tooltip , 'ng-tooltip-' + placement ) ;
this . setPosition ( 'top-right' ) ;
return ;
}
else {
this . renderer . setStyle ( this . tooltip , 'top' , hostPos . bottom + 'px' ) ;
this . renderer . setStyle ( this . tooltip , 'left' , hostPos . right - this . tooltip . offsetWidth + 'px' ) ;
this . checkSides ( ) ;
}
break ;
case 'left' :
this . renderer . setStyle ( this . tooltip , 'top' , hostPos . top + 'px' ) ;
this . renderer . setStyle ( this . tooltip , 'left' , hostPos . left - this . tooltip . getBoundingClientRect ( ) . width + 'px' ) ;
break ;
case 'right' :
this . renderer . setStyle ( this . tooltip , 'top' , hostPos . top + 'px' ) ;
this . renderer . setStyle ( this . tooltip , 'left' , hostPos . right + 'px' ) ;
break ;
2018-12-27 18:50:45 +03:00
}
2019-02-22 16:21:44 +02:00
} ;
TooltipDirective . prototype . checkSides = function ( ) {
if ( this . tooltip . getBoundingClientRect ( ) . left < 0 ) {
this . renderer . setStyle ( this . tooltip , 'left' , 0 ) ;
2018-12-27 18:50:45 +03:00
}
2019-02-22 16:21:44 +02:00
if ( this . tooltip . getBoundingClientRect ( ) . right > window . innerWidth ) {
this . renderer . setStyle ( this . tooltip , 'left' , window . innerWidth - this . tooltip . getBoundingClientRect ( ) . width + 'px' ) ;
2018-12-27 18:50:45 +03:00
}
} ;
2019-02-14 17:28:29 +02:00
TooltipDirective . prototype . ngOnDestroy = function ( ) {
clearTimeout ( this . removeTooltipTimeout ) ;
clearTimeout ( this . removeTooltipTimeoutInner ) ;
if ( this . tooltip ) {
this . renderer . removeChild ( document . body , this . tooltip ) ;
this . tooltip = null ;
}
} ;
2019-01-09 15:25:03 +02:00
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "HostBinding" ] ) ( 'style.cursor' ) ,
_ _metadata ( "design:type" , Object )
] , TooltipDirective . prototype , "cursor" , void 0 ) ;
2018-12-27 18:50:45 +03:00
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( 'tooltip' ) ,
2019-01-17 16:48:37 +02:00
_ _metadata ( "design:type" , Object )
] , TooltipDirective . prototype , "tooltipInner" , void 0 ) ;
2018-12-27 18:50:45 +03:00
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( ) ,
_ _metadata ( "design:type" , String )
] , TooltipDirective . prototype , "placement" , void 0 ) ;
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( ) ,
_ _metadata ( "design:type" , String )
] , TooltipDirective . prototype , "tooltipClass" , void 0 ) ;
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( ) ,
2019-01-17 16:48:37 +02:00
_ _metadata ( "design:type" , Object )
] , TooltipDirective . prototype , "timeout" , void 0 ) ;
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( ) ,
_ _metadata ( "design:type" , Object )
2018-12-27 18:50:45 +03:00
] , TooltipDirective . prototype , "delay" , void 0 ) ;
2019-02-22 11:18:50 +02:00
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( ) ,
_ _metadata ( "design:type" , Object )
] , TooltipDirective . prototype , "showWhenNoOverflow" , void 0 ) ;
2018-12-27 18:50:45 +03:00
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "HostListener" ] ) ( 'mouseenter' ) ,
_ _metadata ( "design:type" , Function ) ,
_ _metadata ( "design:paramtypes" , [ ] ) ,
_ _metadata ( "design:returntype" , void 0 )
] , TooltipDirective . prototype , "onMouseEnter" , null ) ;
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "HostListener" ] ) ( 'mouseleave' ) ,
_ _metadata ( "design:type" , Function ) ,
_ _metadata ( "design:paramtypes" , [ ] ) ,
_ _metadata ( "design:returntype" , void 0 )
] , TooltipDirective . prototype , "onMouseLeave" , null ) ;
TooltipDirective = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Directive" ] ) ( {
2019-01-09 15:25:03 +02:00
selector : '[tooltip]'
2018-12-27 18:50:45 +03:00
} ) ,
2019-02-14 17:28:29 +02:00
_ _metadata ( "design:paramtypes" , [ _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ElementRef" ] , _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Renderer2" ] , _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ActivatedRoute" ] ] )
2018-12-27 18:50:45 +03:00
] , TooltipDirective ) ;
return TooltipDirective ;
} ( ) ) ;
2019-01-21 18:46:48 +02:00
/***/ } ) ,
/***/ "./src/app/_helpers/directives/transaction-details/transaction-details.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / directives / transaction - details / transaction - details . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-02-22 11:18:50 +02:00
module . exports = "<div class=\"table\">\r\n <div class=\"row\">\r\n <span class=\"cell label\" [style.flex-basis]=\"sizes[0] + 'px'\">{{ 'HISTORY.DETAILS.ID' | translate }}</span>\r\n <span class=\"cell key-value\" [style.flex-basis]=\"sizes[1] + 'px'\" (contextmenu)=\"variablesService.onContextMenuOnlyCopy($event, transaction.tx_hash)\" (click)=\"openInBrowser(transaction.tx_hash)\">{{transaction.tx_hash}}</span>\r\n <span class=\"cell label\" [style.flex-basis]=\"sizes[2] + 'px'\">{{ 'HISTORY.DETAILS.SIZE' | translate }}</span>\r\n <span class=\"cell value\" [style.flex-basis]=\"sizes[3] + 'px'\">{{ 'HISTORY.DETAILS.SIZE_VALUE' | translate : {value: transaction.tx_blob_size} }}</span>\r\n </div>\r\n <div class=\"row\">\r\n <span class=\"cell label\" [style.flex-basis]=\"sizes[0] + 'px'\">{{ 'HISTORY.DETAILS.HEIGHT' | translate }}</span>\r\n <span class=\"cell value\" [style.flex-basis]=\"sizes[1] + 'px'\">{{transaction.height}}</span>\r\n <span class=\"cell label\" [style.flex-basis]=\"sizes[2] + 'px'\">{{ 'HISTORY.DETAILS.CONFIRMATION' | translate }}</span>\r\n <span class=\"cell value\" [style.flex-basis]=\"sizes[3] + 'px'\">{{transaction.height === 0 ? 0 : variablesService.height_app - transaction.height}}</span>\r\n </div>\r\n <div class=\"row\">\r\n <span class=\"cell label\" [style.flex-basis]=\"sizes[0] + 'px'\">{{ 'HISTORY.DETAILS.INPUTS' | translate }}</span>\r\n <span class=\"cell value\" [style.flex-basis]=\"sizes[1] + 'px'\" tooltip=\"{{inputs.join('\\n')}}\" placement=\"top\" tooltipClass=\"table-tooltip\" [delay]=\"500\" [showWhenNoOverflow]=\"false\">{{inputs.join(', ')}}</span>\r\n <span class=\"cell label\" [style.flex-basis]=\"sizes[2] + 'px'\">{{ 'HISTORY.DETAILS.OUTPUTS' | translate }}</span>\r\n <span class=\"cell value\" [style.flex-basis]=\"sizes[3] + 'px'\" tooltip=\"{{outputs.join('\\n')}}\" placement=\"top\" tooltipClass=\"table-tooltip\" [delay]=\"500\" [showWhenNoOverflow]=\"false\">{{outputs.join(', ')}}</span>\r\n </div>\r\n <div class=\"row\">\r\n <span class=\"cell label\" [style.flex-basis]=\"sizes[0] + 'px'\">{{ 'HISTORY.DETAILS.COMMENT' | translate }}</span>\r\n <span class=\"cell value\" [style.flex-basis]=\"sizes[1] + sizes[2] + sizes[3] + 'px'\">{{transaction.comment}}</span>\r\n </div>\r\n</div>\r\n"
2019-01-21 18:46:48 +02:00
/***/ } ) ,
/***/ "./src/app/_helpers/directives/transaction-details/transaction-details.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / directives / transaction - details / transaction - details . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ":host {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%; }\n\n.table {\n border-top: 0.2rem solid #ebebeb;\n margin: 0 3rem;\n padding: 0.5rem 0; }\n\n.table .row {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n border-top: none;\n line-height: 3rem;\n margin: 0 -3rem;\n width: 100%;\n height: 3rem; }\n\n.table .row .cell {\n flex-shrink: 0;\n flex-grow: 0;\n padding: 0 1rem;\n overflow: hidden;\n text-overflow: ellipsis; }\n\n.table .row .cell:first-child {\n padding-left: 3rem; }\n\n.table .row .cell:last-child {\n padding-right: 3rem; }\n\n.table .row .cell.key-value {\n cursor: pointer; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvX2hlbHBlcnMvZGlyZWN0aXZlcy90cmFuc2FjdGlvbi1kZXRhaWxzL0Q6XFxQcm9qZWN0c1xcWmFub1xcc3JjXFxndWlcXHF0LWRhZW1vblxcaHRtbF9zb3VyY2Uvc3JjXFxhcHBcXF9oZWxwZXJzXFxkaXJlY3RpdmVzXFx0cmFuc2FjdGlvbi1kZXRhaWxzXFx0cmFuc2FjdGlvbi1kZXRhaWxzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0Usa0JBQWtCO0VBQ2xCLE1BQU07RUFDTixPQUFPO0VBQ1AsV0FBVyxFQUFBOztBQUdiO0VBQ0UsZ0NBQWdDO0VBQ2hDLGNBQWM7RUFDZCxpQkFBaUIsRUFBQTs7QUFIbkI7SUFNSSxhQUFhO0lBQ2IsMkJBQTJCO0lBQzNCLG1CQUFtQjtJQUNuQixnQkFBZ0I7SUFDaEIsaUJBQWlCO0lBQ2pCLGVBQWU7SUFDZixXQUFXO0lBQ1gsWUFBWSxFQUFBOztBQWJoQjtNQWdCTSxjQUFjO01BQ2QsWUFBWTtNQUNaLGVBQWU7TUFDZixnQkFBZ0I7TUFDaEIsdUJBQXVCLEVBQUE7O0FBcEI3QjtRQXVCUSxrQkFBa0IsRUFBQTs7QUF2QjFCO1FBMkJRLG1CQUFtQixFQUFBOztBQTNCM0I7UUErQlEsZUFBZSxFQUFBIiwiZmlsZSI6InNyYy9hcHAvX2hlbHBlcnMvZGlyZWN0aXZlcy90cmFuc2FjdGlvbi1kZXRhaWxzL3RyYW5zYWN0aW9uLWRldGFpbHMuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCB7XHJcbiAgcG9zaXRpb246IGFic29sdXRlO1xyXG4gIHRvcDogMDtcclxuICBsZWZ0OiAwO1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4udGFibGUge1xyXG4gIGJvcmRlci10b3A6IDAuMnJlbSBzb2xpZCAjZWJlYmViO1xyXG4gIG1hcmdpbjogMCAzcmVtO1xyXG4gIHBhZGRpbmc6IDAuNXJlbSAwO1xyXG5cclxuICAucm93IHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XHJcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xyXG4gICAgYm9yZGVyLXRvcDogbm9uZTtcclxuICAgIGxpbmUtaGVpZ2h0OiAzcmVtO1xyXG4gICAgbWFyZ2luOiAwIC0zcmVtO1xyXG4gICAgd2lkdGg6IDEwMCU7XHJcbiAgICBoZWlnaHQ6IDNyZW07XHJcblxyXG4gICAgLmNlbGwge1xyXG4gICAgICBmbGV4LXNocmluazogMDtcclxuICAgICAgZmxleC1ncm93OiAwO1xyXG4gICAgICBwYWRkaW5nOiAwIDFyZW07XHJcbiAgICAgIG92ZXJmbG93OiBoaWRkZW47XHJcbiAgICAgIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzO1xyXG5cclxuICAgICAgJjpmaXJzdC1jaGlsZCB7XHJcbiAgICAgICAgcGFkZGluZy1sZWZ0OiAzcmVtO1xyXG4gICAgICB9XHJcblxyXG4gICAgICAmOmxhc3QtY2hpbGQge1xyXG4gICAgICAgIHBhZGRpbmctcmlnaHQ6IDNyZW07XHJcbiAgICAgIH1cclxuXHJcbiAgICAgICYua2V5LXZhbHVlIHtcclxuICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19 */"
2019-01-21 18:46:48 +02:00
/***/ } ) ,
/***/ "./src/app/_helpers/directives/transaction-details/transaction-details.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / directives / transaction - details / transaction - details . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: TransactionDetailsComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "TransactionDetailsComponent" , function ( ) { return TransactionDetailsComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _models _transaction _model _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../../models/transaction.model */ "./src/app/_helpers/models/transaction.model.ts" ) ;
/* harmony import */ var _services _variables _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ../../services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2019-01-24 12:18:37 +02:00
/* harmony import */ var _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../../services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
2019-01-28 12:31:13 +02:00
/* harmony import */ var _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ../../pipes/int-to-money.pipe */ "./src/app/_helpers/pipes/int-to-money.pipe.ts" ) ;
2019-01-21 18:46:48 +02:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-24 12:18:37 +02:00
2019-01-28 12:31:13 +02:00
2019-01-21 18:46:48 +02:00
var TransactionDetailsComponent = /** @class */ ( function ( ) {
2019-01-28 12:31:13 +02:00
function TransactionDetailsComponent ( variablesService , backendService , intToMoneyPipe ) {
2019-01-21 18:46:48 +02:00
this . variablesService = variablesService ;
2019-01-24 12:18:37 +02:00
this . backendService = backendService ;
2019-01-28 12:31:13 +02:00
this . intToMoneyPipe = intToMoneyPipe ;
this . inputs = [ ] ;
this . outputs = [ ] ;
2019-01-21 18:46:48 +02:00
}
2019-01-28 12:31:13 +02:00
TransactionDetailsComponent . prototype . ngOnInit = function ( ) {
2019-02-20 18:01:18 +02:00
for ( var input in this . transaction . td [ 'spn' ] ) {
if ( this . transaction . td [ 'spn' ] . hasOwnProperty ( input ) ) {
this . inputs . push ( this . intToMoneyPipe . transform ( this . transaction . td [ 'spn' ] [ input ] ) ) ;
2019-01-28 12:31:13 +02:00
}
}
2019-02-20 18:01:18 +02:00
for ( var output in this . transaction . td [ 'rcv' ] ) {
if ( this . transaction . td [ 'rcv' ] . hasOwnProperty ( output ) ) {
this . outputs . push ( this . intToMoneyPipe . transform ( this . transaction . td [ 'rcv' ] [ output ] ) ) ;
2019-01-28 12:31:13 +02:00
}
}
} ;
2019-01-24 12:18:37 +02:00
TransactionDetailsComponent . prototype . openInBrowser = function ( tr ) {
2019-01-31 16:10:02 +02:00
this . backendService . openUrlInBrowser ( 'explorer.zano.org/transaction/' + tr ) ;
2019-01-24 12:18:37 +02:00
} ;
TransactionDetailsComponent . prototype . ngOnDestroy = function ( ) { } ;
2019-01-21 18:46:48 +02:00
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( ) ,
_ _metadata ( "design:type" , _models _transaction _model _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Transaction" ] )
] , TransactionDetailsComponent . prototype , "transaction" , void 0 ) ;
2019-01-22 17:02:50 +02:00
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Input" ] ) ( ) ,
_ _metadata ( "design:type" , Array )
] , TransactionDetailsComponent . prototype , "sizes" , void 0 ) ;
2019-01-21 18:46:48 +02:00
TransactionDetailsComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-transaction-details' ,
template : _ _webpack _require _ _ ( /*! ./transaction-details.component.html */ "./src/app/_helpers/directives/transaction-details/transaction-details.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./transaction-details.component.scss */ "./src/app/_helpers/directives/transaction-details/transaction-details.component.scss" ) ]
} ) ,
2019-01-28 12:31:13 +02:00
_ _metadata ( "design:paramtypes" , [ _services _variables _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "VariablesService" ] , _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "BackendService" ] , _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "IntToMoneyPipe" ] ] )
2019-01-21 18:46:48 +02:00
] , TransactionDetailsComponent ) ;
return TransactionDetailsComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/_helpers/models/transaction.model.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / models / transaction . model . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: Transaction */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "Transaction" , function ( ) { return Transaction ; } ) ;
var Transaction = /** @class */ ( function ( ) {
function Transaction ( ) {
}
return Transaction ;
} ( ) ) ;
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/_helpers/models/wallet.model.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / models / wallet . model . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: Wallet */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "Wallet" , function ( ) { return Wallet ; } ) ;
2019-01-21 18:46:48 +02:00
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! bignumber.js */ "./node_modules/bignumber.js/bignumber.js" ) ;
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( bignumber _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2018-12-27 18:50:45 +03:00
var Wallet = /** @class */ ( function ( ) {
function Wallet ( id , name , pass , path , address , balance , unlocked _balance , mined , tracking ) {
if ( mined === void 0 ) { mined = 0 ; }
if ( tracking === void 0 ) { tracking = '' ; }
2019-01-21 18:46:48 +02:00
this . history = [ ] ;
this . excluded _history = [ ] ;
2018-12-27 18:50:45 +03:00
this . contracts = [ ] ;
2019-01-30 17:49:23 +02:00
this . send _data = {
address : null ,
amount : null ,
comment : null ,
mixin : null ,
fee : null
} ;
2018-12-27 18:50:45 +03:00
this . wallet _id = id ;
this . name = name ;
this . pass = pass ;
this . path = path ;
this . address = address ;
this . balance = balance ;
this . unlocked _balance = unlocked _balance ;
this . mined _total = mined ;
this . tracking _hey = tracking ;
2019-02-07 17:45:24 +02:00
this . alias = { } ;
2018-12-27 18:50:45 +03:00
this . staking = false ;
this . new _messages = 0 ;
this . new _contracts = 0 ;
this . history = [ ] ;
this . excluded _history = [ ] ;
this . progress = 0 ;
this . loaded = false ;
}
Wallet . prototype . getMoneyEquivalent = function ( equivalent ) {
2019-01-19 15:11:40 +02:00
return this . balance . multipliedBy ( equivalent ) . toFixed ( 0 ) ;
2018-12-27 18:50:45 +03:00
} ;
Wallet . prototype . havePass = function ( ) {
return ( this . pass !== '' && this . pass !== null ) ;
} ;
Wallet . prototype . isActive = function ( id ) {
return this . wallet _id === id ;
} ;
Wallet . prototype . prepareHistoryItem = function ( item ) {
if ( item . tx _type === 4 ) {
2019-01-19 15:11:40 +02:00
item . sortFee = item . amount . plus ( item . fee ) . negated ( ) ;
2019-01-21 18:46:48 +02:00
item . sortAmount = new bignumber _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "BigNumber" ] ( 0 ) ;
2018-12-27 18:50:45 +03:00
}
else if ( item . tx _type === 3 ) {
2019-01-21 18:46:48 +02:00
item . sortFee = new bignumber _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "BigNumber" ] ( 0 ) ;
2018-12-27 18:50:45 +03:00
}
else if ( ( item . hasOwnProperty ( 'contract' ) && ( item . contract [ 0 ] . state === 3 || item . contract [ 0 ] . state === 6 || item . contract [ 0 ] . state === 601 ) && ! item . contract [ 0 ] . is _a ) ) {
2019-01-19 15:11:40 +02:00
item . sortFee = item . fee . negated ( ) ;
item . sortAmount = item . amount . negated ( ) ;
2018-12-27 18:50:45 +03:00
}
else {
if ( ! item . is _income ) {
2019-01-19 15:11:40 +02:00
item . sortFee = item . fee . negated ( ) ;
item . sortAmount = item . amount . negated ( ) ;
2018-12-27 18:50:45 +03:00
}
else {
item . sortAmount = item . amount ;
}
}
return item ;
} ;
Wallet . prototype . prepareHistory = function ( items ) {
for ( var i = 0 ; i < items . length ; i ++ ) {
2019-01-21 18:46:48 +02:00
if ( ( items [ i ] . tx _type === 7 && items [ i ] . is _income ) || ( items [ i ] . tx _type === 11 && items [ i ] . is _income ) || ( items [ i ] . amount . eq ( 0 ) && items [ i ] . fee . eq ( 0 ) ) ) {
2018-12-27 18:50:45 +03:00
var exists = false ;
for ( var j = 0 ; j < this . excluded _history . length ; j ++ ) {
if ( this . excluded _history [ j ] . tx _hash === items [ i ] . tx _hash ) {
exists = true ;
if ( this . excluded _history [ j ] . height !== items [ i ] . height ) {
this . excluded _history [ j ] = items [ i ] ;
}
break ;
}
}
if ( ! exists ) {
this . excluded _history . push ( items [ i ] ) ;
}
}
else {
var exists = false ;
for ( var j = 0 ; j < this . history . length ; j ++ ) {
if ( this . history [ j ] . tx _hash === items [ i ] . tx _hash ) {
exists = true ;
if ( this . history [ j ] . height !== items [ i ] . height ) {
this . history [ j ] = this . prepareHistoryItem ( items [ i ] ) ;
}
break ;
}
}
if ( ! exists ) {
if ( this . history . length && items [ i ] . timestamp > this . history [ 0 ] . timestamp ) {
this . history . unshift ( this . prepareHistoryItem ( items [ i ] ) ) ;
}
else {
this . history . push ( this . prepareHistoryItem ( items [ i ] ) ) ;
}
}
}
}
} ;
2019-02-14 17:28:29 +02:00
Wallet . prototype . removeFromHistory = function ( hash ) {
for ( var i = 0 ; i < this . history . length ; i ++ ) {
if ( this . history [ i ] . tx _hash === hash ) {
this . history . splice ( i , 1 ) ;
break ;
}
}
} ;
2018-12-27 18:50:45 +03:00
Wallet . prototype . prepareContractsAfterOpen = function ( items , exp _med _ts , height _app , viewedContracts , notViewedContracts ) {
2019-01-22 14:24:34 +02:00
var wallet = this ;
2018-12-27 18:50:45 +03:00
var _loop _1 = function ( i ) {
var contract = items [ i ] ;
var contractTransactionExist = false ;
2019-01-22 14:24:34 +02:00
if ( wallet && wallet . history ) {
contractTransactionExist = wallet . history . some ( function ( elem ) { return elem . contract && elem . contract . length && elem . contract [ 0 ] . contract _id === contract . contract _id ; } ) ;
2018-12-27 18:50:45 +03:00
}
2019-01-22 14:24:34 +02:00
if ( ! contractTransactionExist && wallet && wallet . excluded _history ) {
contractTransactionExist = wallet . excluded _history . some ( function ( elem ) { return elem . contract && elem . contract . length && elem . contract [ 0 ] . contract _id === contract . contract _id ; } ) ;
2018-12-27 18:50:45 +03:00
}
if ( ! contractTransactionExist ) {
contract . state = 140 ;
}
else if ( contract . state === 1 && contract . expiration _time < exp _med _ts ) {
contract . state = 110 ;
}
else if ( contract . state === 2 && contract . cancel _expiration _time !== 0 && contract . cancel _expiration _time < exp _med _ts && contract . height === 0 ) {
var searchResult1 = viewedContracts . some ( function ( elem ) { return elem . state === 2 && elem . is _a === contract . is _a && elem . contract _id === contract . contract _id ; } ) ;
if ( ! searchResult1 ) {
contract . state = 130 ;
contract . is _new = true ;
}
}
else if ( contract . state === 1 ) {
var searchResult2 = notViewedContracts . find ( function ( elem ) { return elem . state === 110 && elem . is _a === contract . is _a && elem . contract _id === contract . contract _id ; } ) ;
if ( searchResult2 ) {
if ( searchResult2 . time === contract . expiration _time ) {
contract . state = 110 ;
}
else {
for ( var j = 0 ; j < notViewedContracts . length ; j ++ ) {
if ( notViewedContracts [ j ] . contract _id === contract . contract _id && notViewedContracts [ j ] . is _a === contract . is _a ) {
notViewedContracts . splice ( j , 1 ) ;
break ;
}
}
for ( var j = 0 ; j < viewedContracts . length ; j ++ ) {
if ( viewedContracts [ j ] . contract _id === contract . contract _id && viewedContracts [ j ] . is _a === contract . is _a ) {
viewedContracts . splice ( j , 1 ) ;
break ;
}
}
}
}
}
else if ( contract . state === 2 && ( contract . height === 0 || ( height _app - contract . height ) < 10 ) ) {
contract . state = 201 ;
}
else if ( contract . state === 2 ) {
var searchResult3 = viewedContracts . some ( function ( elem ) { return elem . state === 120 && elem . is _a === contract . is _a && elem . contract _id === contract . contract _id ; } ) ;
if ( searchResult3 ) {
contract . state = 120 ;
}
}
else if ( contract . state === 5 ) {
var searchResult4 = notViewedContracts . find ( function ( elem ) { return elem . state === 130 && elem . is _a === contract . is _a && elem . contract _id === contract . contract _id ; } ) ;
if ( searchResult4 ) {
if ( searchResult4 . time === contract . cancel _expiration _time ) {
contract . state = 130 ;
}
else {
for ( var j = 0 ; j < notViewedContracts . length ; j ++ ) {
if ( notViewedContracts [ j ] . contract _id === contract . contract _id && notViewedContracts [ j ] . is _a === contract . is _a ) {
notViewedContracts . splice ( j , 1 ) ;
break ;
}
}
for ( var j = 0 ; j < viewedContracts . length ; j ++ ) {
if ( viewedContracts [ j ] . contract _id === contract . contract _id && viewedContracts [ j ] . is _a === contract . is _a ) {
viewedContracts . splice ( j , 1 ) ;
break ;
}
}
}
}
}
else if ( contract . state === 6 && ( contract . height === 0 || ( height _app - contract . height ) < 10 ) ) {
contract . state = 601 ;
}
var searchResult = viewedContracts . some ( function ( elem ) { return elem . state === contract . state && elem . is _a === contract . is _a && elem . contract _id === contract . contract _id ; } ) ;
contract . is _new = ! searchResult ;
2019-01-19 15:11:40 +02:00
contract [ 'private_detailes' ] . a _pledge = contract [ 'private_detailes' ] . a _pledge . plus ( contract [ 'private_detailes' ] . to _pay ) ;
2019-01-22 14:24:34 +02:00
wallet . contracts . push ( contract ) ;
2018-12-27 18:50:45 +03:00
} ;
for ( var i = 0 ; i < items . length ; i ++ ) {
_loop _1 ( i ) ;
}
this . recountNewContracts ( ) ;
} ;
Wallet . prototype . recountNewContracts = function ( ) {
this . new _contracts = ( this . contracts . filter ( function ( item ) { return item . is _new === true ; } ) ) . length ;
} ;
Wallet . prototype . getContract = function ( id ) {
for ( var i = 0 ; i < this . contracts . length ; i ++ ) {
if ( this . contracts [ i ] . contract _id === id ) {
return this . contracts [ i ] ;
}
}
return null ;
} ;
return Wallet ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/_helpers/pipes/contract-status-messages.pipe.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / pipes / contract - status - messages . pipe . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: ContractStatusMessagesPipe */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "ContractStatusMessagesPipe" , function ( ) { return ContractStatusMessagesPipe ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
2019-01-31 16:10:02 +02:00
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
2019-01-31 16:10:02 +02:00
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2018-12-27 18:50:45 +03:00
var ContractStatusMessagesPipe = /** @class */ ( function ( ) {
2019-01-31 16:10:02 +02:00
function ContractStatusMessagesPipe ( translate ) {
this . translate = translate ;
2018-12-27 18:50:45 +03:00
}
ContractStatusMessagesPipe . prototype . getStateSeller = function ( stateNum ) {
var state = { part1 : '' , part2 : '' } ;
switch ( stateNum ) {
case 1 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.NEW_CONTRACT' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 110 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.IGNORED' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 201 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.ACCEPTED' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.WAIT' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 2 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.BUYER_WAIT' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.PLEDGES_MADE' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 3 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.COMPLETED' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.RECEIVED' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 4 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.NOT_RECEIVED' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.NULLIFIED' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 5 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.PROPOSAL_CANCEL' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 601 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.BEING_CANCELLED' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 6 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.CANCELLED' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.PLEDGES_RETURNED' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 130 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.IGNORED_CANCEL' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 140 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.SELLER.EXPIRED' ) ;
2018-12-27 18:50:45 +03:00
break ;
}
return state . part1 + ' ' + state . part2 ;
} ;
2019-01-31 16:10:02 +02:00
ContractStatusMessagesPipe . prototype . getStateBuyer = function ( stateNum ) {
2018-12-27 18:50:45 +03:00
var state = { part1 : '' , part2 : '' } ;
switch ( stateNum ) {
case 1 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.WAITING' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.PLEDGE_RESERVED' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 110 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.IGNORED' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.PLEDGE_UNBLOCKED' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 201 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.ACCEPTED' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.WAIT' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 2 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.ACCEPTED' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.PLEDGES_MADE' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 120 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.WAITING_SELLER' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.PLEDGES_MADE' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 3 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.COMPLETED' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.RECEIVED' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 4 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.NOT_RECEIVED' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.NULLIFIED' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 5 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.WAITING_CANCEL' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 601 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.BEING_CANCELLED' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 6 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.CANCELLED' ) ;
state . part2 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.PLEDGES_RETURNED' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 130 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.IGNORED_CANCEL' ) ;
2018-12-27 18:50:45 +03:00
break ;
case 140 :
2019-01-31 16:10:02 +02:00
state . part1 = this . translate . instant ( 'CONTRACTS.STATUS_MESSAGES.BUYER.EXPIRED' ) ;
2018-12-27 18:50:45 +03:00
break ;
}
return state . part1 + ' ' + state . part2 ;
} ;
ContractStatusMessagesPipe . prototype . transform = function ( item , args ) {
if ( item . is _a ) {
2019-01-31 16:10:02 +02:00
return this . getStateBuyer ( item . state ) ;
2018-12-27 18:50:45 +03:00
}
else {
return this . getStateSeller ( item . state ) ;
}
} ;
ContractStatusMessagesPipe = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Pipe" ] ) ( {
name : 'contractStatusMessages'
2019-01-31 16:10:02 +02:00
} ) ,
_ _metadata ( "design:paramtypes" , [ _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "TranslateService" ] ] )
2018-12-27 18:50:45 +03:00
] , ContractStatusMessagesPipe ) ;
return ContractStatusMessagesPipe ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/_helpers/pipes/contract-time-left.pipe.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / pipes / contract - time - left . pipe . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: ContractTimeLeftPipe */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "ContractTimeLeftPipe" , function ( ) { return ContractTimeLeftPipe ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var ContractTimeLeftPipe = /** @class */ ( function ( ) {
function ContractTimeLeftPipe ( service , translate ) {
this . service = service ;
this . translate = translate ;
}
ContractTimeLeftPipe . prototype . transform = function ( value , arg ) {
var time = parseInt ( ( ( parseInt ( value , 10 ) - this . service . exp _med _ts ) / 3600 ) . toFixed ( 0 ) , 10 ) ;
var type = arg || 0 ;
if ( time === 0 ) {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_LESS_ONE' ) ;
}
if ( this . service . settings . language === 'en' ) {
if ( type === 0 ) {
if ( time === 1 ) {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_ONE' , { time : time } ) ;
}
else {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_MANY' , { time : time } ) ;
}
}
else if ( type === 1 ) {
if ( time === 1 ) {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_ONE_RESPONSE' , { time : time } ) ;
}
else {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_MANY_RESPONSE' , { time : time } ) ;
}
}
else if ( type === 2 ) {
if ( time === 1 ) {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_ONE_WAITING' , { time : time } ) ;
}
else {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_MANY_WAITING' , { time : time } ) ;
}
}
}
else {
var rest = time % 10 ;
if ( type === 0 ) {
if ( ( ( time > 20 ) && ( rest === 1 ) ) || time === 1 ) {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_ONE' , { time : time } ) ;
}
else if ( ( time > 1 ) && ( time < 5 ) || ( ( time > 20 ) && ( rest === 2 || rest === 3 || rest === 4 ) ) ) {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_MANY' , { time : time } ) ;
}
else {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_MANY_ALT' , { time : time } ) ;
}
}
else if ( type === 1 ) {
if ( ( ( time > 20 ) && ( rest === 1 ) ) || time === 1 ) {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_ONE_RESPONSE' , { time : time } ) ;
}
else if ( ( time > 1 ) && ( time < 5 ) || ( ( time > 20 ) && ( rest === 2 || rest === 3 || rest === 4 ) ) ) {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_MANY_RESPONSE' , { time : time } ) ;
}
else {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_MANY_ALT_RESPONSE' , { time : time } ) ;
}
}
else if ( type === 2 ) {
if ( ( ( time > 20 ) && ( rest === 1 ) ) || time === 1 ) {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_ONE_WAITING' , { time : time } ) ;
}
else if ( ( time > 1 ) && ( time < 5 ) || ( ( time > 20 ) && ( rest === 2 || rest === 3 || rest === 4 ) ) ) {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_MANY_WAITING' , { time : time } ) ;
}
else {
return this . translate . instant ( 'CONTRACTS.TIME_LEFT.REMAINING_MANY_ALT_WAITING' , { time : time } ) ;
}
}
}
return null ;
} ;
ContractTimeLeftPipe = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Pipe" ] ) ( {
name : 'contractTimeLeft'
} ) ,
_ _metadata ( "design:paramtypes" , [ _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "VariablesService" ] , _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "TranslateService" ] ] )
] , ContractTimeLeftPipe ) ;
return ContractTimeLeftPipe ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/_helpers/pipes/history-type-messages.pipe.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / pipes / history - type - messages . pipe . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: HistoryTypeMessagesPipe */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "HistoryTypeMessagesPipe" , function ( ) { return HistoryTypeMessagesPipe ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
2019-01-31 16:10:02 +02:00
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
2019-01-31 16:10:02 +02:00
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2018-12-27 18:50:45 +03:00
var HistoryTypeMessagesPipe = /** @class */ ( function ( ) {
2019-01-31 16:10:02 +02:00
function HistoryTypeMessagesPipe ( translate ) {
this . translate = translate ;
2018-12-27 18:50:45 +03:00
}
HistoryTypeMessagesPipe . prototype . transform = function ( item , args ) {
if ( item . tx _type === 0 ) {
if ( item . remote _addresses && item . remote _addresses [ 0 ] ) {
return item . remote _addresses [ 0 ] ;
}
else {
if ( item . is _income ) {
2019-01-31 16:10:02 +02:00
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.HIDDEN' ) ;
2018-12-27 18:50:45 +03:00
}
else {
2019-01-31 16:10:02 +02:00
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.UNDEFINED' ) ;
2018-12-27 18:50:45 +03:00
}
}
}
else if ( item . tx _type === 6 && item . height === 0 ) {
return 'unknown' ;
}
else if ( item . tx _type === 9 ) {
if ( item . hasOwnProperty ( 'contract' ) && item . contract [ 0 ] . is _a ) {
2019-01-31 16:10:02 +02:00
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.COMPLETE_BUYER' ) ;
2018-12-27 18:50:45 +03:00
}
else {
2019-01-31 16:10:02 +02:00
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.COMPLETE_SELLER' ) ;
2018-12-27 18:50:45 +03:00
}
}
else {
switch ( item . tx _type ) {
// case 0:
2019-01-31 16:10:02 +02:00
// return '';
2018-12-27 18:50:45 +03:00
// case 1:
2019-01-31 16:10:02 +02:00
// return '';
2018-12-27 18:50:45 +03:00
// case 2:
2019-01-31 16:10:02 +02:00
// return '';
2018-12-27 18:50:45 +03:00
// case 3:
2019-01-31 16:10:02 +02:00
// return '';
2019-02-07 17:45:24 +02:00
case 4 :
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.CREATE_ALIAS' ) ;
case 5 :
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.UPDATE_ALIAS' ) ;
2018-12-27 18:50:45 +03:00
case 6 :
2019-01-31 16:10:02 +02:00
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.MINED' ) ;
2018-12-27 18:50:45 +03:00
case 7 :
2019-01-31 16:10:02 +02:00
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.CREATE_CONTRACT' ) ;
2018-12-27 18:50:45 +03:00
case 8 :
2019-01-31 16:10:02 +02:00
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.PLEDGE_CONTRACT' ) ;
2018-12-27 18:50:45 +03:00
// case 9:
2019-01-31 16:10:02 +02:00
// return '';
2018-12-27 18:50:45 +03:00
case 10 :
2019-01-31 16:10:02 +02:00
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.NULLIFY_CONTRACT' ) ;
2018-12-27 18:50:45 +03:00
case 11 :
2019-01-31 16:10:02 +02:00
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.PROPOSAL_CANCEL_CONTRACT' ) ;
2018-12-27 18:50:45 +03:00
case 12 :
2019-01-31 16:10:02 +02:00
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.CANCEL_CONTRACT' ) ;
2018-12-27 18:50:45 +03:00
}
}
2019-01-31 16:10:02 +02:00
return this . translate . instant ( 'HISTORY.TYPE_MESSAGES.UNDEFINED' ) ;
2018-12-27 18:50:45 +03:00
} ;
HistoryTypeMessagesPipe = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Pipe" ] ) ( {
name : 'historyTypeMessages'
2019-01-31 16:10:02 +02:00
} ) ,
_ _metadata ( "design:paramtypes" , [ _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "TranslateService" ] ] )
2018-12-27 18:50:45 +03:00
] , HistoryTypeMessagesPipe ) ;
return HistoryTypeMessagesPipe ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/_helpers/pipes/int-to-money.pipe.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / pipes / int - to - money . pipe . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: IntToMoneyPipe */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "IntToMoneyPipe" , function ( ) { return IntToMoneyPipe ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
2019-01-15 14:17:10 +02:00
/* harmony import */ var _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2019-01-19 15:11:40 +02:00
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! bignumber.js */ "./node_modules/bignumber.js/bignumber.js" ) ;
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( bignumber _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
2019-01-15 14:17:10 +02:00
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2018-12-27 18:50:45 +03:00
2019-01-19 15:11:40 +02:00
2018-12-27 18:50:45 +03:00
var IntToMoneyPipe = /** @class */ ( function ( ) {
2019-01-15 14:17:10 +02:00
function IntToMoneyPipe ( variablesService ) {
this . variablesService = variablesService ;
2018-12-27 18:50:45 +03:00
}
IntToMoneyPipe . prototype . transform = function ( value , args ) {
if ( value === 0 || value === undefined ) {
return '0' ;
}
2019-01-18 15:06:35 +02:00
var maxFraction = this . variablesService . digits ;
if ( args ) {
maxFraction = parseInt ( args , 10 ) ;
}
2019-01-15 14:17:10 +02:00
var power = Math . pow ( 10 , this . variablesService . digits ) ;
2019-01-19 15:11:40 +02:00
var str = ( new bignumber _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "BigNumber" ] ( value ) ) . div ( power ) . toFixed ( maxFraction ) ;
2018-12-27 18:50:45 +03:00
for ( var i = str . length - 1 ; i >= 0 ; i -- ) {
if ( str [ i ] !== '0' ) {
str = str . substr ( 0 , i + 1 ) ;
break ;
}
}
if ( str [ str . length - 1 ] === '.' ) {
str = str . substr ( 0 , str . length - 1 ) ;
}
return str ;
} ;
IntToMoneyPipe = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Pipe" ] ) ( {
name : 'intToMoney'
2019-01-15 14:17:10 +02:00
} ) ,
_ _metadata ( "design:paramtypes" , [ _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "VariablesService" ] ] )
2018-12-27 18:50:45 +03:00
] , IntToMoneyPipe ) ;
return IntToMoneyPipe ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/_helpers/pipes/money-to-int.pipe.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / pipes / money - to - int . pipe . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: MoneyToIntPipe */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "MoneyToIntPipe" , function ( ) { return MoneyToIntPipe ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
2019-01-15 14:17:10 +02:00
/* harmony import */ var _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2019-01-19 15:11:40 +02:00
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! bignumber.js */ "./node_modules/bignumber.js/bignumber.js" ) ;
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( bignumber _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
2019-01-15 14:17:10 +02:00
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2018-12-27 18:50:45 +03:00
2019-01-19 15:11:40 +02:00
2018-12-27 18:50:45 +03:00
var MoneyToIntPipe = /** @class */ ( function ( ) {
2019-01-15 14:17:10 +02:00
function MoneyToIntPipe ( variablesService ) {
this . variablesService = variablesService ;
2018-12-27 18:50:45 +03:00
}
MoneyToIntPipe . prototype . transform = function ( value , args ) {
2019-01-15 14:17:10 +02:00
var CURRENCY _DISPLAY _DECIMAL _POINT = this . variablesService . digits ;
2018-12-27 18:50:45 +03:00
var result ;
if ( value ) {
var am _str = value . toString ( ) . trim ( ) ;
var point _index = am _str . indexOf ( '.' ) ;
var fraction _size = 0 ;
if ( - 1 !== point _index ) {
fraction _size = am _str . length - point _index - 1 ;
while ( CURRENCY _DISPLAY _DECIMAL _POINT < fraction _size && '0' === am _str [ am _str . length - 1 ] ) {
am _str = am _str . slice ( 0 , am _str . length - 1 ) ;
-- fraction _size ;
}
if ( CURRENCY _DISPLAY _DECIMAL _POINT < fraction _size ) {
return undefined ;
}
am _str = am _str . slice ( 0 , point _index ) + am _str . slice ( point _index + 1 , am _str . length ) ;
}
else {
fraction _size = 0 ;
}
if ( ! am _str . length ) {
return undefined ;
}
if ( fraction _size < CURRENCY _DISPLAY _DECIMAL _POINT ) {
for ( var i = 0 ; i !== CURRENCY _DISPLAY _DECIMAL _POINT - fraction _size ; i ++ ) {
am _str = am _str + '0' ;
}
}
2019-01-19 15:11:40 +02:00
result = ( new bignumber _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "BigNumber" ] ( am _str ) ) . integerValue ( ) ;
2018-12-27 18:50:45 +03:00
}
return result ;
} ;
MoneyToIntPipe = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Pipe" ] ) ( {
name : 'moneyToInt'
2019-01-15 14:17:10 +02:00
} ) ,
_ _metadata ( "design:paramtypes" , [ _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "VariablesService" ] ] )
2018-12-27 18:50:45 +03:00
] , MoneyToIntPipe ) ;
return MoneyToIntPipe ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/_helpers/services/backend.service.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / services / backend . service . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: BackendService */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "BackendService" , function ( ) { return BackendService ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var rxjs _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! rxjs */ "./node_modules/rxjs/_esm5/index.js" ) ;
2019-01-09 15:25:03 +02:00
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
/* harmony import */ var _variables _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ./variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
/* harmony import */ var _modal _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ./modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
/* harmony import */ var _pipes _money _to _int _pipe _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ../pipes/money-to-int.pipe */ "./src/app/_helpers/pipes/money-to-int.pipe.ts" ) ;
2019-01-19 15:11:40 +02:00
/* harmony import */ var json _bignumber _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! json-bignumber */ "./node_modules/json-bignumber/src/JSONBigNumber.js" ) ;
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( /*! bignumber.js */ "./node_modules/bignumber.js/bignumber.js" ) ;
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _7 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( bignumber _js _ _WEBPACK _IMPORTED _MODULE _7 _ _ ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-09 15:25:03 +02:00
2019-01-19 15:11:40 +02:00
2018-12-27 18:50:45 +03:00
var BackendService = /** @class */ ( function ( ) {
2019-01-09 15:25:03 +02:00
function BackendService ( translate , variablesService , modalService , moneyToIntPipe ) {
this . translate = translate ;
2018-12-27 18:50:45 +03:00
this . variablesService = variablesService ;
2019-01-09 15:25:03 +02:00
this . modalService = modalService ;
2018-12-27 18:50:45 +03:00
this . moneyToIntPipe = moneyToIntPipe ;
this . backendLoaded = false ;
}
BackendService . prototype . Debug = function ( type , message ) {
switch ( type ) {
case 0 :
console . error ( message ) ;
break ;
case 1 :
console . warn ( message ) ;
break ;
case 2 :
console . log ( message ) ;
break ;
default :
console . log ( message ) ;
break ;
}
} ;
BackendService . prototype . informerRun = function ( error , params , command ) {
var error _translate = '' ;
switch ( error ) {
case 'NOT_ENOUGH_MONEY' :
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.NOT_ENOUGH_MONEY' ;
2018-12-27 18:50:45 +03:00
break ;
case 'CORE_BUSY' :
if ( command !== 'get_all_aliases' ) {
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.CORE_BUSY' ;
2018-12-27 18:50:45 +03:00
}
break ;
case 'OVERFLOW' :
if ( command !== 'get_all_aliases' ) {
error _translate = '' ;
}
break ;
case 'INTERNAL_ERROR:daemon is busy' :
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.DAEMON_BUSY' ;
2018-12-27 18:50:45 +03:00
break ;
case 'INTERNAL_ERROR:not enough money' :
case 'INTERNAL_ERROR:NOT_ENOUGH_MONEY' :
if ( command === 'cancel_offer' ) {
2019-01-09 15:25:03 +02:00
error _translate = this . translate . instant ( 'ERRORS.NO_MONEY_REMOVE_OFFER' , {
2019-01-29 16:46:36 +02:00
'fee' : this . variablesService . default _fee ,
2019-01-28 13:07:43 +02:00
'currency' : this . variablesService . defaultCurrency
2019-01-09 15:25:03 +02:00
} ) ;
2018-12-27 18:50:45 +03:00
}
else {
error _translate = 'INFORMER.NO_MONEY' ;
}
break ;
case 'INTERNAL_ERROR:not enough outputs to mix' :
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.NOT_ENOUGH_OUTPUTS_TO_MIX' ;
2018-12-27 18:50:45 +03:00
break ;
case 'INTERNAL_ERROR:transaction is too big' :
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.TRANSACTION_IS_TO_BIG' ;
2018-12-27 18:50:45 +03:00
break ;
case 'INTERNAL_ERROR:Transfer attempt while daemon offline' :
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.TRANSFER_ATTEMPT' ;
2018-12-27 18:50:45 +03:00
break ;
case 'ACCESS_DENIED' :
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.ACCESS_DENIED' ;
2018-12-27 18:50:45 +03:00
break ;
case 'INTERNAL_ERROR:transaction was rejected by daemon' :
2019-01-09 15:25:03 +02:00
// if (command === 'request_alias_registration') {
// error_translate = 'INFORMER.ALIAS_IN_REGISTER';
// } else {
error _translate = 'ERRORS.TRANSACTION_ERROR' ;
// }
2018-12-27 18:50:45 +03:00
break ;
case 'INTERNAL_ERROR' :
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.TRANSACTION_ERROR' ;
2018-12-27 18:50:45 +03:00
break ;
case 'BAD_ARG' :
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.BAD_ARG' ;
2018-12-27 18:50:45 +03:00
break ;
case 'WALLET_WRONG_ID' :
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.WALLET_WRONG_ID' ;
2018-12-27 18:50:45 +03:00
break ;
case 'WRONG_PASSWORD' :
case 'WRONG_PASSWORD:invalid password' :
params = JSON . parse ( params ) ;
if ( ! params . testEmpty ) {
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.WRONG_PASSWORD' ;
2018-12-27 18:50:45 +03:00
}
break ;
case 'FILE_RESTORED' :
if ( command === 'open_wallet' ) {
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.FILE_RESTORED' ;
2018-12-27 18:50:45 +03:00
}
break ;
case 'FILE_NOT_FOUND' :
if ( command !== 'open_wallet' && command !== 'get_alias_info_by_name' && command !== 'get_alias_info_by_address' ) {
2019-01-09 15:25:03 +02:00
error _translate = this . translate . instant ( 'ERRORS.FILE_NOT_FOUND' ) ;
2018-12-27 18:50:45 +03:00
params = JSON . parse ( params ) ;
if ( params . path ) {
error _translate += ': ' + params . path ;
}
}
break ;
2019-02-05 18:20:54 +02:00
case 'NOT_FOUND' :
if ( command !== 'open_wallet' && command !== 'get_alias_info_by_name' && command !== 'get_alias_info_by_address' ) {
error _translate = this . translate . instant ( 'ERRORS.FILE_NOT_FOUND' ) ;
params = JSON . parse ( params ) ;
if ( params . path ) {
error _translate += ': ' + params . path ;
}
}
break ;
2018-12-27 18:50:45 +03:00
case 'CANCELED' :
case '' :
break ;
case 'FAIL' :
if ( command === 'create_proposal' || command === 'accept_proposal' || command === 'release_contract' || command === 'request_cancel_contract' || command === 'accept_cancel_contract' ) {
error _translate = ' ' ;
}
break ;
case 'ALREADY_EXISTS' :
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.FILE_EXIST' ;
2018-12-27 18:50:45 +03:00
break ;
default :
error _translate = error ;
}
if ( error . indexOf ( 'FAIL:failed to save file' ) > - 1 ) {
2019-01-09 15:25:03 +02:00
error _translate = 'ERRORS.FILE_NOT_SAVED' ;
2018-12-27 18:50:45 +03:00
}
if ( error _translate !== '' ) {
2019-01-09 15:25:03 +02:00
this . modalService . prepareModal ( 'error' , error _translate ) ;
2018-12-27 18:50:45 +03:00
}
} ;
2019-01-19 15:11:40 +02:00
BackendService . prototype . bigNumberParser = function ( key , val ) {
2019-02-05 18:20:54 +02:00
if ( val . constructor . name === 'BigNumber' && [ 'balance' , 'unlocked_balance' , 'amount' , 'fee' , 'b_fee' , 'to_pay' , 'a_pledge' , 'b_pledge' , 'coast' ] . indexOf ( key ) === - 1 ) {
2019-01-19 15:11:40 +02:00
return val . toNumber ( ) ;
}
if ( key === 'rcv' || key === 'spn' ) {
for ( var i = 0 ; i < val . length ; i ++ ) {
val [ i ] = new bignumber _js _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "BigNumber" ] ( val [ i ] ) ;
}
}
return val ;
} ;
2018-12-27 18:50:45 +03:00
BackendService . prototype . commandDebug = function ( command , params , result ) {
this . Debug ( 2 , '----------------- ' + command + ' -----------------' ) ;
var debug = {
_send _params : params ,
_result : result
} ;
this . Debug ( 2 , debug ) ;
try {
2019-01-19 15:11:40 +02:00
this . Debug ( 2 , json _bignumber _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "default" ] . parse ( result , this . bigNumberParser ) ) ;
2018-12-27 18:50:45 +03:00
}
catch ( e ) {
this . Debug ( 2 , { response _data : result , error _code : 'OK' } ) ;
}
} ;
BackendService . prototype . asVal = function ( data ) {
return { v : data } ;
} ;
BackendService . prototype . backendCallback = function ( resultStr , params , callback , command ) {
var Result = resultStr ;
if ( command !== 'get_clipboard' ) {
if ( ! resultStr || resultStr === '' ) {
Result = { } ;
}
else {
try {
2019-01-19 15:11:40 +02:00
Result = json _bignumber _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "default" ] . parse ( resultStr , this . bigNumberParser ) ;
2018-12-27 18:50:45 +03:00
}
catch ( e ) {
Result = { response _data : resultStr , error _code : 'OK' } ;
}
}
}
else {
Result = {
error _code : 'OK' ,
response _data : Result
} ;
}
var Status = ( Result . error _code === 'OK' || Result . error _code === 'TRUE' ) ;
if ( ! Status && Status !== undefined && Result . error _code !== undefined ) {
this . Debug ( 1 , 'API error for command: "' + command + '". Error code: ' + Result . error _code ) ;
}
var data = ( ( typeof Result === 'object' ) && 'response_data' in Result ) ? Result . response _data : Result ;
var res _error _code = false ;
if ( typeof Result === 'object' && 'error_code' in Result && Result . error _code !== 'OK' && Result . error _code !== 'TRUE' && Result . error _code !== 'FALSE' ) {
this . informerRun ( Result . error _code , params , command ) ;
res _error _code = Result . error _code ;
}
// if ( command === 'get_offers_ex' ){
// Service.printLog( "get_offers_ex offers count "+((data.offers)?data.offers.length:0) );
// }
if ( typeof callback === 'function' ) {
callback ( Status , data , res _error _code ) ;
}
else {
return data ;
}
} ;
BackendService . prototype . runCommand = function ( command , params , callback ) {
if ( this . backendObject ) {
var Action = this . backendObject [ command ] ;
if ( ! Action ) {
this . Debug ( 0 , 'Run Command Error! Command "' + command + '" don\'t found in backendObject' ) ;
}
else {
var that _1 = this ;
2019-01-19 15:11:40 +02:00
params = ( typeof params === 'string' ) ? params : json _bignumber _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "default" ] . stringify ( params ) ;
2018-12-27 18:50:45 +03:00
if ( params === undefined || params === '{}' ) {
Action ( function ( resultStr ) {
that _1 . commandDebug ( command , params , resultStr ) ;
return that _1 . backendCallback ( resultStr , params , callback , command ) ;
} ) ;
}
else {
Action ( params , function ( resultStr ) {
that _1 . commandDebug ( command , params , resultStr ) ;
return that _1 . backendCallback ( resultStr , params , callback , command ) ;
} ) ;
}
}
}
} ;
BackendService . prototype . eventSubscribe = function ( command , callback ) {
2019-01-19 15:11:40 +02:00
var _this = this ;
2018-12-27 18:50:45 +03:00
if ( command === 'on_core_event' ) {
this . backendObject [ command ] . connect ( callback ) ;
}
else {
this . backendObject [ command ] . connect ( function ( str ) {
2019-01-19 15:11:40 +02:00
callback ( json _bignumber _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "default" ] . parse ( str , _this . bigNumberParser ) ) ;
2018-12-27 18:50:45 +03:00
} ) ;
}
} ;
BackendService . prototype . initService = function ( ) {
var _this = this ;
return new rxjs _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Observable" ] ( function ( observer ) {
if ( ! _this . backendLoaded ) {
_this . backendLoaded = true ;
var that _2 = _this ;
window . QWebChannel ( window . qt . webChannelTransport , function ( channel ) {
that _2 . backendObject = channel . objects . mediator _object ;
observer . next ( 'ok' ) ;
} ) ;
}
else {
if ( ! _this . backendObject ) {
observer . error ( 'error' ) ;
observer . error ( 'error' ) ;
}
}
} ) ;
} ;
BackendService . prototype . webkitLaunchedScript = function ( ) {
return this . runCommand ( 'webkit_launched_script' ) ;
} ;
BackendService . prototype . quitRequest = function ( ) {
return this . runCommand ( 'on_request_quit' ) ;
} ;
BackendService . prototype . getAppData = function ( callback ) {
this . runCommand ( 'get_app_data' , { } , callback ) ;
} ;
BackendService . prototype . storeAppData = function ( callback ) {
this . runCommand ( 'store_app_data' , this . variablesService . settings , callback ) ;
} ;
BackendService . prototype . getSecureAppData = function ( pass , callback ) {
this . runCommand ( 'get_secure_app_data' , pass , callback ) ;
} ;
BackendService . prototype . storeSecureAppData = function ( callback ) {
var _this = this ;
if ( this . variablesService . appPass === '' ) {
return callback ( false ) ;
}
var wallets = [ ] ;
this . variablesService . wallets . forEach ( function ( wallet ) {
wallets . push ( { name : wallet . name , pass : wallet . pass , path : wallet . path } ) ;
} ) ;
this . backendObject [ 'store_secure_app_data' ] ( JSON . stringify ( wallets ) , this . variablesService . appPass , function ( dataStore ) {
_this . backendCallback ( dataStore , { } , callback , 'store_secure_app_data' ) ;
} ) ;
} ;
BackendService . prototype . haveSecureAppData = function ( callback ) {
this . runCommand ( 'have_secure_app_data' , { } , callback ) ;
} ;
BackendService . prototype . saveFileDialog = function ( caption , fileMask , default _path , callback ) {
var dir = default _path ? default _path : '/' ;
var params = {
caption : caption ,
filemask : fileMask ,
default _dir : dir
} ;
this . runCommand ( 'show_savefile_dialog' , params , callback ) ;
} ;
BackendService . prototype . openFileDialog = function ( caption , fileMask , default _path , callback ) {
var dir = default _path ? default _path : '/' ;
var params = {
caption : caption ,
filemask : fileMask ,
default _dir : dir
} ;
this . runCommand ( 'show_openfile_dialog' , params , callback ) ;
} ;
BackendService . prototype . generateWallet = function ( path , pass , callback ) {
var params = {
path : path ,
pass : pass
} ;
this . runCommand ( 'generate_wallet' , params , callback ) ;
} ;
BackendService . prototype . openWallet = function ( path , pass , testEmpty , callback ) {
var params = {
path : path ,
pass : pass
} ;
params [ 'testEmpty' ] = ! ! ( testEmpty ) ;
this . runCommand ( 'open_wallet' , params , callback ) ;
} ;
BackendService . prototype . closeWallet = function ( wallet _id , callback ) {
2019-03-14 16:26:29 +02:00
this . runCommand ( 'close_wallet' , { wallet _id : + wallet _id } , callback ) ;
2018-12-27 18:50:45 +03:00
} ;
2019-01-22 14:24:34 +02:00
BackendService . prototype . getSmartWalletInfo = function ( wallet _id , callback ) {
2019-01-22 17:02:50 +02:00
this . runCommand ( 'get_smart_wallet_info' , { wallet _id : + wallet _id } , callback ) ;
2018-12-27 18:50:45 +03:00
} ;
BackendService . prototype . runWallet = function ( wallet _id , callback ) {
this . runCommand ( 'run_wallet' , { wallet _id : + wallet _id } , callback ) ;
} ;
BackendService . prototype . isValidRestoreWalletText = function ( text , callback ) {
this . runCommand ( 'is_valid_restore_wallet_text' , text , callback ) ;
} ;
BackendService . prototype . restoreWallet = function ( path , pass , restore _key , callback ) {
var params = {
restore _key : restore _key ,
path : path ,
pass : pass
} ;
this . runCommand ( 'restore_wallet' , params , callback ) ;
} ;
BackendService . prototype . sendMoney = function ( from _wallet _id , to _address , amount , fee , mixin , comment , callback ) {
var params = {
wallet _id : parseInt ( from _wallet _id , 10 ) ,
destinations : [
{
address : to _address ,
amount : amount
}
] ,
mixin _count : ( mixin ) ? parseInt ( mixin , 10 ) : 0 ,
lock _time : 0 ,
fee : this . moneyToIntPipe . transform ( fee ) ,
comment : comment ,
push _payer : true
} ;
this . runCommand ( 'transfer' , params , callback ) ;
} ;
BackendService . prototype . validateAddress = function ( address , callback ) {
this . runCommand ( 'validate_address' , address , callback ) ;
} ;
BackendService . prototype . setClipboard = function ( str , callback ) {
return this . runCommand ( 'set_clipboard' , str , callback ) ;
} ;
BackendService . prototype . getClipboard = function ( callback ) {
return this . runCommand ( 'get_clipboard' , { } , callback ) ;
} ;
BackendService . prototype . createProposal = function ( wallet _id , title , comment , a _addr , b _addr , to _pay , a _pledge , b _pledge , time , payment _id , callback ) {
var params = {
wallet _id : parseInt ( wallet _id , 10 ) ,
details : {
t : title ,
c : comment ,
a _addr : a _addr ,
b _addr : b _addr ,
to _pay : this . moneyToIntPipe . transform ( to _pay ) ,
2019-01-19 15:11:40 +02:00
a _pledge : this . moneyToIntPipe . transform ( ( new bignumber _js _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "BigNumber" ] ( a _pledge ) ) . minus ( to _pay ) . toString ( ) ) ,
2018-12-27 18:50:45 +03:00
b _pledge : this . moneyToIntPipe . transform ( b _pledge )
} ,
payment _id : payment _id ,
expiration _period : parseInt ( time , 10 ) * 60 * 60 ,
2019-01-29 16:46:36 +02:00
fee : this . variablesService . default _fee _big ,
b _fee : this . variablesService . default _fee _big
2018-12-27 18:50:45 +03:00
} ;
this . Debug ( 1 , params ) ;
this . runCommand ( 'create_proposal' , params , callback ) ;
} ;
BackendService . prototype . getContracts = function ( wallet _id , callback ) {
var params = {
wallet _id : parseInt ( wallet _id , 10 )
} ;
this . Debug ( 1 , params ) ;
this . runCommand ( 'get_contracts' , params , callback ) ;
} ;
BackendService . prototype . acceptProposal = function ( wallet _id , contract _id , callback ) {
var params = {
wallet _id : parseInt ( wallet _id , 10 ) ,
contract _id : contract _id
} ;
this . Debug ( 1 , params ) ;
this . runCommand ( 'accept_proposal' , params , callback ) ;
} ;
BackendService . prototype . releaseProposal = function ( wallet _id , contract _id , release _type , callback ) {
var params = {
wallet _id : parseInt ( wallet _id , 10 ) ,
contract _id : contract _id ,
release _type : release _type // "normal" or "burn"
} ;
this . Debug ( 1 , params ) ;
this . runCommand ( 'release_contract' , params , callback ) ;
} ;
BackendService . prototype . requestCancelContract = function ( wallet _id , contract _id , time , callback ) {
var params = {
wallet _id : parseInt ( wallet _id , 10 ) ,
contract _id : contract _id ,
2019-01-29 16:46:36 +02:00
fee : this . variablesService . default _fee _big ,
2018-12-27 18:50:45 +03:00
expiration _period : parseInt ( time , 10 ) * 60 * 60
} ;
this . Debug ( 1 , params ) ;
this . runCommand ( 'request_cancel_contract' , params , callback ) ;
} ;
BackendService . prototype . acceptCancelContract = function ( wallet _id , contract _id , callback ) {
var params = {
wallet _id : parseInt ( wallet _id , 10 ) ,
contract _id : contract _id
} ;
this . Debug ( 1 , params ) ;
this . runCommand ( 'accept_cancel_contract' , params , callback ) ;
} ;
BackendService . prototype . getMiningHistory = function ( wallet _id , callback ) {
this . runCommand ( 'get_mining_history' , { wallet _id : parseInt ( wallet _id , 10 ) } , callback ) ;
} ;
BackendService . prototype . startPosMining = function ( wallet _id , callback ) {
this . runCommand ( 'start_pos_mining' , { wallet _id : parseInt ( wallet _id , 10 ) } , callback ) ;
} ;
BackendService . prototype . stopPosMining = function ( wallet _id , callback ) {
this . runCommand ( 'stop_pos_mining' , { wallet _id : parseInt ( wallet _id , 10 ) } , callback ) ;
} ;
2019-01-09 15:25:03 +02:00
BackendService . prototype . openUrlInBrowser = function ( url , callback ) {
this . runCommand ( 'open_url_in_browser' , url , callback ) ;
} ;
2019-03-04 21:28:10 +02:00
BackendService . prototype . start _backend = function ( node , host , port , callback ) {
var params = {
configure _for _remote _node : node ,
remote _node _host : host ,
remote _node _port : parseInt ( port , 10 )
} ;
this . runCommand ( 'start_backend' , params , callback ) ;
} ;
2019-01-29 16:46:36 +02:00
BackendService . prototype . getDefaultFee = function ( callback ) {
this . runCommand ( 'get_default_fee' , { } , callback ) ;
} ;
BackendService . prototype . setBackendLocalization = function ( stringsArray , title , callback ) {
var params = {
strings : stringsArray ,
language _title : title
} ;
this . runCommand ( 'set_localization_strings' , params , callback ) ;
} ;
2019-02-05 18:20:54 +02:00
BackendService . prototype . registerAlias = function ( wallet _id , alias , address , fee , comment , reward , callback ) {
var params = {
wallet _id : wallet _id ,
alias : {
alias : alias ,
address : address ,
2019-02-07 17:45:24 +02:00
tracking _key : '' ,
2019-02-05 18:20:54 +02:00
comment : comment
} ,
fee : this . moneyToIntPipe . transform ( fee ) ,
reward : this . moneyToIntPipe . transform ( reward )
} ;
this . runCommand ( 'request_alias_registration' , params , callback ) ;
} ;
BackendService . prototype . updateAlias = function ( wallet _id , alias , fee , callback ) {
var params = {
wallet _id : wallet _id ,
alias : {
2019-02-07 17:45:24 +02:00
alias : alias . name . replace ( '@' , '' ) ,
2019-02-05 18:20:54 +02:00
address : alias . address ,
2019-02-07 17:45:24 +02:00
tracking _key : '' ,
2019-02-05 18:20:54 +02:00
comment : alias . comment
} ,
fee : this . moneyToIntPipe . transform ( fee )
} ;
this . runCommand ( 'request_alias_update' , params , callback ) ;
} ;
BackendService . prototype . getAllAliases = function ( callback ) {
this . runCommand ( 'get_all_aliases' , { } , callback ) ;
} ;
BackendService . prototype . getAliasByName = function ( value , callback ) {
return this . runCommand ( 'get_alias_info_by_name' , value , callback ) ;
} ;
BackendService . prototype . getAliasByAddress = function ( value , callback ) {
return this . runCommand ( 'get_alias_info_by_address' , value , callback ) ;
} ;
BackendService . prototype . getAliasCoast = function ( alias , callback ) {
this . runCommand ( 'get_alias_coast' , { v : alias } , callback ) ;
} ;
2019-02-06 17:57:20 +02:00
BackendService . prototype . getWalletAlias = function ( address ) {
var _this = this ;
2019-02-07 17:45:24 +02:00
if ( address != null && this . variablesService . daemon _state === 2 ) {
2019-02-06 17:57:20 +02:00
if ( this . variablesService . aliasesChecked [ address ] == null ) {
this . variablesService . aliasesChecked [ address ] = { } ;
if ( this . variablesService . aliases . length ) {
for ( var i = 0 , length _1 = this . variablesService . aliases . length ; i < length _1 ; i ++ ) {
if ( i in this . variablesService . aliases && this . variablesService . aliases [ i ] [ 'address' ] === address ) {
this . variablesService . aliasesChecked [ address ] [ 'name' ] = this . variablesService . aliases [ i ] . name ;
this . variablesService . aliasesChecked [ address ] [ 'address' ] = this . variablesService . aliases [ i ] . address ;
this . variablesService . aliasesChecked [ address ] [ 'comment' ] = this . variablesService . aliases [ i ] . comment ;
return this . variablesService . aliasesChecked [ address ] ;
}
}
}
this . getAliasByAddress ( address , function ( status , data ) {
if ( status ) {
_this . variablesService . aliasesChecked [ data . address ] [ 'name' ] = '@' + data . alias ;
_this . variablesService . aliasesChecked [ data . address ] [ 'address' ] = data . address ;
_this . variablesService . aliasesChecked [ data . address ] [ 'comment' ] = data . comment ;
}
} ) ;
}
return this . variablesService . aliasesChecked [ address ] ;
}
return { } ;
} ;
2019-02-15 16:28:31 +02:00
BackendService . prototype . getPoolInfo = function ( callback ) {
this . runCommand ( 'get_tx_pool_info' , { } , callback ) ;
} ;
2018-12-27 18:50:45 +03:00
BackendService = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Injectable" ] ) ( ) ,
2019-01-09 15:25:03 +02:00
_ _metadata ( "design:paramtypes" , [ _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "TranslateService" ] , _variables _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "VariablesService" ] , _modal _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "ModalService" ] , _pipes _money _to _int _pipe _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "MoneyToIntPipe" ] ] )
2018-12-27 18:50:45 +03:00
] , BackendService ) ;
return BackendService ;
} ( ) ) ;
/ *
toggleAutoStart : function ( value ) {
return this . runCommand ( 'toggle_autostart' , asVal ( value ) ) ;
} ,
getOptions : function ( callback ) {
return this . runCommand ( 'get_options' , { } , callback ) ;
} ,
isFileExist : function ( path , callback ) {
return this . runCommand ( 'is_file_exist' , path , callback ) ;
} ,
isAutoStartEnabled : function ( callback ) {
this . runCommand ( 'is_autostart_enabled' , { } , function ( status , data ) {
if ( angular . isFunction ( callback ) ) {
callback ( 'error_code' in data && data . error _code !== 'FALSE' )
}
} ) ;
} ,
setLogLevel : function ( level ) {
return this . runCommand ( 'set_log_level' , asVal ( level ) )
} ,
resetWalletPass : function ( wallet _id , pass , callback ) {
this . runCommand ( 'reset_wallet_password' , { wallet _id : wallet _id , pass : pass } , callback ) ;
} ,
getVersion : function ( callback ) {
this . runCommand ( 'get_version' , { } , function ( status , version ) {
callback ( version )
} )
} ,
getOsVersion : function ( callback ) {
this . runCommand ( 'get_os_version' , { } , function ( status , version ) {
callback ( version )
} )
} ,
getLogFile : function ( callback ) {
this . runCommand ( 'get_log_file' , { } , function ( status , version ) {
callback ( version )
} )
} ,
resync _wallet : function ( wallet _id , callback ) {
this . runCommand ( 'resync_wallet' , { wallet _id : wallet _id } , callback ) ;
} ,
storeFile : function ( path , buff , callback ) {
this . backendObject [ 'store_to_file' ] ( path , ( typeof buff === 'string' ? buff : JSON . stringify ( buff ) ) , function ( data ) {
backendCallback ( data , { } , callback , 'store_to_file' ) ;
} ) ;
} ,
getMiningEstimate : function ( amount _coins , time , callback ) {
var params = {
"amount_coins" : $filter ( 'money_to_int' ) ( amount _coins ) ,
"time" : parseInt ( time )
} ;
this . runCommand ( 'get_mining_estimate' , params , callback ) ;
} ,
backupWalletKeys : function ( wallet _id , path , callback ) {
var params = {
"wallet_id" : wallet _id ,
"path" : path
} ;
this . runCommand ( 'backup_wallet_keys' , params , callback ) ;
} ,
setBlockedIcon : function ( enabled , callback ) {
var mode = ( enabled ) ? "blocked" : "normal" ;
Service . runCommand ( 'bool_toggle_icon' , mode , callback ) ;
} ,
getWalletInfo : function ( wallet _id , callback ) {
this . runCommand ( 'get_wallet_info' , { wallet _id : wallet _id } , callback ) ;
} ,
printText : function ( content ) {
return this . runCommand ( 'print_text' , { html _text : content } ) ;
} ,
printLog : function ( msg , log _level ) {
return this . runCommand ( 'print_log' , { msg : msg , log _level : log _level } ) ;
} ,
* /
2019-01-09 15:25:03 +02:00
/***/ } ) ,
/***/ "./src/app/_helpers/services/modal.service.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / services / modal . service . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: ModalService */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "ModalService" , function ( ) { return ModalService ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
/* harmony import */ var _directives _modal _container _modal _container _component _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ../directives/modal-container/modal-container.component */ "./src/app/_helpers/directives/modal-container/modal-container.component.ts" ) ;
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var ModalService = /** @class */ ( function ( ) {
function ModalService ( componentFactoryResolver , appRef , injector , ngZone , translate ) {
this . componentFactoryResolver = componentFactoryResolver ;
this . appRef = appRef ;
this . injector = injector ;
this . ngZone = ngZone ;
this . translate = translate ;
this . components = [ ] ;
}
ModalService . prototype . prepareModal = function ( type , message ) {
var _this = this ;
var length = this . components . push ( this . componentFactoryResolver . resolveComponentFactory ( _directives _modal _container _modal _container _component _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "ModalContainerComponent" ] ) . create ( this . injector ) ) ;
this . components [ length - 1 ] . instance [ 'type' ] = type ;
2019-02-15 16:28:31 +02:00
this . components [ length - 1 ] . instance [ 'message' ] = message . length ? this . translate . instant ( message ) : '' ;
2019-01-09 15:25:03 +02:00
this . components [ length - 1 ] . instance [ 'close' ] . subscribe ( function ( ) {
_this . removeModal ( length - 1 ) ;
} ) ;
this . ngZone . run ( function ( ) {
_this . appendModal ( length - 1 ) ;
} ) ;
} ;
ModalService . prototype . appendModal = function ( index ) {
this . appRef . attachView ( this . components [ index ] . hostView ) ;
var domElem = this . components [ index ] . hostView . rootNodes [ 0 ] ;
document . body . appendChild ( domElem ) ;
} ;
ModalService . prototype . removeModal = function ( index ) {
if ( this . components [ index ] ) {
this . appRef . detachView ( this . components [ index ] . hostView ) ;
this . components [ index ] . destroy ( ) ;
this . components . splice ( index , 1 ) ;
}
else {
var last = this . components . length - 1 ;
this . appRef . detachView ( this . components [ last ] . hostView ) ;
this . components [ last ] . destroy ( ) ;
this . components . splice ( last , 1 ) ;
}
} ;
ModalService = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Injectable" ] ) ( ) ,
_ _metadata ( "design:paramtypes" , [ _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ComponentFactoryResolver" ] ,
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ApplicationRef" ] ,
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Injector" ] ,
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ,
_ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "TranslateService" ] ] )
] , ModalService ) ;
return ModalService ;
} ( ) ) ;
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/_helpers/services/variables.service.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / _helpers / services / variables . service . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: VariablesService */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "VariablesService" , function ( ) { return VariablesService ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var rxjs _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! rxjs */ "./node_modules/rxjs/_esm5/index.js" ) ;
/* harmony import */ var idlejs _dist _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! idlejs/dist */ "./node_modules/idlejs/dist/index.js" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var ngx _contextmenu _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ngx-contextmenu */ "./node_modules/ngx-contextmenu/fesm5/ngx-contextmenu.js" ) ;
2019-01-29 16:46:36 +02:00
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! bignumber.js */ "./node_modules/bignumber.js/bignumber.js" ) ;
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _5 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( bignumber _js _ _WEBPACK _IMPORTED _MODULE _5 _ _ ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-29 16:46:36 +02:00
2018-12-27 18:50:45 +03:00
var VariablesService = /** @class */ ( function ( ) {
function VariablesService ( router , ngZone , contextMenuService ) {
var _this = this ;
this . router = router ;
this . ngZone = ngZone ;
this . contextMenuService = contextMenuService ;
2019-01-15 14:17:10 +02:00
this . digits = 12 ;
2018-12-27 18:50:45 +03:00
this . appPass = '' ;
this . moneyEquivalent = 0 ;
this . defaultTheme = 'dark' ;
this . defaultCurrency = 'ZAN' ;
this . exp _med _ts = 0 ;
this . height _app = 0 ;
2019-01-28 12:31:13 +02:00
this . last _build _available = '' ;
2018-12-27 18:50:45 +03:00
this . daemon _state = 0 ;
this . sync = {
progress _value : 0 ,
progress _value _text : '0'
} ;
2019-01-29 16:46:36 +02:00
this . default _fee = '0.010000000000' ;
this . default _fee _big = new bignumber _js _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "BigNumber" ] ( '10000000000' ) ;
2018-12-27 18:50:45 +03:00
this . settings = {
2019-03-18 17:04:17 +02:00
appLockTime : 15 ,
2018-12-27 18:50:45 +03:00
theme : '' ,
language : 'en' ,
default _path : '/' ,
viewedContracts : [ ] ,
notViewedContracts : [ ]
} ;
this . wallets = [ ] ;
2019-02-06 17:57:20 +02:00
this . aliases = [ ] ;
this . aliasesChecked = { } ;
2019-02-07 15:50:44 +02:00
this . enableAliasSearch = false ;
2018-12-27 18:50:45 +03:00
this . getHeightAppEvent = new rxjs _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "BehaviorSubject" ] ( null ) ;
this . getRefreshStackingEvent = new rxjs _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "BehaviorSubject" ] ( null ) ;
2019-02-07 15:50:44 +02:00
this . getAliasChangedEvent = new rxjs _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "BehaviorSubject" ] ( null ) ;
2018-12-27 18:50:45 +03:00
this . idle = new idlejs _dist _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Idle" ] ( )
. whenNotInteractive ( )
. do ( function ( ) {
_this . ngZone . run ( function ( ) {
_this . idle . stop ( ) ;
_this . appPass = '' ;
_this . router . navigate ( [ '/login' ] , { queryParams : { type : 'auth' } } ) ;
} ) ;
} ) ;
}
VariablesService . prototype . setHeightApp = function ( height ) {
if ( height !== this . height _app ) {
this . height _app = height ;
this . getHeightAppEvent . next ( height ) ;
}
} ;
VariablesService . prototype . setRefreshStacking = function ( wallet _id ) {
this . getHeightAppEvent . next ( wallet _id ) ;
} ;
2019-02-07 15:50:44 +02:00
VariablesService . prototype . changeAliases = function ( ) {
this . getAliasChangedEvent . next ( true ) ;
} ;
2018-12-27 18:50:45 +03:00
VariablesService . prototype . setCurrentWallet = function ( id ) {
var _this = this ;
this . wallets . forEach ( function ( wallet ) {
if ( wallet . wallet _id === id ) {
_this . currentWallet = wallet ;
}
} ) ;
} ;
VariablesService . prototype . getWallet = function ( id ) {
for ( var i = 0 ; i < this . wallets . length ; i ++ ) {
if ( this . wallets [ i ] . wallet _id === id ) {
return this . wallets [ i ] ;
}
}
return null ;
} ;
VariablesService . prototype . startCountdown = function ( ) {
2019-03-18 17:04:17 +02:00
this . idle . within ( this . settings . appLockTime ) . start ( ) ;
2018-12-27 18:50:45 +03:00
} ;
VariablesService . prototype . stopCountdown = function ( ) {
this . idle . stop ( ) ;
} ;
2019-03-18 17:04:17 +02:00
VariablesService . prototype . restartCountdown = function ( ) {
this . idle . within ( this . settings . appLockTime ) . restart ( ) ;
} ;
2018-12-27 18:50:45 +03:00
VariablesService . prototype . onContextMenu = function ( $event ) {
$event . target [ 'contextSelectionStart' ] = $event . target [ 'selectionStart' ] ;
$event . target [ 'contextSelectionEnd' ] = $event . target [ 'selectionEnd' ] ;
if ( $event . target && ( $event . target [ 'nodeName' ] . toUpperCase ( ) === 'TEXTAREA' || $event . target [ 'nodeName' ] . toUpperCase ( ) === 'INPUT' ) && ! $event . target [ 'readOnly' ] ) {
this . contextMenuService . show . next ( {
2019-01-28 13:07:43 +02:00
contextMenu : this . allContextMenu ,
2018-12-27 18:50:45 +03:00
event : $event ,
item : $event . target ,
} ) ;
$event . preventDefault ( ) ;
$event . stopPropagation ( ) ;
}
} ;
2019-01-28 13:07:43 +02:00
VariablesService . prototype . onContextMenuOnlyCopy = function ( $event , copyText ) {
this . contextMenuService . show . next ( {
contextMenu : this . onlyCopyContextMenu ,
event : $event ,
item : copyText
} ) ;
$event . preventDefault ( ) ;
$event . stopPropagation ( ) ;
} ;
2018-12-27 18:50:45 +03:00
VariablesService = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Injectable" ] ) ( {
providedIn : 'root'
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "Router" ] , _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] , ngx _contextmenu _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "ContextMenuService" ] ] )
] , VariablesService ) ;
return VariablesService ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/app-routing.module.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / app - routing . module . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: AppRoutingModule */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "AppRoutingModule" , function ( ) { return AppRoutingModule ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _main _main _component _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ./main/main.component */ "./src/app/main/main.component.ts" ) ;
/* harmony import */ var _login _login _component _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ./login/login.component */ "./src/app/login/login.component.ts" ) ;
/* harmony import */ var _wallet _wallet _component _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ./wallet/wallet.component */ "./src/app/wallet/wallet.component.ts" ) ;
/* harmony import */ var _send _send _component _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ./send/send.component */ "./src/app/send/send.component.ts" ) ;
/* harmony import */ var _receive _receive _component _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! ./receive/receive.component */ "./src/app/receive/receive.component.ts" ) ;
/* harmony import */ var _history _history _component _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( /*! ./history/history.component */ "./src/app/history/history.component.ts" ) ;
/* harmony import */ var _contracts _contracts _component _ _WEBPACK _IMPORTED _MODULE _8 _ _ = _ _webpack _require _ _ ( /*! ./contracts/contracts.component */ "./src/app/contracts/contracts.component.ts" ) ;
/* harmony import */ var _purchase _purchase _component _ _WEBPACK _IMPORTED _MODULE _9 _ _ = _ _webpack _require _ _ ( /*! ./purchase/purchase.component */ "./src/app/purchase/purchase.component.ts" ) ;
/* harmony import */ var _messages _messages _component _ _WEBPACK _IMPORTED _MODULE _10 _ _ = _ _webpack _require _ _ ( /*! ./messages/messages.component */ "./src/app/messages/messages.component.ts" ) ;
/* harmony import */ var _typing _message _typing _message _component _ _WEBPACK _IMPORTED _MODULE _11 _ _ = _ _webpack _require _ _ ( /*! ./typing-message/typing-message.component */ "./src/app/typing-message/typing-message.component.ts" ) ;
/* harmony import */ var _staking _staking _component _ _WEBPACK _IMPORTED _MODULE _12 _ _ = _ _webpack _require _ _ ( /*! ./staking/staking.component */ "./src/app/staking/staking.component.ts" ) ;
/* harmony import */ var _settings _settings _component _ _WEBPACK _IMPORTED _MODULE _13 _ _ = _ _webpack _require _ _ ( /*! ./settings/settings.component */ "./src/app/settings/settings.component.ts" ) ;
/* harmony import */ var _create _wallet _create _wallet _component _ _WEBPACK _IMPORTED _MODULE _14 _ _ = _ _webpack _require _ _ ( /*! ./create-wallet/create-wallet.component */ "./src/app/create-wallet/create-wallet.component.ts" ) ;
/* harmony import */ var _open _wallet _open _wallet _component _ _WEBPACK _IMPORTED _MODULE _15 _ _ = _ _webpack _require _ _ ( /*! ./open-wallet/open-wallet.component */ "./src/app/open-wallet/open-wallet.component.ts" ) ;
/* harmony import */ var _restore _wallet _restore _wallet _component _ _WEBPACK _IMPORTED _MODULE _16 _ _ = _ _webpack _require _ _ ( /*! ./restore-wallet/restore-wallet.component */ "./src/app/restore-wallet/restore-wallet.component.ts" ) ;
/* harmony import */ var _seed _phrase _seed _phrase _component _ _WEBPACK _IMPORTED _MODULE _17 _ _ = _ _webpack _require _ _ ( /*! ./seed-phrase/seed-phrase.component */ "./src/app/seed-phrase/seed-phrase.component.ts" ) ;
/* harmony import */ var _wallet _details _wallet _details _component _ _WEBPACK _IMPORTED _MODULE _18 _ _ = _ _webpack _require _ _ ( /*! ./wallet-details/wallet-details.component */ "./src/app/wallet-details/wallet-details.component.ts" ) ;
2019-02-05 18:20:54 +02:00
/* harmony import */ var _assign _alias _assign _alias _component _ _WEBPACK _IMPORTED _MODULE _19 _ _ = _ _webpack _require _ _ ( /*! ./assign-alias/assign-alias.component */ "./src/app/assign-alias/assign-alias.component.ts" ) ;
2019-02-15 16:28:31 +02:00
/* harmony import */ var _edit _alias _edit _alias _component _ _WEBPACK _IMPORTED _MODULE _20 _ _ = _ _webpack _require _ _ ( /*! ./edit-alias/edit-alias.component */ "./src/app/edit-alias/edit-alias.component.ts" ) ;
/* harmony import */ var _transfer _alias _transfer _alias _component _ _WEBPACK _IMPORTED _MODULE _21 _ _ = _ _webpack _require _ _ ( /*! ./transfer-alias/transfer-alias.component */ "./src/app/transfer-alias/transfer-alias.component.ts" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
// Components
2019-02-05 18:20:54 +02:00
2019-02-15 16:28:31 +02:00
2018-12-27 18:50:45 +03:00
var routes = [
{
path : '' ,
component : _main _main _component _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "MainComponent" ]
} ,
{
path : 'main' ,
component : _main _main _component _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "MainComponent" ]
} ,
{
path : 'login' ,
component : _login _login _component _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "LoginComponent" ]
} ,
{
path : 'wallet/:id' ,
component : _wallet _wallet _component _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "WalletComponent" ] ,
children : [
{
path : 'send' ,
component : _send _send _component _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "SendComponent" ]
} ,
{
path : 'receive' ,
component : _receive _receive _component _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "ReceiveComponent" ]
} ,
{
path : 'history' ,
component : _history _history _component _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "HistoryComponent" ]
} ,
{
path : 'contracts' ,
component : _contracts _contracts _component _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "ContractsComponent" ] ,
} ,
{
path : 'purchase' ,
component : _purchase _purchase _component _ _WEBPACK _IMPORTED _MODULE _9 _ _ [ "PurchaseComponent" ]
} ,
{
path : 'purchase/:id' ,
component : _purchase _purchase _component _ _WEBPACK _IMPORTED _MODULE _9 _ _ [ "PurchaseComponent" ]
} ,
{
path : 'messages' ,
component : _messages _messages _component _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "MessagesComponent" ] ,
} ,
{
path : 'messages/:id' ,
component : _typing _message _typing _message _component _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "TypingMessageComponent" ] ,
} ,
{
path : 'staking' ,
component : _staking _staking _component _ _WEBPACK _IMPORTED _MODULE _12 _ _ [ "StakingComponent" ]
} ,
{
path : '' ,
2019-01-09 15:25:03 +02:00
redirectTo : 'history' ,
2018-12-27 18:50:45 +03:00
pathMatch : 'full'
}
]
} ,
{
path : 'create' ,
component : _create _wallet _create _wallet _component _ _WEBPACK _IMPORTED _MODULE _14 _ _ [ "CreateWalletComponent" ]
} ,
{
path : 'open' ,
component : _open _wallet _open _wallet _component _ _WEBPACK _IMPORTED _MODULE _15 _ _ [ "OpenWalletComponent" ]
} ,
{
path : 'restore' ,
component : _restore _wallet _restore _wallet _component _ _WEBPACK _IMPORTED _MODULE _16 _ _ [ "RestoreWalletComponent" ]
} ,
{
path : 'seed-phrase' ,
component : _seed _phrase _seed _phrase _component _ _WEBPACK _IMPORTED _MODULE _17 _ _ [ "SeedPhraseComponent" ]
} ,
{
path : 'details' ,
component : _wallet _details _wallet _details _component _ _WEBPACK _IMPORTED _MODULE _18 _ _ [ "WalletDetailsComponent" ]
} ,
2019-02-05 18:20:54 +02:00
{
path : 'assign-alias' ,
component : _assign _alias _assign _alias _component _ _WEBPACK _IMPORTED _MODULE _19 _ _ [ "AssignAliasComponent" ]
} ,
2019-02-15 16:28:31 +02:00
{
path : 'edit-alias' ,
component : _edit _alias _edit _alias _component _ _WEBPACK _IMPORTED _MODULE _20 _ _ [ "EditAliasComponent" ]
} ,
{
path : 'transfer-alias' ,
component : _transfer _alias _transfer _alias _component _ _WEBPACK _IMPORTED _MODULE _21 _ _ [ "TransferAliasComponent" ]
} ,
2018-12-27 18:50:45 +03:00
{
path : 'settings' ,
component : _settings _settings _component _ _WEBPACK _IMPORTED _MODULE _13 _ _ [ "SettingsComponent" ]
} ,
{
path : '' ,
redirectTo : '/' ,
pathMatch : 'full'
}
] ;
var AppRoutingModule = /** @class */ ( function ( ) {
function AppRoutingModule ( ) {
}
AppRoutingModule = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgModule" ] ) ( {
imports : [ _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "RouterModule" ] . forRoot ( routes ) ] ,
exports : [ _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "RouterModule" ] ]
} )
] , AppRoutingModule ) ;
return AppRoutingModule ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/app.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / app . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-01-28 13:07:43 +02:00
module . exports = "<app-sidebar *ngIf=\"variablesService.appPass\"></app-sidebar>\r\n\r\n<div class=\"app-content scrolled-content\">\r\n <router-outlet></router-outlet>\r\n</div>\r\n\r\n\r\n<context-menu #allContextMenu>\r\n <ng-template contextMenuItem (execute)=\"contextMenuCopy($event.item)\">{{ 'CONTEXT_MENU.COPY' | translate }}</ng-template>\r\n <ng-template contextMenuItem (execute)=\"contextMenuPaste($event.item)\">{{ 'CONTEXT_MENU.PASTE' | translate }}</ng-template>\r\n <ng-template contextMenuItem (execute)=\"contextMenuSelect($event.item)\">{{ 'CONTEXT_MENU.SELECT' | translate }}</ng-template>\r\n</context-menu>\r\n\r\n<context-menu #onlyCopyContextMenu>\r\n <ng-template contextMenuItem (execute)=\"contextMenuOnlyCopy($event.item)\">{{ 'CONTEXT_MENU.COPY' | translate }}</ng-template>\r\n</context-menu>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/app.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / app . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = " /*\r\n* Implementation of themes\r\n*/ \ n . app - content { \ n display : flex ; \ n overflow - x : overlay ; \ n overflow - y : hidden ; \ n width : 100 % ; } \ n \ r \ n / * # sourceMappingURL = data : application / json ; base64 , eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFzc2V0c1xcc2Nzc1xcYmFzZVxcX21peGlucy5zY3NzIiwic3JjL2FwcC9hcHAuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL0Q6XFxQcm9qZWN0c1xcWmFub1xcc3JjXFxndWlcXHF0LWRhZW1vblxcaHRtbF9zb3VyY2Uvc3JjXFxhcHBcXGFwcC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4RUE7O0NDNUVDO0FDQUQ7RUFDRSxhQUFhO0VBQ2IsbUJBQW1CO0VBQ25CLGtCQUFrQjtFQUNsQixXQUFXLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9hcHAuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyJAbWl4aW4gdGV4dC10cnVuY2F0ZSB7XHJcbiAgb3ZlcmZsb3c6IGhpZGRlbjtcclxuICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcclxuICB3aGl0ZS1zcGFjZTogbm93cmFwO1xyXG59XHJcbkBtaXhpbiB0ZXh0V3JhcCB7XHJcbiAgd2hpdGUtc3BhY2U6IG5vcm1hbDtcclxuICBvdmVyZmxvdy13cmFwOiBicmVhay13b3JkO1xyXG4gIHdvcmQtd3JhcDogYnJlYWstd29yZDtcclxuICB3b3JkLWJyZWFrOiBicmVhay1hbGw7XHJcbiAgbGluZS1icmVhazogc3RyaWN0O1xyXG4gIC13ZWJraXQtaHlwaGVuczogYXV0bztcclxuICAtbXMtaHlwaGVuczogYXV0bztcclxuICBoeXBoZW5zOiBhdXRvO1xyXG59XHJcbkBtaXhpbiBjb3ZlckJveCB7XHJcblx0cG9zaXRpb246IGFic29sdXRlO1xyXG5cdHRvcDogMDtcclxuXHRsZWZ0OiAwO1xyXG5cdHdpZHRoOiAxMDAlO1xyXG5cdGhlaWdodDogMTAwJTtcclxufVxyXG5AbWl4aW4gYWJzICgkdG9wOiBhdXRvLCAkcmlnaHQ6IGF1dG8sICRib3R0b206IGF1dG8sICRsZWZ0OiBhdXRvKSB7XHJcbiAgdG9wOiAkdG9wO1xyXG4gIHJpZ2h0OiAkcmlnaHQ7XHJcbiAgYm90dG9tOiAkYm90dG9tO1xyXG4gIGxlZnQ6ICRsZWZ0O1xyXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxufVxyXG5AbWl4aW4gY292ZXJJbWcge1xyXG5cdGJhY2tncm91bmQtcmVwZWF0OiBuby1yZXBlYXQ7XHJcblx0LXdlYmtpdC1iYWNrZ3JvdW5kLXNpemU6IGNvdmVyO1xyXG5cdC1vLWJhY2tncm91bmQtc2l6ZTogY292ZXI7XHJcblx0YmFja2dyb3VuZC1zaXplOiBjb3ZlcjtcclxuXHRiYWNrZ3JvdW5kLXBvc2l0aW9uOiA1MCUgNTAlO1xyXG59XHJcbkBtaXhpbiB2YWxpbmdCb3gge1xyXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuXHR0b3A6ICA1MCU7XHJcblx0bGVmdDogNTAlO1xyXG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUsIC01MCUpO1xyXG59XHJcbkBtaXhpbiB1blNlbGVjdCB7XHJcblx0LXdlYmtpdC10b3VjaC1jb2xsb3V0OiBub25lO1xyXG4gIC13ZWJraXQtdXNlci1zZWxlY3Q6IG5vbmU7XHJcbiAgLWtodG1sLXVzZXItc2VsZWN0OiBub25lO1xyXG4gIC1tb3otdXNlci1zZWxlY3Q6IG5vbmU7XHJcbiAgLW1zLXVzZXItc2VsZWN0OiBub25lO1xyXG4gIHVzZXItc2VsZWN0OiBub25lO1xyXG59XHJcbkBtaXhpbiBtYXgxMTk5IHsgLy8gbWFrZXQgMTE3MVxyXG4gIEBtZWRpYSAobWF4LXdpZHRoOiAxMTk5cHgpIHsgQGNvbnRlbnQ7IH1cclxufVxyXG5AbWl4aW4gbWF4MTE3MCB7IC8vIG1ha2V0cyA5OTJcclxuICBAbWVkaWEgKG1heC13aWR0aDogMTE3MHB4KSB7IEBjb250ZW50OyB9XHJcbn1cclxuQG1peGluIG1heDk5MSB7IC8vIG1ha2V0cyA3NjJcclxuICBAbWVkaWEgKG1heC13aWR0aDogOTkxcHgpIHsgQGNvbnRlbnQ7IH1cclxufVxyXG5AbWl4aW4gbWF4NzYxIHsgLy8gbWFrZXRzIDU3NlxyXG4gIEBtZWRpYSAobWF4LXdpZHRoOiA3NjFweCkgeyBAY29udGVudDsgfVxyXG59XHJcbkBtaXhpbiBtYXg1NzUgeyAvLyBtYWtldHMgNDAwXHJcbiAgQG1lZGlhIChtYXgtd2lkdGg6IDU3NXB4KSB7IEBjb250ZW50OyB9XHJcbn1cclxuQG1peGluIG1vYmlsZSB7XHJcbiAgQG1lZGlhIChtYXgtd2lkdGg6IDM5OXB4KSB7IEBjb250ZW50OyB9XHJcbn1cclxuQG1peGluIGljb0NlbnRlciB7XHJcbiAgICBiYWNrZ3JvdW5kLXJlcGVhdDogbm8tcmVwZWF0O1xyXG4gICAgYmFja2dyb3VuZC1wb3NpdGlvbjogY2VudGVyIGNlbnRlcjtcclxufVxyXG5AbWl4aW4gcHNldWRvICgkZGlzcGxheTogYmxvY2ssICRwb3M6IGFic29sdXRlLCAkY29udGVudDogJycpe1xyXG4gIGNvbnRlbnQ6ICRjb250ZW50O1xyXG4gIGRpc3BsYXk6ICRkaXNwbGF5O1xyXG4gIHBvc2l0aW9uOiAkcG9zO1xyXG59XHJcblxyXG4vKlxyXG4qIEltcGxlbWVudGF0aW9uIG9mIHRoZW1lc1xyXG4qL1xyXG5AbWl4aW4gdGhlbWlmeSgkdGhlbWVzOiAkdGhlbWVzKSB7XHJcbiAgQGVhY2ggJHRoZW1lLCAkbWFwIGluICR0aGVtZXMge1xyXG4gICAgLnRoZW1lLSN7JHRoZW1lfSAmIHtcclxuICAgICAgJHRoZW1lLW1hcDogKCkgIWdsb2JhbDtcclxuICAgICAgQGVhY2ggJGtleSwgJHN1Ym1hcCBpbiAkbWFwIHtcclxuICAgICAgICAkdmFsdWU6IG1hcC1nZXQobWFwLWdldCgkdGhlbWVzLCAkdGhlbWUpLCAnI3ska2V5fScpO1xyXG4gICAgICAgICR0aGVtZS1tYXA6IG1hcC1tZXJnZSgkdGhlbWUtbWFwLCAoJGtleTogJHZhbHVlKSkgIWdsb2JhbDtcclxuICAgICAgfVxyXG4gICAgICBAY29udGVudDtcclxuICAgICAgJHRoZW1lLW1hcDogbnVsbCAhZ2xvYmFsO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG5cclxuQGZ1bmN0aW9uIHRoZW1lZCgka2V5KSB7XHJcbiAgQHJldHVybiBtYXAtZ2V0KCR0aGVtZS1tYXAsICRrZXkpO1xyXG59XHJcbiIsIi8qXHJcbiogSW1wbGVtZW50YXRpb24gb2YgdGhlbWVzXHJcbiovXG4uYXBwLWNvbnRlbnQge1xuICBkaXNwbGF5OiBmbGV4O1xuICBvdmVyZmxvdy14OiBvdmVybGF5O1xuICBv
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/app.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / app . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: AppComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "AppComponent" , function ( ) { return AppComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _common _http _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js" ) ;
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2019-01-28 13:07:43 +02:00
/* harmony import */ var ngx _contextmenu _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! ngx-contextmenu */ "./node_modules/ngx-contextmenu/fesm5/ngx-contextmenu.js" ) ;
2019-01-29 16:46:36 +02:00
/* harmony import */ var _helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/pipes/int-to-money.pipe */ "./src/app/_helpers/pipes/int-to-money.pipe.ts" ) ;
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ = _ _webpack _require _ _ ( /*! bignumber.js */ "./node_modules/bignumber.js/bignumber.js" ) ;
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( bignumber _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ ) ;
2019-02-14 17:28:29 +02:00
/* harmony import */ var _helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _9 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/services/modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-28 13:07:43 +02:00
2019-01-29 16:46:36 +02:00
2019-02-14 17:28:29 +02:00
2018-12-27 18:50:45 +03:00
var AppComponent = /** @class */ ( function ( ) {
2019-02-14 17:28:29 +02:00
function AppComponent ( http , renderer , translate , backend , router , variablesService , ngZone , intToMoneyPipe , modalService ) {
2018-12-27 18:50:45 +03:00
this . http = http ;
this . renderer = renderer ;
this . translate = translate ;
this . backend = backend ;
this . router = router ;
this . variablesService = variablesService ;
this . ngZone = ngZone ;
2019-01-29 16:46:36 +02:00
this . intToMoneyPipe = intToMoneyPipe ;
2019-02-14 17:28:29 +02:00
this . modalService = modalService ;
2018-12-27 18:50:45 +03:00
this . onQuitRequest = false ;
2019-01-29 16:46:36 +02:00
this . firstOnlineState = false ;
2018-12-27 18:50:45 +03:00
translate . addLangs ( [ 'en' , 'fr' ] ) ;
translate . setDefaultLang ( 'en' ) ;
// const browserLang = translate.getBrowserLang();
// translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
}
2019-01-29 16:46:36 +02:00
AppComponent . prototype . setBackendLocalization = function ( ) {
var stringsArray = [
this . translate . instant ( 'BACKEND_LOCALIZATION.QUIT' ) ,
this . translate . instant ( 'BACKEND_LOCALIZATION.IS_RECEIVED' ) ,
this . translate . instant ( 'BACKEND_LOCALIZATION.IS_CONFIRMED' ) ,
this . translate . instant ( 'BACKEND_LOCALIZATION.INCOME_TRANSFER_UNCONFIRMED' ) ,
this . translate . instant ( 'BACKEND_LOCALIZATION.INCOME_TRANSFER_CONFIRMED' ) ,
this . translate . instant ( 'BACKEND_LOCALIZATION.MINED' ) ,
this . translate . instant ( 'BACKEND_LOCALIZATION.LOCKED' ) ,
this . translate . instant ( 'BACKEND_LOCALIZATION.IS_MINIMIZE' ) ,
this . translate . instant ( 'BACKEND_LOCALIZATION.RESTORE' ) ,
this . translate . instant ( 'BACKEND_LOCALIZATION.TRAY_MENU_SHOW' ) ,
this . translate . instant ( 'BACKEND_LOCALIZATION.TRAY_MENU_MINIMIZE' )
] ;
this . backend . setBackendLocalization ( stringsArray , 'en' ) ;
} ;
2018-12-27 18:50:45 +03:00
AppComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
2019-01-28 13:07:43 +02:00
this . variablesService . allContextMenu = this . allContextMenu ;
this . variablesService . onlyCopyContextMenu = this . onlyCopyContextMenu ;
2018-12-27 18:50:45 +03:00
this . backend . initService ( ) . subscribe ( function ( initMessage ) {
console . log ( 'Init message: ' , initMessage ) ;
_this . backend . webkitLaunchedScript ( ) ;
2019-03-04 21:28:10 +02:00
_this . backend . start _backend ( false , '127.0.0.1' , 11512 , function ( st2 , dd2 ) {
console . log ( st2 , dd2 ) ;
} ) ;
2018-12-27 18:50:45 +03:00
_this . backend . eventSubscribe ( 'quit_requested' , function ( ) {
if ( ! _this . onQuitRequest ) {
2019-01-19 15:11:40 +02:00
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/' ] ) ;
} ) ;
2018-12-27 18:50:45 +03:00
_this . backend . storeSecureAppData ( function ( ) {
_this . backend . storeAppData ( function ( ) {
var recursionCloseWallets = function ( ) {
if ( _this . variablesService . wallets . length ) {
var lastIndex _1 = _this . variablesService . wallets . length - 1 ;
_this . backend . closeWallet ( _this . variablesService . wallets [ lastIndex _1 ] . wallet _id , function ( ) {
_this . variablesService . wallets . splice ( lastIndex _1 , 1 ) ;
recursionCloseWallets ( ) ;
} ) ;
}
else {
_this . backend . quitRequest ( ) ;
}
} ;
recursionCloseWallets ( ) ;
} ) ;
} ) ;
}
_this . onQuitRequest = true ;
} ) ;
_this . backend . eventSubscribe ( 'update_wallet_status' , function ( data ) {
console . log ( '----------------- update_wallet_status -----------------' ) ;
console . log ( data ) ;
var wallet _state = data . wallet _state ;
var is _mining = data . is _mining ;
var wallet = _this . variablesService . getWallet ( data . wallet _id ) ;
// 1-synch, 2-ready, 3 - error
if ( wallet ) {
_this . ngZone . run ( function ( ) {
wallet . loaded = false ;
wallet . staking = is _mining ;
if ( wallet _state === 2 ) { // ready
wallet . loaded = true ;
}
if ( wallet _state === 3 ) { // error
2019-01-22 14:24:34 +02:00
// wallet.error = true;
2018-12-27 18:50:45 +03:00
}
wallet . balance = data . balance ;
wallet . unlocked _balance = data . unlocked _balance ;
wallet . mined _total = data . minied _total ;
2019-02-20 17:25:26 +02:00
wallet . alias _available = data . is _alias _operations _available ;
2018-12-27 18:50:45 +03:00
} ) ;
}
} ) ;
_this . backend . eventSubscribe ( 'wallet_sync_progress' , function ( data ) {
console . log ( '----------------- wallet_sync_progress -----------------' ) ;
console . log ( data ) ;
var wallet = _this . variablesService . getWallet ( data . wallet _id ) ;
if ( wallet ) {
_this . ngZone . run ( function ( ) {
wallet . progress = data . progress ;
if ( wallet . progress === 0 ) {
wallet . loaded = false ;
}
else if ( wallet . progress === 100 ) {
wallet . loaded = true ;
}
} ) ;
}
} ) ;
_this . backend . eventSubscribe ( 'update_daemon_state' , function ( data ) {
console . log ( '----------------- update_daemon_state -----------------' ) ;
console . log ( 'DAEMON:' + data . daemon _network _state ) ;
console . log ( data ) ;
_this . variablesService . exp _med _ts = data [ 'expiration_median_timestamp' ] + 600 + 1 ;
2019-01-28 12:31:13 +02:00
_this . variablesService . last _build _available = data . last _build _available ;
2018-12-27 18:50:45 +03:00
_this . variablesService . setHeightApp ( data . height ) ;
_this . ngZone . run ( function ( ) {
2019-02-06 17:57:20 +02:00
_this . variablesService . daemon _state = data [ 'daemon_network_state' ] ;
if ( data [ 'daemon_network_state' ] === 1 ) {
var max = data [ 'max_net_seen_height' ] - data [ 'synchronization_start_height' ] ;
var current = data . height - data [ 'synchronization_start_height' ] ;
2018-12-27 18:50:45 +03:00
var return _val = Math . floor ( ( current * 100 / max ) * 100 ) / 100 ;
if ( max === 0 || return _val < 0 ) {
_this . variablesService . sync . progress _value = 0 ;
_this . variablesService . sync . progress _value _text = '0.00' ;
}
else if ( return _val >= 100 ) {
_this . variablesService . sync . progress _value = 100 ;
_this . variablesService . sync . progress _value _text = '99.99' ;
}
else {
_this . variablesService . sync . progress _value = return _val ;
_this . variablesService . sync . progress _value _text = return _val . toFixed ( 2 ) ;
}
}
} ) ;
2019-02-06 17:57:20 +02:00
if ( ! _this . firstOnlineState && data [ 'daemon_network_state' ] === 2 ) {
_this . getAliases ( ) ;
2019-01-29 16:46:36 +02:00
_this . backend . getDefaultFee ( function ( status _fee , data _fee ) {
_this . variablesService . default _fee _big = new bignumber _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "BigNumber" ] ( data _fee ) ;
_this . variablesService . default _fee = _this . intToMoneyPipe . transform ( data _fee ) ;
} ) ;
_this . firstOnlineState = true ;
}
2018-12-27 18:50:45 +03:00
} ) ;
_this . backend . eventSubscribe ( 'money_transfer' , function ( data ) {
console . log ( '----------------- money_transfer -----------------' ) ;
console . log ( data ) ;
if ( ! data . ti ) {
return ;
}
var wallet _id = data . wallet _id ;
var tr _info = data . ti ;
2019-01-22 14:24:34 +02:00
var wallet = _this . variablesService . getWallet ( wallet _id ) ;
if ( wallet ) {
2018-12-27 18:50:45 +03:00
_this . ngZone . run ( function ( ) {
2019-01-22 14:24:34 +02:00
if ( ! wallet . loaded ) {
wallet . balance = data . balance ;
wallet . unlocked _balance = data . unlocked _balance ;
2018-12-27 18:50:45 +03:00
}
else {
2019-01-22 14:24:34 +02:00
wallet . balance = data . balance ;
wallet . unlocked _balance = data . unlocked _balance ;
2018-12-27 18:50:45 +03:00
}
if ( tr _info . tx _type === 6 ) {
_this . variablesService . setRefreshStacking ( wallet _id ) ;
}
2019-01-22 14:24:34 +02:00
var tr _exists = wallet . excluded _history . some ( function ( elem ) { return elem . tx _hash === tr _info . tx _hash ; } ) ;
tr _exists = ( ! tr _exists ) ? wallet . history . some ( function ( elem ) { return elem . tx _hash === tr _info . tx _hash ; } ) : tr _exists ;
wallet . prepareHistory ( [ tr _info ] ) ;
2018-12-27 18:50:45 +03:00
if ( tr _info . hasOwnProperty ( 'contract' ) ) {
var exp _med _ts = _this . variablesService . exp _med _ts ;
var height _app = _this . variablesService . height _app ;
var contract _1 = tr _info . contract [ 0 ] ;
if ( tr _exists ) {
2019-01-22 14:24:34 +02:00
for ( var i = 0 ; i < wallet . contracts . length ; i ++ ) {
if ( wallet . contracts [ i ] . contract _id === contract _1 . contract _id && wallet . contracts [ i ] . is _a === contract _1 . is _a ) {
wallet . contracts [ i ] . cancel _expiration _time = contract _1 . cancel _expiration _time ;
wallet . contracts [ i ] . expiration _time = contract _1 . expiration _time ;
wallet . contracts [ i ] . height = contract _1 . height ;
wallet . contracts [ i ] . timestamp = contract _1 . timestamp ;
2018-12-27 18:50:45 +03:00
break ;
}
}
// $rootScope.getContractsRecount();
return ;
}
if ( contract _1 . state === 1 && contract _1 . expiration _time < exp _med _ts ) {
contract _1 . state = 110 ;
}
else if ( contract _1 . state === 5 && contract _1 . cancel _expiration _time < exp _med _ts ) {
contract _1 . state = 130 ;
}
else if ( contract _1 . state === 1 ) {
var searchResult2 = _this . variablesService . settings . notViewedContracts . find ( function ( elem ) { return elem . state === 110 && elem . is _a === contract _1 . is _a && elem . contract _id === contract _1 . contract _id ; } ) ;
if ( searchResult2 ) {
if ( searchResult2 . time === contract _1 . expiration _time ) {
contract _1 . state = 110 ;
}
else {
for ( var j = 0 ; j < _this . variablesService . settings . notViewedContracts . length ; j ++ ) {
if ( _this . variablesService . settings . notViewedContracts [ j ] . contract _id === contract _1 . contract _id && _this . variablesService . settings . notViewedContracts [ j ] . is _a === contract _1 . is _a ) {
_this . variablesService . settings . notViewedContracts . splice ( j , 1 ) ;
break ;
}
}
for ( var j = 0 ; j < _this . variablesService . settings . viewedContracts . length ; j ++ ) {
if ( _this . variablesService . settings . viewedContracts [ j ] . contract _id === contract _1 . contract _id && _this . variablesService . settings . viewedContracts [ j ] . is _a === contract _1 . is _a ) {
_this . variablesService . settings . viewedContracts . splice ( j , 1 ) ;
break ;
}
}
}
}
}
else if ( contract _1 . state === 2 && ( contract _1 . height === 0 || ( height _app - contract _1 . height ) < 10 ) ) {
contract _1 . state = 201 ;
}
else if ( contract _1 . state === 2 ) {
var searchResult3 = _this . variablesService . settings . viewedContracts . some ( function ( elem ) { return elem . state === 120 && elem . is _a === contract _1 . is _a && elem . contract _id === contract _1 . contract _id ; } ) ;
if ( searchResult3 ) {
contract _1 . state = 120 ;
}
}
else if ( contract _1 . state === 5 ) {
var searchResult4 = _this . variablesService . settings . notViewedContracts . find ( function ( elem ) { return elem . state === 130 && elem . is _a === contract _1 . is _a && elem . contract _id === contract _1 . contract _id ; } ) ;
if ( searchResult4 ) {
if ( searchResult4 . time === contract _1 . cancel _expiration _time ) {
contract _1 . state = 130 ;
}
else {
for ( var j = 0 ; j < _this . variablesService . settings . notViewedContracts . length ; j ++ ) {
if ( _this . variablesService . settings . notViewedContracts [ j ] . contract _id === contract _1 . contract _id && _this . variablesService . settings . notViewedContracts [ j ] . is _a === contract _1 . is _a ) {
_this . variablesService . settings . notViewedContracts . splice ( j , 1 ) ;
break ;
}
}
for ( var j = 0 ; j < _this . variablesService . settings . viewedContracts . length ; j ++ ) {
if ( _this . variablesService . settings . viewedContracts [ j ] . contract _id === contract _1 . contract _id && _this . variablesService . settings . viewedContracts [ j ] . is _a === contract _1 . is _a ) {
_this . variablesService . settings . viewedContracts . splice ( j , 1 ) ;
break ;
}
}
}
}
}
else if ( contract _1 . state === 6 && ( contract _1 . height === 0 || ( height _app - contract _1 . height ) < 10 ) ) {
contract _1 . state = 601 ;
}
var searchResult = _this . variablesService . settings . viewedContracts . some ( function ( elem ) { return elem . state === contract _1 . state && elem . is _a === contract _1 . is _a && elem . contract _id === contract _1 . contract _id ; } ) ;
contract _1 . is _new = ! searchResult ;
2019-01-19 15:11:40 +02:00
contract _1 [ 'private_detailes' ] . a _pledge = contract _1 [ 'private_detailes' ] . a _pledge . plus ( contract _1 [ 'private_detailes' ] . to _pay ) ;
2018-12-27 18:50:45 +03:00
var findContract = false ;
2019-01-22 14:24:34 +02:00
for ( var i = 0 ; i < wallet . contracts . length ; i ++ ) {
if ( wallet . contracts [ i ] . contract _id === contract _1 . contract _id && wallet . contracts [ i ] . is _a === contract _1 . is _a ) {
2018-12-27 18:50:45 +03:00
for ( var prop in contract _1 ) {
if ( contract _1 . hasOwnProperty ( prop ) ) {
2019-01-22 14:24:34 +02:00
wallet . contracts [ i ] [ prop ] = contract _1 [ prop ] ;
2018-12-27 18:50:45 +03:00
}
}
findContract = true ;
break ;
}
}
if ( findContract === false ) {
2019-01-22 14:24:34 +02:00
wallet . contracts . push ( contract _1 ) ;
2018-12-27 18:50:45 +03:00
}
2019-01-22 14:24:34 +02:00
wallet . recountNewContracts ( ) ;
2018-12-27 18:50:45 +03:00
}
} ) ;
}
} ) ;
_this . backend . eventSubscribe ( 'money_transfer_cancel' , function ( data ) {
console . log ( '----------------- money_transfer_cancel -----------------' ) ;
console . log ( data ) ;
2019-02-14 17:28:29 +02:00
if ( ! data . ti ) {
return ;
}
var wallet _id = data . wallet _id ;
var tr _info = data . ti ;
var wallet = _this . variablesService . getWallet ( wallet _id ) ;
if ( wallet ) {
if ( tr _info . hasOwnProperty ( 'contract' ) ) {
for ( var i = 0 ; i < wallet . contracts . length ; i ++ ) {
if ( wallet . contracts [ i ] . contract _id === tr _info . contract [ 0 ] . contract _id && wallet . contracts [ i ] . is _a === tr _info . contract [ 0 ] . is _a ) {
if ( wallet . contracts [ i ] . state === 1 || wallet . contracts [ i ] . state === 110 ) {
wallet . contracts [ i ] . is _new = true ;
wallet . contracts [ i ] . state = 140 ;
wallet . recountNewContracts ( ) ;
}
break ;
}
}
}
wallet . removeFromHistory ( tr _info . tx _hash ) ;
var error _tr = '' ;
switch ( tr _info . tx _type ) {
case 0 :
error _tr = _this . translate . instant ( 'ERRORS.TX_TYPE_NORMAL' ) + '<br>' +
tr _info . tx _hash + '<br>' + wallet . name + '<br>' + wallet . address + '<br>' +
_this . translate . instant ( 'ERRORS.TX_TYPE_NORMAL_TO' ) + ' ' + _this . intToMoneyPipe . transform ( tr _info . amount ) + ' ' +
_this . translate . instant ( 'ERRORS.TX_TYPE_NORMAL_END' ) ;
break ;
case 1 :
// this.translate.instant('ERRORS.TX_TYPE_PUSH_OFFER');
break ;
case 2 :
// this.translate.instant('ERRORS.TX_TYPE_UPDATE_OFFER');
break ;
case 3 :
// this.translate.instant('ERRORS.TX_TYPE_CANCEL_OFFER');
break ;
case 4 :
error _tr = _this . translate . instant ( 'ERRORS.TX_TYPE_NEW_ALIAS' ) + '<br>' +
tr _info . tx _hash + '<br>' + wallet . name + '<br>' + wallet . address + '<br>' +
_this . translate . instant ( 'ERRORS.TX_TYPE_NEW_ALIAS_END' ) ;
break ;
case 5 :
error _tr = _this . translate . instant ( 'ERRORS.TX_TYPE_UPDATE_ALIAS' ) + '<br>' +
tr _info . tx _hash + '<br>' + wallet . name + '<br>' + wallet . address + '<br>' +
_this . translate . instant ( 'ERRORS.TX_TYPE_NEW_ALIAS_END' ) ;
break ;
case 6 :
error _tr = _this . translate . instant ( 'ERRORS.TX_TYPE_COIN_BASE' ) ;
break ;
}
if ( error _tr ) {
_this . modalService . prepareModal ( 'error' , error _tr ) ;
}
}
2018-12-27 18:50:45 +03:00
} ) ;
2019-02-07 15:50:44 +02:00
_this . backend . eventSubscribe ( 'on_core_event' , function ( data ) {
console . log ( '----------------- on_core_event -----------------' ) ;
console . log ( data ) ;
data = JSON . parse ( data ) ;
if ( data . events != null ) {
2019-02-07 17:45:24 +02:00
var _loop _1 = function ( i , length _1 ) {
2019-02-07 15:50:44 +02:00
switch ( data . events [ i ] . method ) {
case 'CORE_EVENT_BLOCK_ADDED' : break ;
case 'CORE_EVENT_ADD_ALIAS' :
if ( _this . variablesService . aliasesChecked [ data . events [ i ] . details . address ] != null ) {
_this . variablesService . aliasesChecked [ data . events [ i ] . details . address ] [ 'name' ] = '@' + data . events [ i ] . details . alias ;
_this . variablesService . aliasesChecked [ data . events [ i ] . details . address ] [ 'address' ] = data . events [ i ] . details . address ;
_this . variablesService . aliasesChecked [ data . events [ i ] . details . address ] [ 'comment' ] = data . events [ i ] . details . comment ;
}
if ( _this . variablesService . enableAliasSearch ) {
var newAlias = {
name : '@' + data . events [ i ] . details . alias ,
address : data . events [ i ] . details . address ,
comment : data . events [ i ] . details . comment
} ;
_this . variablesService . aliases = _this . variablesService . aliases . concat ( newAlias ) ;
2019-02-07 17:45:24 +02:00
// this.variablesService.aliases = this.variablesService.aliases.sort((a, b) => {
// if (a.name.length > b.name.length) return 1;
// if (a.name.length < b.name.length) return -1;
// if (a.name > b.name) return 1;
// if (a.name < b.name) return -1;
// return 0;
// });
2019-02-07 15:50:44 +02:00
_this . variablesService . changeAliases ( ) ;
}
break ;
case 'CORE_EVENT_UPDATE_ALIAS' :
for ( var address in _this . variablesService . aliasesChecked ) {
if ( _this . variablesService . aliasesChecked . hasOwnProperty ( address ) ) {
2019-02-07 17:45:24 +02:00
if ( _this . variablesService . aliasesChecked [ address ] . name === '@' + data . events [ i ] . details . alias ) {
if ( _this . variablesService . aliasesChecked [ address ] . address !== data . events [ i ] . details . details . address ) {
2019-02-07 15:50:44 +02:00
delete _this . variablesService . aliasesChecked [ address ] [ 'name' ] ;
delete _this . variablesService . aliasesChecked [ address ] [ 'address' ] ;
delete _this . variablesService . aliasesChecked [ address ] [ 'comment' ] ;
}
else {
_this . variablesService . aliasesChecked [ address ] . comment = data . events [ i ] . details . details . comment ;
}
break ;
}
}
}
if ( _this . variablesService . aliasesChecked [ data . events [ i ] . details . details . address ] != null ) {
_this . variablesService . aliasesChecked [ data . events [ i ] . details . details . address ] [ 'name' ] = '@' + data . events [ i ] . details . alias ;
_this . variablesService . aliasesChecked [ data . events [ i ] . details . details . address ] [ 'address' ] = data . events [ i ] . details . details . address ;
_this . variablesService . aliasesChecked [ data . events [ i ] . details . details . address ] [ 'comment' ] = data . events [ i ] . details . details . comment ;
}
if ( _this . variablesService . enableAliasSearch ) {
2019-02-07 17:45:24 +02:00
var CurrentAlias = _this . variablesService . aliases . find ( function ( element ) { return element . name === '@' + data . events [ i ] . details . alias ; } ) ;
if ( CurrentAlias ) {
CurrentAlias . address = data . events [ i ] . details . details . address ;
CurrentAlias . comment = data . events [ i ] . details . details . comment ;
2019-02-07 15:50:44 +02:00
}
}
_this . variablesService . changeAliases ( ) ;
break ;
default : break ;
}
2019-02-07 17:45:24 +02:00
} ;
for ( var i = 0 , length _1 = data . events . length ; i < length _1 ; i ++ ) {
_loop _1 ( i , length _1 ) ;
2019-02-07 15:50:44 +02:00
}
}
} ) ;
2018-12-27 18:50:45 +03:00
_this . intervalUpdateContractsState = setInterval ( function ( ) {
_this . variablesService . wallets . forEach ( function ( wallet ) {
wallet . contracts . forEach ( function ( contract ) {
if ( contract . state === 201 && contract . height !== 0 && ( _this . variablesService . height _app - contract . height ) >= 10 ) {
contract . state = 2 ;
contract . is _new = true ;
console . warn ( 'need check state in contracts' ) ;
}
else if ( contract . state === 601 && contract . height !== 0 && ( _this . variablesService . height _app - contract . height ) >= 10 ) {
contract . state = 6 ;
contract . is _new = true ;
}
} ) ;
} ) ;
} , 30000 ) ;
_this . backend . getAppData ( function ( status , data ) {
if ( data && Object . keys ( data ) . length > 0 ) {
2019-01-19 15:11:40 +02:00
for ( var key in data ) {
if ( data . hasOwnProperty ( key ) && _this . variablesService . settings . hasOwnProperty ( key ) ) {
_this . variablesService . settings [ key ] = data [ key ] ;
}
}
2018-12-27 18:50:45 +03:00
if ( _this . variablesService . settings . hasOwnProperty ( 'theme' ) && [ 'dark' , 'white' , 'gray' ] . indexOf ( _this . variablesService . settings . theme ) !== - 1 ) {
_this . renderer . addClass ( document . body , 'theme-' + _this . variablesService . settings . theme ) ;
}
else {
_this . renderer . addClass ( document . body , 'theme-' + _this . variablesService . defaultTheme ) ;
}
}
else {
_this . variablesService . settings . theme = _this . variablesService . defaultTheme ;
_this . renderer . addClass ( document . body , 'theme-' + _this . variablesService . settings . theme ) ;
}
2019-01-29 16:46:36 +02:00
_this . setBackendLocalization ( ) ;
2018-12-27 18:50:45 +03:00
if ( _this . router . url !== '/login' ) {
_this . backend . haveSecureAppData ( function ( statusPass ) {
if ( statusPass ) {
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/login' ] , { queryParams : { type : 'auth' } } ) ;
} ) ;
}
else {
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/login' ] , { queryParams : { type : 'reg' } } ) ;
} ) ;
}
} ) ;
}
} ) ;
} , function ( error ) {
console . log ( error ) ;
} ) ;
this . getMoneyEquivalent ( ) ;
} ;
AppComponent . prototype . getMoneyEquivalent = function ( ) {
var _this = this ;
2019-01-16 12:33:24 +02:00
this . http . get ( 'https://api.coinmarketcap.com/v2/ticker/406' ) . subscribe ( function ( result ) {
2018-12-27 18:50:45 +03:00
if ( result . hasOwnProperty ( 'data' ) ) {
_this . variablesService . moneyEquivalent = result [ 'data' ] [ 'quotes' ] [ 'USD' ] [ 'price' ] ;
}
} , function ( error ) {
2019-01-09 15:25:03 +02:00
setTimeout ( function ( ) {
_this . getMoneyEquivalent ( ) ;
} , 60000 ) ;
2018-12-27 18:50:45 +03:00
console . warn ( 'Error coinmarketcap' , error ) ;
} ) ;
} ;
2019-02-06 17:57:20 +02:00
AppComponent . prototype . getAliases = function ( ) {
var _this = this ;
this . backend . getAllAliases ( function ( status , data , error ) {
2019-02-07 17:45:24 +02:00
if ( error === 'CORE_BUSY' ) {
2019-02-06 17:57:20 +02:00
window . setTimeout ( function ( ) {
_this . getAliases ( ) ;
} , 10000 ) ;
}
2019-02-07 17:45:24 +02:00
else if ( error === 'OVERFLOW' ) {
2019-02-06 17:57:20 +02:00
_this . variablesService . aliases = [ ] ;
2019-02-07 15:50:44 +02:00
_this . variablesService . enableAliasSearch = false ;
2019-02-06 17:57:20 +02:00
}
else {
2019-02-07 15:50:44 +02:00
_this . variablesService . enableAliasSearch = true ;
2019-02-06 17:57:20 +02:00
if ( data . aliases && data . aliases . length ) {
_this . variablesService . aliases = [ ] ;
data . aliases . forEach ( function ( alias ) {
var newAlias = {
name : '@' + alias . alias ,
address : alias . address ,
comment : alias . comment
} ;
_this . variablesService . aliases . push ( newAlias ) ;
} ) ;
_this . variablesService . wallets . forEach ( function ( wallet ) {
wallet . alias = _this . backend . getWalletAlias ( wallet . address ) ;
} ) ;
_this . variablesService . aliases = _this . variablesService . aliases . sort ( function ( a , b ) {
if ( a . name . length > b . name . length )
return 1 ;
if ( a . name . length < b . name . length )
return - 1 ;
if ( a . name > b . name )
return 1 ;
if ( a . name < b . name )
return - 1 ;
return 0 ;
} ) ;
2019-02-07 15:50:44 +02:00
_this . variablesService . changeAliases ( ) ;
2019-02-06 17:57:20 +02:00
}
}
} ) ;
} ;
2018-12-27 18:50:45 +03:00
AppComponent . prototype . contextMenuCopy = function ( target ) {
if ( target && ( target [ 'nodeName' ] . toUpperCase ( ) === 'TEXTAREA' || target [ 'nodeName' ] . toUpperCase ( ) === 'INPUT' ) ) {
var start = ( target [ 'contextSelectionStart' ] ) ? 'contextSelectionStart' : 'selectionStart' ;
var end = ( target [ 'contextSelectionEnd' ] ) ? 'contextSelectionEnd' : 'selectionEnd' ;
var canUseSelection = ( ( target [ start ] ) || ( target [ start ] === '0' ) ) ;
var SelectedText = ( canUseSelection ) ? target [ 'value' ] . substring ( target [ start ] , target [ end ] ) : target [ 'value' ] ;
this . backend . setClipboard ( String ( SelectedText ) ) ;
}
} ;
2019-01-28 13:07:43 +02:00
AppComponent . prototype . contextMenuOnlyCopy = function ( text ) {
if ( text ) {
this . backend . setClipboard ( String ( text ) ) ;
}
} ;
2018-12-27 18:50:45 +03:00
AppComponent . prototype . contextMenuPaste = function ( target ) {
if ( target && ( target [ 'nodeName' ] . toUpperCase ( ) === 'TEXTAREA' || target [ 'nodeName' ] . toUpperCase ( ) === 'INPUT' ) ) {
this . backend . getClipboard ( function ( status , clipboard ) {
clipboard = String ( clipboard ) ;
if ( typeof clipboard !== 'string' || clipboard . length ) {
var start = ( target [ 'contextSelectionStart' ] ) ? 'contextSelectionStart' : 'selectionStart' ;
var end = ( target [ 'contextSelectionEnd' ] ) ? 'contextSelectionEnd' : 'selectionEnd' ;
2019-01-30 17:18:18 +02:00
var _pre = target [ 'value' ] . substring ( 0 , target [ start ] ) ;
var _aft = target [ 'value' ] . substring ( target [ end ] , target [ 'value' ] . length ) ;
var text = _pre + clipboard + _aft ;
var cursorPosition = ( _pre + clipboard ) . length ;
2018-12-27 18:50:45 +03:00
if ( target [ 'maxLength' ] && parseInt ( target [ 'maxLength' ] , 10 ) > 0 ) {
text = text . substr ( 0 , parseInt ( target [ 'maxLength' ] , 10 ) ) ;
}
target [ 'value' ] = text ;
2019-01-30 17:18:18 +02:00
target . setSelectionRange ( cursorPosition , cursorPosition ) ;
2019-01-29 16:46:36 +02:00
target . dispatchEvent ( new Event ( 'input' ) ) ;
2018-12-27 18:50:45 +03:00
target [ 'focus' ] ( ) ;
}
} ) ;
}
} ;
AppComponent . prototype . contextMenuSelect = function ( target ) {
if ( target && ( target [ 'nodeName' ] . toUpperCase ( ) === 'TEXTAREA' || target [ 'nodeName' ] . toUpperCase ( ) === 'INPUT' ) ) {
target [ 'focus' ] ( ) ;
setTimeout ( function ( ) {
target [ 'select' ] ( ) ;
} ) ;
}
} ;
AppComponent . prototype . ngOnDestroy = function ( ) {
if ( this . intervalUpdateContractsState ) {
clearInterval ( this . intervalUpdateContractsState ) ;
}
} ;
2019-01-28 13:07:43 +02:00
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ViewChild" ] ) ( 'allContextMenu' ) ,
_ _metadata ( "design:type" , ngx _contextmenu _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "ContextMenuComponent" ] )
] , AppComponent . prototype , "allContextMenu" , void 0 ) ;
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ViewChild" ] ) ( 'onlyCopyContextMenu' ) ,
_ _metadata ( "design:type" , ngx _contextmenu _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "ContextMenuComponent" ] )
] , AppComponent . prototype , "onlyCopyContextMenu" , void 0 ) ;
2018-12-27 18:50:45 +03:00
AppComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-root' ,
template : _ _webpack _require _ _ ( /*! ./app.component.html */ "./src/app/app.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./app.component.scss */ "./src/app/app.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _common _http _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "HttpClient" ] ,
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Renderer2" ] ,
_ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "TranslateService" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "BackendService" ] ,
_angular _router _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "Router" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "VariablesService" ] ,
2019-01-29 16:46:36 +02:00
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ,
2019-02-14 17:28:29 +02:00
_helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "IntToMoneyPipe" ] ,
_helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _9 _ _ [ "ModalService" ] ] )
2018-12-27 18:50:45 +03:00
] , AppComponent ) ;
return AppComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/app.module.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / app . module . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: HttpLoaderFactory, AppModule */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "HttpLoaderFactory" , function ( ) { return HttpLoaderFactory ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "AppModule" , function ( ) { return AppModule ; } ) ;
/* harmony import */ var _angular _platform _browser _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js" ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _app _routing _module _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ./app-routing.module */ "./src/app/app-routing.module.ts" ) ;
/* harmony import */ var _app _component _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ./app.component */ "./src/app/app.component.ts" ) ;
/* harmony import */ var _login _login _component _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ./login/login.component */ "./src/app/login/login.component.ts" ) ;
/* harmony import */ var _settings _settings _component _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ./settings/settings.component */ "./src/app/settings/settings.component.ts" ) ;
/* harmony import */ var _sidebar _sidebar _component _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! ./sidebar/sidebar.component */ "./src/app/sidebar/sidebar.component.ts" ) ;
/* harmony import */ var _main _main _component _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( /*! ./main/main.component */ "./src/app/main/main.component.ts" ) ;
/* harmony import */ var _create _wallet _create _wallet _component _ _WEBPACK _IMPORTED _MODULE _8 _ _ = _ _webpack _require _ _ ( /*! ./create-wallet/create-wallet.component */ "./src/app/create-wallet/create-wallet.component.ts" ) ;
/* harmony import */ var _open _wallet _open _wallet _component _ _WEBPACK _IMPORTED _MODULE _9 _ _ = _ _webpack _require _ _ ( /*! ./open-wallet/open-wallet.component */ "./src/app/open-wallet/open-wallet.component.ts" ) ;
/* harmony import */ var _restore _wallet _restore _wallet _component _ _WEBPACK _IMPORTED _MODULE _10 _ _ = _ _webpack _require _ _ ( /*! ./restore-wallet/restore-wallet.component */ "./src/app/restore-wallet/restore-wallet.component.ts" ) ;
/* harmony import */ var _seed _phrase _seed _phrase _component _ _WEBPACK _IMPORTED _MODULE _11 _ _ = _ _webpack _require _ _ ( /*! ./seed-phrase/seed-phrase.component */ "./src/app/seed-phrase/seed-phrase.component.ts" ) ;
/* harmony import */ var _wallet _details _wallet _details _component _ _WEBPACK _IMPORTED _MODULE _12 _ _ = _ _webpack _require _ _ ( /*! ./wallet-details/wallet-details.component */ "./src/app/wallet-details/wallet-details.component.ts" ) ;
2019-02-05 18:20:54 +02:00
/* harmony import */ var _assign _alias _assign _alias _component _ _WEBPACK _IMPORTED _MODULE _13 _ _ = _ _webpack _require _ _ ( /*! ./assign-alias/assign-alias.component */ "./src/app/assign-alias/assign-alias.component.ts" ) ;
2019-02-15 16:28:31 +02:00
/* harmony import */ var _edit _alias _edit _alias _component _ _WEBPACK _IMPORTED _MODULE _14 _ _ = _ _webpack _require _ _ ( /*! ./edit-alias/edit-alias.component */ "./src/app/edit-alias/edit-alias.component.ts" ) ;
/* harmony import */ var _transfer _alias _transfer _alias _component _ _WEBPACK _IMPORTED _MODULE _15 _ _ = _ _webpack _require _ _ ( /*! ./transfer-alias/transfer-alias.component */ "./src/app/transfer-alias/transfer-alias.component.ts" ) ;
/* harmony import */ var _wallet _wallet _component _ _WEBPACK _IMPORTED _MODULE _16 _ _ = _ _webpack _require _ _ ( /*! ./wallet/wallet.component */ "./src/app/wallet/wallet.component.ts" ) ;
/* harmony import */ var _send _send _component _ _WEBPACK _IMPORTED _MODULE _17 _ _ = _ _webpack _require _ _ ( /*! ./send/send.component */ "./src/app/send/send.component.ts" ) ;
/* harmony import */ var _receive _receive _component _ _WEBPACK _IMPORTED _MODULE _18 _ _ = _ _webpack _require _ _ ( /*! ./receive/receive.component */ "./src/app/receive/receive.component.ts" ) ;
/* harmony import */ var _history _history _component _ _WEBPACK _IMPORTED _MODULE _19 _ _ = _ _webpack _require _ _ ( /*! ./history/history.component */ "./src/app/history/history.component.ts" ) ;
/* harmony import */ var _contracts _contracts _component _ _WEBPACK _IMPORTED _MODULE _20 _ _ = _ _webpack _require _ _ ( /*! ./contracts/contracts.component */ "./src/app/contracts/contracts.component.ts" ) ;
/* harmony import */ var _purchase _purchase _component _ _WEBPACK _IMPORTED _MODULE _21 _ _ = _ _webpack _require _ _ ( /*! ./purchase/purchase.component */ "./src/app/purchase/purchase.component.ts" ) ;
/* harmony import */ var _messages _messages _component _ _WEBPACK _IMPORTED _MODULE _22 _ _ = _ _webpack _require _ _ ( /*! ./messages/messages.component */ "./src/app/messages/messages.component.ts" ) ;
/* harmony import */ var _typing _message _typing _message _component _ _WEBPACK _IMPORTED _MODULE _23 _ _ = _ _webpack _require _ _ ( /*! ./typing-message/typing-message.component */ "./src/app/typing-message/typing-message.component.ts" ) ;
/* harmony import */ var _staking _staking _component _ _WEBPACK _IMPORTED _MODULE _24 _ _ = _ _webpack _require _ _ ( /*! ./staking/staking.component */ "./src/app/staking/staking.component.ts" ) ;
/* harmony import */ var _angular _common _http _ _WEBPACK _IMPORTED _MODULE _25 _ _ = _ _webpack _require _ _ ( /*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js" ) ;
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _26 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
/* harmony import */ var _ngx _translate _http _loader _ _WEBPACK _IMPORTED _MODULE _27 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/http-loader */ "./node_modules/@ngx-translate/http-loader/fesm5/ngx-translate-http-loader.js" ) ;
/* harmony import */ var _angular _forms _ _WEBPACK _IMPORTED _MODULE _28 _ _ = _ _webpack _require _ _ ( /*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js" ) ;
2019-03-18 17:04:17 +02:00
/* harmony import */ var _ng _select _ng _select _ _WEBPACK _IMPORTED _MODULE _29 _ _ = _ _webpack _require _ _ ( /*! @ng-select/ng-select */ "./node_modules/@ng-select/ng-select/fesm5/ng-select.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _30 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _31 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/services/modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
/* harmony import */ var _helpers _pipes _money _to _int _pipe _ _WEBPACK _IMPORTED _MODULE _32 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/pipes/money-to-int.pipe */ "./src/app/_helpers/pipes/money-to-int.pipe.ts" ) ;
/* harmony import */ var _helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _33 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/pipes/int-to-money.pipe */ "./src/app/_helpers/pipes/int-to-money.pipe.ts" ) ;
/* harmony import */ var _helpers _pipes _history _type _messages _pipe _ _WEBPACK _IMPORTED _MODULE _34 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/pipes/history-type-messages.pipe */ "./src/app/_helpers/pipes/history-type-messages.pipe.ts" ) ;
/* harmony import */ var _helpers _pipes _contract _status _messages _pipe _ _WEBPACK _IMPORTED _MODULE _35 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/pipes/contract-status-messages.pipe */ "./src/app/_helpers/pipes/contract-status-messages.pipe.ts" ) ;
/* harmony import */ var _helpers _pipes _contract _time _left _pipe _ _WEBPACK _IMPORTED _MODULE _36 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/pipes/contract-time-left.pipe */ "./src/app/_helpers/pipes/contract-time-left.pipe.ts" ) ;
/* harmony import */ var _helpers _directives _tooltip _directive _ _WEBPACK _IMPORTED _MODULE _37 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/directives/tooltip.directive */ "./src/app/_helpers/directives/tooltip.directive.ts" ) ;
/* harmony import */ var _helpers _directives _input _validate _input _validate _directive _ _WEBPACK _IMPORTED _MODULE _38 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/directives/input-validate/input-validate.directive */ "./src/app/_helpers/directives/input-validate/input-validate.directive.ts" ) ;
/* harmony import */ var _helpers _directives _staking _switch _staking _switch _component _ _WEBPACK _IMPORTED _MODULE _39 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/directives/staking-switch/staking-switch.component */ "./src/app/_helpers/directives/staking-switch/staking-switch.component.ts" ) ;
/* harmony import */ var _helpers _directives _modal _container _modal _container _component _ _WEBPACK _IMPORTED _MODULE _40 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/directives/modal-container/modal-container.component */ "./src/app/_helpers/directives/modal-container/modal-container.component.ts" ) ;
/* harmony import */ var _helpers _directives _transaction _details _transaction _details _component _ _WEBPACK _IMPORTED _MODULE _41 _ _ = _ _webpack _require _ _ ( /*! ./_helpers/directives/transaction-details/transaction-details.component */ "./src/app/_helpers/directives/transaction-details/transaction-details.component.ts" ) ;
/* harmony import */ var ngx _contextmenu _ _WEBPACK _IMPORTED _MODULE _42 _ _ = _ _webpack _require _ _ ( /*! ngx-contextmenu */ "./node_modules/ngx-contextmenu/fesm5/ngx-contextmenu.js" ) ;
/* harmony import */ var angular _highcharts _ _WEBPACK _IMPORTED _MODULE _43 _ _ = _ _webpack _require _ _ ( /*! angular-highcharts */ "./node_modules/angular-highcharts/fesm5/angular-highcharts.js" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
2019-01-09 15:25:03 +02:00
2018-12-27 18:50:45 +03:00
2019-02-15 16:28:31 +02:00
2018-12-27 18:50:45 +03:00
2019-03-18 17:04:17 +02:00
2018-12-27 18:50:45 +03:00
2019-02-05 18:20:54 +02:00
function HttpLoaderFactory ( httpClient ) {
2019-02-15 16:28:31 +02:00
return new _ngx _translate _http _loader _ _WEBPACK _IMPORTED _MODULE _27 _ _ [ "TranslateHttpLoader" ] ( httpClient , './assets/i18n/' , '.json' ) ;
2019-02-05 18:20:54 +02:00
}
2019-01-21 18:46:48 +02:00
2018-12-27 18:50:45 +03:00
// import * as more from 'highcharts/highcharts-more.src';
// import * as exporting from 'highcharts/modules/exporting.src';
// import * as highstock from 'highcharts/modules/stock.src';
2019-03-18 17:04:17 +02:00
angular _highcharts _ _WEBPACK _IMPORTED _MODULE _43 _ _ [ "Highcharts" ] . setOptions ( {
2018-12-27 18:50:45 +03:00
// global: {
// useUTC: false
// }
} ) ;
var AppModule = /** @class */ ( function ( ) {
function AppModule ( ) {
}
AppModule = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "NgModule" ] ) ( {
declarations : [
_app _component _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "AppComponent" ] ,
_login _login _component _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "LoginComponent" ] ,
_settings _settings _component _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "SettingsComponent" ] ,
_sidebar _sidebar _component _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "SidebarComponent" ] ,
_main _main _component _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "MainComponent" ] ,
_create _wallet _create _wallet _component _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "CreateWalletComponent" ] ,
_open _wallet _open _wallet _component _ _WEBPACK _IMPORTED _MODULE _9 _ _ [ "OpenWalletComponent" ] ,
_restore _wallet _restore _wallet _component _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "RestoreWalletComponent" ] ,
_seed _phrase _seed _phrase _component _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "SeedPhraseComponent" ] ,
_wallet _details _wallet _details _component _ _WEBPACK _IMPORTED _MODULE _12 _ _ [ "WalletDetailsComponent" ] ,
2019-02-05 18:20:54 +02:00
_assign _alias _assign _alias _component _ _WEBPACK _IMPORTED _MODULE _13 _ _ [ "AssignAliasComponent" ] ,
2019-02-15 16:28:31 +02:00
_edit _alias _edit _alias _component _ _WEBPACK _IMPORTED _MODULE _14 _ _ [ "EditAliasComponent" ] ,
_transfer _alias _transfer _alias _component _ _WEBPACK _IMPORTED _MODULE _15 _ _ [ "TransferAliasComponent" ] ,
_wallet _wallet _component _ _WEBPACK _IMPORTED _MODULE _16 _ _ [ "WalletComponent" ] ,
_send _send _component _ _WEBPACK _IMPORTED _MODULE _17 _ _ [ "SendComponent" ] ,
_receive _receive _component _ _WEBPACK _IMPORTED _MODULE _18 _ _ [ "ReceiveComponent" ] ,
_history _history _component _ _WEBPACK _IMPORTED _MODULE _19 _ _ [ "HistoryComponent" ] ,
_contracts _contracts _component _ _WEBPACK _IMPORTED _MODULE _20 _ _ [ "ContractsComponent" ] ,
_purchase _purchase _component _ _WEBPACK _IMPORTED _MODULE _21 _ _ [ "PurchaseComponent" ] ,
_messages _messages _component _ _WEBPACK _IMPORTED _MODULE _22 _ _ [ "MessagesComponent" ] ,
_staking _staking _component _ _WEBPACK _IMPORTED _MODULE _24 _ _ [ "StakingComponent" ] ,
_typing _message _typing _message _component _ _WEBPACK _IMPORTED _MODULE _23 _ _ [ "TypingMessageComponent" ] ,
2019-03-18 17:04:17 +02:00
_helpers _pipes _money _to _int _pipe _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "MoneyToIntPipe" ] ,
_helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _33 _ _ [ "IntToMoneyPipe" ] ,
_helpers _directives _staking _switch _staking _switch _component _ _WEBPACK _IMPORTED _MODULE _39 _ _ [ "StakingSwitchComponent" ] ,
_helpers _pipes _history _type _messages _pipe _ _WEBPACK _IMPORTED _MODULE _34 _ _ [ "HistoryTypeMessagesPipe" ] ,
_helpers _pipes _contract _status _messages _pipe _ _WEBPACK _IMPORTED _MODULE _35 _ _ [ "ContractStatusMessagesPipe" ] ,
_helpers _pipes _contract _time _left _pipe _ _WEBPACK _IMPORTED _MODULE _36 _ _ [ "ContractTimeLeftPipe" ] ,
_helpers _directives _tooltip _directive _ _WEBPACK _IMPORTED _MODULE _37 _ _ [ "TooltipDirective" ] ,
_helpers _directives _input _validate _input _validate _directive _ _WEBPACK _IMPORTED _MODULE _38 _ _ [ "InputValidateDirective" ] ,
_helpers _directives _modal _container _modal _container _component _ _WEBPACK _IMPORTED _MODULE _40 _ _ [ "ModalContainerComponent" ] ,
_helpers _directives _transaction _details _transaction _details _component _ _WEBPACK _IMPORTED _MODULE _41 _ _ [ "TransactionDetailsComponent" ]
2018-12-27 18:50:45 +03:00
] ,
imports : [
_angular _platform _browser _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "BrowserModule" ] ,
_app _routing _module _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "AppRoutingModule" ] ,
2019-02-15 16:28:31 +02:00
_angular _common _http _ _WEBPACK _IMPORTED _MODULE _25 _ _ [ "HttpClientModule" ] ,
_ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _26 _ _ [ "TranslateModule" ] . forRoot ( {
2018-12-27 18:50:45 +03:00
loader : {
2019-02-15 16:28:31 +02:00
provide : _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _26 _ _ [ "TranslateLoader" ] ,
2018-12-27 18:50:45 +03:00
useFactory : HttpLoaderFactory ,
2019-02-15 16:28:31 +02:00
deps : [ _angular _common _http _ _WEBPACK _IMPORTED _MODULE _25 _ _ [ "HttpClient" ] ]
2018-12-27 18:50:45 +03:00
}
} ) ,
2019-02-15 16:28:31 +02:00
_angular _forms _ _WEBPACK _IMPORTED _MODULE _28 _ _ [ "FormsModule" ] ,
_angular _forms _ _WEBPACK _IMPORTED _MODULE _28 _ _ [ "ReactiveFormsModule" ] ,
2019-03-18 17:04:17 +02:00
_ng _select _ng _select _ _WEBPACK _IMPORTED _MODULE _29 _ _ [ "NgSelectModule" ] ,
angular _highcharts _ _WEBPACK _IMPORTED _MODULE _43 _ _ [ "ChartModule" ] ,
ngx _contextmenu _ _WEBPACK _IMPORTED _MODULE _42 _ _ [ "ContextMenuModule" ] . forRoot ( )
2018-12-27 18:50:45 +03:00
] ,
providers : [
2019-03-18 17:04:17 +02:00
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "BackendService" ] ,
_helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "ModalService" ] ,
_helpers _pipes _money _to _int _pipe _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "MoneyToIntPipe" ] ,
_helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _33 _ _ [ "IntToMoneyPipe" ] ,
2019-01-09 15:25:03 +02:00
] ,
entryComponents : [
2019-03-18 17:04:17 +02:00
_helpers _directives _modal _container _modal _container _component _ _WEBPACK _IMPORTED _MODULE _40 _ _ [ "ModalContainerComponent" ]
2018-12-27 18:50:45 +03:00
] ,
bootstrap : [ _app _component _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "AppComponent" ] ]
} )
] , AppModule ) ;
return AppModule ;
} ( ) ) ;
2019-02-05 18:20:54 +02:00
/***/ } ) ,
/***/ "./src/app/assign-alias/assign-alias.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / assign - alias / assign - alias . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-02-22 16:21:44 +02:00
module . exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/wallet/' + wallet.wallet_id + '/history']\">{{ wallet.name }}</span>\r\n <span>{{ 'BREADCRUMBS.ASSIGN_ALIAS' | translate }}</span>\r\n </div>\r\n <button class=\"back-btn\" (click)=\"back()\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </button>\r\n </div>\r\n\r\n <form class=\"form-assign\" [formGroup]=\"assignForm\">\r\n\r\n <div class=\"input-block alias-name\">\r\n <label for=\"alias-name\" tooltip=\"{{ 'ASSIGN_ALIAS.NAME.TOOLTIP' | translate }}\" placement=\"bottom-left\" tooltipClass=\"table-tooltip assign-alias-tooltip\" [delay]=\"500\">\r\n {{ 'ASSIGN_ALIAS.NAME.LABEL' | translate }}\r\n </label>\r\n <input type=\"text\" id=\"alias-name\" formControlName=\"name\" placeholder=\"{{ 'ASSIGN_ALIAS.NAME.PLACEHOLDER' | translate }}\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"assignForm.controls['name'].invalid && (assignForm.controls['name'].dirty || assignForm.controls['name'].touched)\">\r\n <div *ngIf=\"assignForm.controls['name'].errors['required']\">\r\n {{ 'ASSIGN_ALIAS.FORM_ERRORS.NAME_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"assignForm.controls['name'].errors['pattern'] && assignForm.get('name').value.length > 6 && assignForm.get('name').value.length <= 25\">\r\n {{ 'ASSIGN_ALIAS.FORM_ERRORS.NAME_WRONG' | translate }}\r\n </div>\r\n <div *ngIf=\"assignForm.get('name').value.length <= 6 || assignForm.get('name').value.length > 25\">\r\n {{ 'ASSIGN_ALIAS.FORM_ERRORS.NAME_LENGTH' | translate }}\r\n </div>\r\n </div>\r\n <div class=\"error-block\" *ngIf=\"alias.exists\">\r\n <div>\r\n {{ 'ASSIGN_ALIAS.FORM_ERRORS.NAME_EXISTS' | translate }}\r\n </div>\r\n </div>\r\n <div class=\"error-block\" *ngIf=\"notEnoughMoney\">\r\n <div>\r\n {{ 'ASSIGN_ALIAS.FORM_ERRORS.NO_MONEY' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block textarea\">\r\n <label for=\"alias-comment\" tooltip=\"{{ 'ASSIGN_ALIAS.COMMENT.TOOLTIP' | translate }}\" placement=\"bottom-left\" tooltipClass=\"table-tooltip assign-alias-tooltip\" [delay]=\"500\">\r\n {{ 'ASSIGN_ALIAS.COMMENT.LABEL' | translate }}\r\n </label>\r\n <textarea id=\"alias-comment\" formControlName=\"comment\" placeholder=\"{{ 'ASSIGN_ALIAS.COMMENT.PLACEHOLDER' | translate }}\" (contextmenu)=\"variablesService.onContextMenu($event)\"></textarea>\r\n </div>\r\n\r\n <div class=\"alias-cost\">{{ \"ASSIGN_ALIAS.COST\" | translate : {value: alias.price | intToMoney, currency: variablesService.defaultCurrency} }}</div>\r\n\r\n <div class=\"wrap-buttons\">\r\n <button type=\"button\" class=\"blue-button\" (click)=\"assignAlias()\" [disabled]=\"!assignForm.valid || !canRegister || notEnoughMoney\">{{ 'ASSIGN_ALIAS.BUTTON_ASSIGN' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button\" (click)=\"back()\">{{ 'ASSIGN_ALIAS.BUTTON_CANCEL' | translate }}</button>\r\n </div>\r\n\r\n </form>\r\n\r\n</div>\r\n\r\n"
2019-02-05 18:20:54 +02:00
/***/ } ) ,
/***/ "./src/app/assign-alias/assign-alias.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / assign - alias / assign - alias . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ".form-assign {\n margin: 2.4rem 0; }\n .form-assign .alias-name {\n width: 50%; }\n .form-assign .alias-cost {\n font-size: 1.3rem;\n margin-top: 2rem; }\n .form-assign .wrap-buttons {\n display: flex;\n justify-content: space-between;\n margin: 2.5rem -0.7rem; }\n .form-assign .wrap-buttons button {\n margin: 0 0.7rem;\n width: 15rem; }\n .assign-alias-tooltip {\n font-size: 1.3rem;\n line-height: 2rem;\n padding: 1rem 1.5rem;\n max-width: 46rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvYXNzaWduLWFsaWFzL0Q6XFxQcm9qZWN0c1xcWmFub1xcc3JjXFxndWlcXHF0LWRhZW1vblxcaHRtbF9zb3VyY2Uvc3JjXFxhcHBcXGFzc2lnbi1hbGlhc1xcYXNzaWduLWFsaWFzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZ0JBQWdCLEVBQUE7RUFEbEI7SUFJSSxVQUFVLEVBQUE7RUFKZDtJQVFJLGlCQUFpQjtJQUNqQixnQkFBZ0IsRUFBQTtFQVRwQjtJQWFJLGFBQWE7SUFDYiw4QkFBOEI7SUFDOUIsc0JBQXNCLEVBQUE7RUFmMUI7TUFrQk0sZ0JBQWdCO01BQ2hCLFlBQVksRUFBQTtFQUtsQjtFQUNFLGlCQUFpQjtFQUNqQixpQkFBaUI7RUFDakIsb0JBQW9CO0VBQ3BCLGdCQUFnQixFQUFBIiwiZmlsZSI6InNyYy9hcHAvYXNzaWduLWFsaWFzL2Fzc2lnbi1hbGlhcy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5mb3JtLWFzc2lnbiB7XHJcbiAgbWFyZ2luOiAyLjRyZW0gMDtcclxuXHJcbiAgLmFsaWFzLW5hbWUge1xyXG4gICAgd2lkdGg6IDUwJTtcclxuICB9XHJcblxyXG4gIC5hbGlhcy1jb3N0IHtcclxuICAgIGZvbnQtc2l6ZTogMS4zcmVtO1xyXG4gICAgbWFyZ2luLXRvcDogMnJlbTtcclxuICB9XHJcblxyXG4gIC53cmFwLWJ1dHRvbnMge1xyXG4gICAgZGlzcGxheTogZmxleDtcclxuICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtcclxuICAgIG1hcmdpbjogMi41cmVtIC0wLjdyZW07XHJcblxyXG4gICAgYnV0dG9uIHtcclxuICAgICAgbWFyZ2luOiAwIDAuN3JlbTtcclxuICAgICAgd2lkdGg6IDE1cmVtO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG5cclxuLmFzc2lnbi1hbGlhcy10b29sdGlwIHtcclxuICBmb250LXNpemU6IDEuM3JlbTtcclxuICBsaW5lLWhlaWdodDogMnJlbTtcclxuICBwYWRkaW5nOiAxcmVtIDEuNXJlbTtcclxuICBtYXgtd2lkdGg6IDQ2cmVtO1xyXG59XHJcbiJdfQ== */"
2019-02-05 18:20:54 +02:00
/***/ } ) ,
/***/ "./src/app/assign-alias/assign-alias.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / assign - alias / assign - alias . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: AssignAliasComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "AssignAliasComponent" , function ( ) { return AssignAliasComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js" ) ;
/* harmony import */ var _angular _common _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js" ) ;
2019-02-07 15:50:44 +02:00
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
/* harmony import */ var _helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
/* harmony import */ var _helpers _pipes _money _to _int _pipe _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/pipes/money-to-int.pipe */ "./src/app/_helpers/pipes/money-to-int.pipe.ts" ) ;
/* harmony import */ var _helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _8 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/pipes/int-to-money.pipe */ "./src/app/_helpers/pipes/int-to-money.pipe.ts" ) ;
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _9 _ _ = _ _webpack _require _ _ ( /*! bignumber.js */ "./node_modules/bignumber.js/bignumber.js" ) ;
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _9 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( bignumber _js _ _WEBPACK _IMPORTED _MODULE _9 _ _ ) ;
2019-02-05 18:20:54 +02:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-02-06 17:57:20 +02:00
2019-02-07 15:50:44 +02:00
2019-02-05 18:20:54 +02:00
var AssignAliasComponent = /** @class */ ( function ( ) {
2019-02-07 15:50:44 +02:00
function AssignAliasComponent ( ngZone , location , router , backend , variablesService , modalService , moneyToInt , intToMoney ) {
2019-02-05 18:20:54 +02:00
this . ngZone = ngZone ;
this . location = location ;
2019-02-07 15:50:44 +02:00
this . router = router ;
2019-02-05 18:20:54 +02:00
this . backend = backend ;
this . variablesService = variablesService ;
2019-02-06 17:57:20 +02:00
this . modalService = modalService ;
2019-02-05 18:20:54 +02:00
this . moneyToInt = moneyToInt ;
this . intToMoney = intToMoney ;
this . assignForm = new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormGroup" ] ( {
name : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' , [ _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required , _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . pattern ( /^@?[a-z0-9\.\-]{6,25}$/ ) ] ) ,
comment : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' )
} ) ;
this . alias = {
name : '' ,
fee : this . variablesService . default _fee ,
2019-02-07 15:50:44 +02:00
price : new bignumber _js _ _WEBPACK _IMPORTED _MODULE _9 _ _ _default . a ( 0 ) ,
2019-02-05 18:20:54 +02:00
reward : '0' ,
rewardOriginal : '0' ,
comment : '' ,
exists : false
} ;
this . canRegister = false ;
this . notEnoughMoney = false ;
}
AssignAliasComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
this . wallet = this . variablesService . currentWallet ;
2019-02-19 16:15:00 +02:00
this . assignFormSubscription = this . assignForm . get ( 'name' ) . valueChanges . subscribe ( function ( value ) {
2019-02-05 18:20:54 +02:00
_this . canRegister = false ;
2019-02-06 17:57:20 +02:00
_this . alias . exists = false ;
2019-02-05 18:20:54 +02:00
var newName = value . toLowerCase ( ) . replace ( '@' , '' ) ;
if ( ! ( _this . assignForm . controls [ 'name' ] . errors && _this . assignForm . controls [ 'name' ] . errors . hasOwnProperty ( 'pattern' ) ) && newName . length >= 6 && newName . length <= 25 ) {
_this . backend . getAliasByName ( newName , function ( status ) {
2019-02-06 17:57:20 +02:00
_this . ngZone . run ( function ( ) {
_this . alias . exists = status ;
} ) ;
if ( ! status ) {
2019-02-07 15:50:44 +02:00
_this . alias . price = new bignumber _js _ _WEBPACK _IMPORTED _MODULE _9 _ _ _default . a ( 0 ) ;
2019-02-05 18:20:54 +02:00
_this . backend . getAliasCoast ( newName , function ( statusPrice , dataPrice ) {
_this . ngZone . run ( function ( ) {
if ( statusPrice ) {
2019-02-07 15:50:44 +02:00
_this . alias . price = bignumber _js _ _WEBPACK _IMPORTED _MODULE _9 _ _ _default . a . sum ( dataPrice [ 'coast' ] , _this . variablesService . default _fee _big ) ;
2019-02-05 18:20:54 +02:00
}
_this . notEnoughMoney = _this . alias . price . isGreaterThan ( _this . wallet . unlocked _balance ) ;
_this . alias . reward = _this . intToMoney . transform ( _this . alias . price , false ) ;
_this . alias . rewardOriginal = _this . intToMoney . transform ( dataPrice [ 'coast' ] , false ) ;
_this . canRegister = ! _this . notEnoughMoney ;
} ) ;
} ) ;
}
else {
_this . notEnoughMoney = false ;
_this . alias . reward = '0' ;
_this . alias . rewardOriginal = '0' ;
}
} ) ;
}
else {
_this . notEnoughMoney = false ;
_this . alias . reward = '0' ;
_this . alias . rewardOriginal = '0' ;
}
_this . alias . name = newName ;
} ) ;
} ;
AssignAliasComponent . prototype . assignAlias = function ( ) {
2019-02-06 17:57:20 +02:00
var _this = this ;
var alias = this . backend . getWalletAlias ( this . wallet . address ) ;
2019-02-05 18:20:54 +02:00
if ( alias . hasOwnProperty ( 'name' ) ) {
2019-02-06 17:57:20 +02:00
this . modalService . prepareModal ( 'info' , 'ASSIGN_ALIAS.ONE_ALIAS' ) ;
}
else {
this . alias . comment = this . assignForm . get ( 'comment' ) . value ;
2019-02-19 16:15:00 +02:00
this . backend . registerAlias ( this . wallet . wallet _id , this . alias . name , this . wallet . address , this . alias . fee , this . alias . comment , this . alias . rewardOriginal , function ( status , data ) {
2019-02-06 17:57:20 +02:00
if ( status ) {
2019-02-19 16:15:00 +02:00
_this . wallet . wakeAlias = true ;
2019-02-06 17:57:20 +02:00
_this . modalService . prepareModal ( 'info' , 'ASSIGN_ALIAS.REQUEST_ADD_REG' ) ;
2019-02-19 09:51:20 +02:00
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/wallet/' + _this . wallet . wallet _id ] ) ;
} ) ;
2019-02-06 17:57:20 +02:00
}
} ) ;
}
2019-02-05 18:20:54 +02:00
} ;
AssignAliasComponent . prototype . back = function ( ) {
this . location . back ( ) ;
} ;
2019-02-19 16:15:00 +02:00
AssignAliasComponent . prototype . ngOnDestroy = function ( ) {
this . assignFormSubscription . unsubscribe ( ) ;
} ;
2019-02-05 18:20:54 +02:00
AssignAliasComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-assign-alias' ,
template : _ _webpack _require _ _ ( /*! ./assign-alias.component.html */ "./src/app/assign-alias/assign-alias.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./assign-alias.component.scss */ "./src/app/assign-alias/assign-alias.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ,
_angular _common _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Location" ] ,
2019-02-07 15:50:44 +02:00
_angular _router _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "Router" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "VariablesService" ] ,
_helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "ModalService" ] ,
_helpers _pipes _money _to _int _pipe _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "MoneyToIntPipe" ] ,
_helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "IntToMoneyPipe" ] ] )
2019-02-05 18:20:54 +02:00
] , AssignAliasComponent ) ;
return AssignAliasComponent ;
} ( ) ) ;
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/contracts/contracts.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / contracts / contracts . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-02-22 16:21:44 +02:00
module . exports = "<div class=\"empty-contracts\" *ngIf=\"!variablesService.currentWallet.contracts.length\">\r\n <span>{{ 'CONTRACTS.EMPTY' | translate }}</span>\r\n</div>\r\n\r\n<div class=\"wrap-table scrolled-content\" *ngIf=\"variablesService.currentWallet.contracts.length\">\r\n\r\n <table class=\"contracts-table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'CONTRACTS.CONTRACTS' | translate }}</th>\r\n <th>{{ 'CONTRACTS.DATE' | translate }}</th>\r\n <th>{{ 'CONTRACTS.AMOUNT' | translate }}</th>\r\n <th>{{ 'CONTRACTS.STATUS' | translate }}</th>\r\n <th>{{ 'CONTRACTS.COMMENTS' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let item of variablesService.currentWallet.contracts\" [routerLink]=\"'/wallet/' + walletId + '/purchase/' + item.contract_id\">\r\n <td>\r\n <div class=\"contract\">\r\n <i class=\"icon alert\" *ngIf=\"!item.is_new\"></i>\r\n <i class=\"icon new\" *ngIf=\"item.is_new\"></i>\r\n <i class=\"icon\" [class.purchase]=\"item.is_a\" [class.sell]=\"!item.is_a\"></i>\r\n <span tooltip=\"{{ item.private_detailes.t }}\" placement=\"top-left\" tooltipClass=\"table-tooltip\" [delay]=\"500\" [showWhenNoOverflow]=\"false\">{{item.private_detailes.t}}</span>\r\n </div>\r\n </td>\r\n <td>\r\n <div>{{item.timestamp * 1000 | date : 'dd-MM-yyyy HH:mm'}}</div>\r\n </td>\r\n <td>\r\n <div>{{item.private_detailes.to_pay | intToMoney}} {{variablesService.defaultCurrency}}</div>\r\n </td>\r\n <td>\r\n <div class=\"status\" tooltip=\"{{ item | contractStatusMessages }}\" placement=\"top\" tooltipClass=\"table-tooltip\" [delay]=\"500\">\r\n {{item | contractStatusMessages}}\r\n </div>\r\n </td>\r\n <td>\r\n <div class=\"comment\" tooltip=\"{{ item.private_detailes.c }}\" placement=\"top-right\" tooltipClass=\"table-tooltip\" [delay]=\"500\">\r\n {{item.private_detailes.c}}\r\n </div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n\r\n</div>\r\n\r\n<div class=\"contracts-buttons\">\r\n <button type=\"button\" class=\"blue-button\" [routerLink]=\"'/wallet/' + walletId + '/purchase'\">{{ 'CONTRACTS.PURCHASE_BUTTON' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button\" disabled>{{ 'CONTRACTS.LISTING_BUTTON' | translate }}</button>\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/contracts/contracts.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / contracts / contracts . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = " : host { \ n width : 100 % ; } \ n \ n . empty - contracts { \ n font - size : 1.5 rem ; } \ n \ n . wrap - table { \ n margin : - 3 rem - 3 rem 0 - 3 rem ; \ n overflow - x : auto ; } \ n \ n . wrap - table table tbody tr { \ n cursor : pointer ; \ n outline : none ! important ; } \ n \ n . wrap - table table tbody tr . contract { \ n position : relative ; \ n display : flex ; \ n align - items : center ; } \ n \ n . wrap - table table tbody tr . contract . icon { \ n flex - shrink : 0 ; } \ n \ n . wrap - table table tbody tr . contract . icon . new , . wrap - table table tbody tr . contract . icon . alert { \ n position : absolute ; \ n top : 0 ; } \ n \ n . wrap - table table tbody tr . contract . icon . new { \ n left : - 2.3 rem ; \ n - webkit - mask : url ( 'new.svg' ) no - repeat center ; \ n mask : url ( 'new.svg' ) no - repeat center ; \ n width : 1.7 rem ; \ n height : 1.7 rem ; } \ n \ n . wrap - table table tbody tr . contract . icon . alert { \ n top : 0.2 rem ; \ n left : - 2.1 rem ; \ n - webkit - mask : url ( 'alert.svg' ) no - repeat center ; \ n mask : url ( 'alert.svg' ) no - repeat center ; \ n width : 1.2 rem ; \ n height : 1.2 rem ; } \ n \ n . wrap - table table tbody tr . contract . icon . purchase , . wrap - table table tbody tr . contract . icon . sell { \ n margin - right : 1 rem ; \ n width : 1.5 rem ; \ n height : 1.5 rem ; } \ n \ n . wrap - table table tbody tr . contract . icon . purchase { \ n - webkit - mask : url ( 'purchase.svg' ) no - repeat center ; \ n mask : url ( 'purchase.svg' ) no - repeat center ; } \ n \ n . wrap - table table tbody tr . contract . icon . sell { \ n - webkit - mask : url ( 'sell.svg' ) no - repeat center ; \ n mask : url ( 'sell.svg' ) no - repeat center ; } \ n \ n . wrap - table table tbody tr . contract span { \ n text - overflow : ellipsis ; \ n overflow : hidden ; } \ n \ n . wrap - table table tbody tr . status , . wrap - table table tbody tr . comment { \ n text - overflow : ellipsis ; \ n overflow : hidden ; } \ n \ n . contracts - buttons { \ n display : flex ; \ n margin : 3 rem 0 ; \ n width : 50 % ; } \ n \ n . contracts - buttons button { \ n flex : 0 1 50 % ; \ n margin - right : 1.5 rem ; } \ n \ n / * # sourceMappingURL = data : application / json ; base64 , eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvY29udHJhY3RzL0Q6XFxQcm9qZWN0c1xcWmFub1xcc3JjXFxndWlcXHF0LWRhZW1vblxcaHRtbF9zb3VyY2Uvc3JjXFxhcHBcXGNvbnRyYWN0c1xcY29udHJhY3RzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsV0FBVyxFQUFBOztBQUdiO0VBQ0UsaUJBQWlCLEVBQUE7O0FBR25CO0VBQ0UsMkJBQTJCO0VBQzNCLGdCQUFnQixFQUFBOztBQUZsQjtJQVNRLGVBQWU7SUFDZix3QkFBd0IsRUFBQTs7QUFWaEM7TUFhVSxrQkFBa0I7TUFDbEIsYUFBYTtNQUNiLG1CQUFtQixFQUFBOztBQWY3QjtRQWtCWSxjQUFjLEVBQUE7O0FBbEIxQjtVQXFCYyxrQkFBa0I7VUFDbEIsTUFBTSxFQUFBOztBQXRCcEI7VUEwQmMsYUFBYTtVQUNiLDZDQUFzRDtrQkFBdEQscUNBQXNEO1VBQ3RELGFBQWE7VUFDYixjQUFjLEVBQUE7O0FBN0I1QjtVQWlDYyxXQUFXO1VBQ1gsYUFBYTtVQUNiLCtDQUF3RDtrQkFBeEQsdUNBQXdEO1VBQ3hELGFBQWE7VUFDYixjQUFjLEVBQUE7O0FBckM1QjtVQXlDYyxrQkFBa0I7VUFDbEIsYUFBYTtVQUNiLGNBQWMsRUFBQTs7QUEzQzVCO1VBK0NjLGtEQUEyRDtrQkFBM0QsMENBQTJELEVBQUE7O0FBL0N6RTtVQW1EYyw4Q0FBdUQ7a0JBQXZELHNDQUF1RCxFQUFBOztBQW5EckU7UUF3RFksdUJBQXVCO1FBQ3ZCLGdCQUFnQixFQUFBOztBQXpENUI7TUE4RFUsdUJBQXVCO01BQ3ZCLGdCQUFnQixFQUFBOztBQU8xQjtFQUNFLGFBQWE7RUFDYixjQUFjO0VBQ2QsVUFBVSxFQUFBOztBQUhaO0lBTUksYUFBYTtJQUNiLG9CQUFvQixFQUFBIiwiZmlsZSI6InNyYy9hcHAvY29udHJhY3RzL2NvbnRyYWN0cy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIjpob3N0IHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxuLmVtcHR5LWNvbnRyYWN0cyB7XHJcbiAgZm9udC1zaXplOiAxLjVyZW07XHJcbn1cclxuXHJcbi53cmFwLXRhYmxlIHtcclxuICBtYXJnaW46IC0zcmVtIC0zcmVtIDAgLTNyZW07XHJcbiAgb3ZlcmZsb3cteDogYXV0bztcclxuXHJcbiAgdGFibGUge1xyXG5cclxuICAgIHRib2R5IHtcclxuXHJcbiAgICAgIHRyIHtcclxuICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XHJcbiAgICAgICAgb3V0bGluZTogbm9uZSAhaW1wb3J0YW50O1xyXG5cclxuICAgICAgICAuY29udHJhY3Qge1xyXG4gICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xyXG4gICAgICAgICAgZGlzcGxheTogZmxleDtcclxuICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XHJcblxyXG4gICAgICAgICAgLmljb24ge1xyXG4gICAgICAgICAgICBmbGV4LXNocmluazogMDtcclxuXHJcbiAgICAgICAgICAgICYubmV3LCAmLmFsZXJ0IHtcclxuICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgICAgICAgICAgICAgdG9wOiAwO1xyXG4gICAgICAgICAgICB9XHJcb
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/contracts/contracts.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / contracts / contracts . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: ContractsComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "ContractsComponent" , function ( ) { return ContractsComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var ContractsComponent = /** @class */ ( function ( ) {
function ContractsComponent ( route , router , variablesService ) {
this . route = route ;
this . router = router ;
this . variablesService = variablesService ;
}
ContractsComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
this . parentRouting = this . route . parent . params . subscribe ( function ( params ) {
if ( params . hasOwnProperty ( 'id' ) ) {
_this . walletId = params [ 'id' ] ;
}
} ) ;
} ;
ContractsComponent . prototype . ngOnDestroy = function ( ) {
this . parentRouting . unsubscribe ( ) ;
} ;
ContractsComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-contracts' ,
template : _ _webpack _require _ _ ( /*! ./contracts.component.html */ "./src/app/contracts/contracts.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./contracts.component.scss */ "./src/app/contracts/contracts.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ActivatedRoute" ] ,
_angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Router" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "VariablesService" ] ] )
] , ContractsComponent ) ;
return ContractsComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/create-wallet/create-wallet.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / create - wallet / create - wallet . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-01-29 12:29:31 +02:00
module . exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/main']\">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>\r\n <span>{{ 'BREADCRUMBS.CREATE_WALLET' | translate }}</span>\r\n </div>\r\n <a class=\"back-btn\" [routerLink]=\"['/main']\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </a>\r\n </div>\r\n\r\n <form class=\"form-create\" [formGroup]=\"createForm\">\r\n\r\n <div class=\"input-block\">\r\n <label for=\"wallet-name\">{{ 'CREATE_WALLET.NAME' | translate }}</label>\r\n <input type=\"text\" id=\"wallet-name\" formControlName=\"name\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n <div class=\"error-block\" *ngIf=\"createForm.controls['name'].invalid && (createForm.controls['name'].dirty || createForm.controls['name'].touched)\">\r\n <div *ngIf=\"createForm.controls['name'].errors['required']\">\r\n {{ 'CREATE_WALLET.FORM_ERRORS.NAME_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"createForm.controls['name'].errors['duplicate']\">\r\n {{ 'CREATE_WALLET.FORM_ERRORS.NAME_DUPLICATE' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"wallet-password\">{{ 'CREATE_WALLET.PASS' | translate }}</label>\r\n <input type=\"password\" id=\"wallet-password\" formControlName=\"password\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"confirm-wallet-password\">{{ 'CREATE_WALLET.CONFIRM' | translate }}</label>\r\n <input type=\"password\" id=\"confirm-wallet-password\" formControlName=\"confirm\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n <div class=\"error-block\" *ngIf=\"createForm.controls['password'].dirty && createForm.controls['confirm'].dirty && createForm.errors\">\r\n <div *ngIf=\"createForm.errors['confirm_mismatch']\">\r\n {{ 'CREATE_WALLET.FORM_ERRORS.CONFIRM_NOT_MATCH' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wrap-buttons\">\r\n <button type=\"button\" class=\"transparent-button\" *ngIf=\"walletSaved\" disabled><i class=\"icon\"></i>{{createForm.controls['name'].value}}</button>\r\n <button type=\"button\" class=\"blue-button select-button\" (click)=\"saveWallet()\" [disabled]=\"!createForm.valid\" *ngIf=\"!walletSaved\">{{ 'CREATE_WALLET.BUTTON_SELECT' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button create-button\" (click)=\"createWallet()\" [disabled]=\"!walletSaved\">{{ 'CREATE_WALLET.BUTTON_CREATE' | translate }}</button>\r\n </div>\r\n\r\n </form>\r\n\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/create-wallet/create-wallet.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / create - wallet / create - wallet . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ".form-create {\n margin: 2.4rem 0;\n width: 50%; }\n .form-create .wrap-buttons {\n display: flex;\n margin: 2.5rem -0.7rem; }\n .form-create .wrap-buttons button {\n margin: 0 0.7rem; }\n .form-create .wrap-buttons button.transparent-button {\n flex-basis: 50%; }\n .form-create .wrap-buttons button.select-button {\n flex-basis: 60%; }\n .form-create .wrap-buttons button.create-button {\n flex: 1 1 50%; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvY3JlYXRlLXdhbGxldC9EOlxcUHJvamVjdHNcXFphbm9cXHNyY1xcZ3VpXFxxdC1kYWVtb25cXGh0bWxfc291cmNlL3NyY1xcYXBwXFxjcmVhdGUtd2FsbGV0XFxjcmVhdGUtd2FsbGV0LmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZ0JBQWdCO0VBQ2hCLFVBQVUsRUFBQTtFQUZaO0lBS0ksYUFBYTtJQUNiLHNCQUFzQixFQUFBO0VBTjFCO01BU00sZ0JBQWdCLEVBQUE7RUFUdEI7UUFZUSxlQUFlLEVBQUE7RUFadkI7UUFnQlEsZUFBZSxFQUFBO0VBaEJ2QjtRQW9CUSxhQUFhLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9jcmVhdGUtd2FsbGV0L2NyZWF0ZS13YWxsZXQuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuZm9ybS1jcmVhdGUge1xyXG4gIG1hcmdpbjogMi40cmVtIDA7XHJcbiAgd2lkdGg6IDUwJTtcclxuXHJcbiAgLndyYXAtYnV0dG9ucyB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgbWFyZ2luOiAyLjVyZW0gLTAuN3JlbTtcclxuXHJcbiAgICBidXR0b24ge1xyXG4gICAgICBtYXJnaW46IDAgMC43cmVtO1xyXG5cclxuICAgICAgJi50cmFuc3BhcmVudC1idXR0b24ge1xyXG4gICAgICAgIGZsZXgtYmFzaXM6IDUwJTtcclxuICAgICAgfVxyXG5cclxuICAgICAgJi5zZWxlY3QtYnV0dG9uIHtcclxuICAgICAgICBmbGV4LWJhc2lzOiA2MCU7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgICYuY3JlYXRlLWJ1dHRvbiB7XHJcbiAgICAgICAgZmxleDogMSAxIDUwJTtcclxuICAgICAgfVxyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0= */"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/create-wallet/create-wallet.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / create - wallet / create - wallet . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: CreateWalletComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CreateWalletComponent" , function ( ) { return CreateWalletComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2019-01-09 15:25:03 +02:00
/* harmony import */ var _helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _models _wallet _model _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/models/wallet.model */ "./src/app/_helpers/models/wallet.model.ts" ) ;
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-09 15:25:03 +02:00
2018-12-27 18:50:45 +03:00
var CreateWalletComponent = /** @class */ ( function ( ) {
2019-01-09 15:25:03 +02:00
function CreateWalletComponent ( router , backend , variablesService , modalService , ngZone , translate ) {
2018-12-27 18:50:45 +03:00
var _this = this ;
this . router = router ;
this . backend = backend ;
this . variablesService = variablesService ;
2019-01-09 15:25:03 +02:00
this . modalService = modalService ;
2018-12-27 18:50:45 +03:00
this . ngZone = ngZone ;
2019-01-09 15:25:03 +02:00
this . translate = translate ;
2018-12-27 18:50:45 +03:00
this . createForm = new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormGroup" ] ( {
name : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' , [ _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required , function ( g ) {
for ( var i = 0 ; i < _this . variablesService . wallets . length ; i ++ ) {
if ( g . value === _this . variablesService . wallets [ i ] . name ) {
return { 'duplicate' : true } ;
}
}
return null ;
} ] ) ,
password : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' ) ,
confirm : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' )
} , function ( g ) {
return g . get ( 'password' ) . value === g . get ( 'confirm' ) . value ? null : { 'confirm_mismatch' : true } ;
} ) ;
this . wallet = {
id : ''
} ;
this . walletSaved = false ;
}
CreateWalletComponent . prototype . ngOnInit = function ( ) {
} ;
CreateWalletComponent . prototype . createWallet = function ( ) {
2019-02-19 09:51:20 +02:00
var _this = this ;
this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/seed-phrase' ] , { queryParams : { wallet _id : _this . wallet . id } } ) ;
} ) ;
2018-12-27 18:50:45 +03:00
} ;
CreateWalletComponent . prototype . saveWallet = function ( ) {
var _this = this ;
if ( this . createForm . valid ) {
2019-01-09 15:25:03 +02:00
this . backend . saveFileDialog ( this . translate . instant ( 'CREATE_WALLET.TITLE_SAVE' ) , '*' , this . variablesService . settings . default _path , function ( file _status , file _data ) {
2018-12-27 18:50:45 +03:00
if ( file _status ) {
_this . variablesService . settings . default _path = file _data . path . substr ( 0 , file _data . path . lastIndexOf ( '/' ) ) ;
_this . backend . generateWallet ( file _data . path , _this . createForm . get ( 'password' ) . value , function ( generate _status , generate _data , errorCode ) {
if ( generate _status ) {
_this . wallet . id = generate _data . wallet _id ;
2019-01-09 15:25:03 +02:00
_this . variablesService . opening _wallet = new _helpers _models _wallet _model _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "Wallet" ] ( generate _data . wallet _id , _this . createForm . get ( 'name' ) . value , _this . createForm . get ( 'password' ) . value , generate _data [ 'wi' ] . path , generate _data [ 'wi' ] . address , generate _data [ 'wi' ] . balance , generate _data [ 'wi' ] . unlocked _balance , generate _data [ 'wi' ] . mined _total , generate _data [ 'wi' ] . tracking _hey ) ;
2018-12-27 18:50:45 +03:00
_this . ngZone . run ( function ( ) {
_this . walletSaved = true ;
} ) ;
}
else {
if ( errorCode && errorCode === 'ALREADY_EXISTS' ) {
2019-01-09 15:25:03 +02:00
_this . modalService . prepareModal ( 'error' , 'CREATE_WALLET.ERROR_CANNOT_SAVE_TOP' ) ;
2018-12-27 18:50:45 +03:00
}
else {
2019-01-09 15:25:03 +02:00
_this . modalService . prepareModal ( 'error' , 'CREATE_WALLET.ERROR_CANNOT_SAVE_SYSTEM' ) ;
2018-12-27 18:50:45 +03:00
}
}
} ) ;
}
} ) ;
}
} ;
CreateWalletComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-create-wallet' ,
template : _ _webpack _require _ _ ( /*! ./create-wallet.component.html */ "./src/app/create-wallet/create-wallet.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./create-wallet.component.scss */ "./src/app/create-wallet/create-wallet.component.scss" ) ]
} ) ,
2019-01-09 15:25:03 +02:00
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "Router" ] ,
2018-12-27 18:50:45 +03:00
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "VariablesService" ] ,
2019-01-09 15:25:03 +02:00
_helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "ModalService" ] ,
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ,
_ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "TranslateService" ] ] )
2018-12-27 18:50:45 +03:00
] , CreateWalletComponent ) ;
return CreateWalletComponent ;
} ( ) ) ;
2019-02-15 16:28:31 +02:00
/***/ } ) ,
/***/ "./src/app/edit-alias/edit-alias.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / edit - alias / edit - alias . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-02-20 17:25:26 +02:00
module . exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/wallet/' + wallet.wallet_id + '/history']\">{{ wallet.name }}</span>\r\n <span>{{ 'BREADCRUMBS.EDIT_ALIAS' | translate }}</span>\r\n </div>\r\n <button class=\"back-btn\" (click)=\"back()\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </button>\r\n </div>\r\n\r\n <form class=\"form-edit\">\r\n\r\n <div class=\"input-block alias-name\">\r\n <label for=\"alias-name\">\r\n {{ 'EDIT_ALIAS.NAME.LABEL' | translate }}\r\n </label>\r\n <input type=\"text\" id=\"alias-name\" [value]=\"alias.name\" placeholder=\"{{ 'EDIT_ALIAS.NAME.PLACEHOLDER' | translate }}\" readonly>\r\n </div>\r\n\r\n <div class=\"input-block textarea\">\r\n <label for=\"alias-comment\">\r\n {{ 'EDIT_ALIAS.COMMENT.LABEL' | translate }}\r\n </label>\r\n <textarea id=\"alias-comment\" [(ngModel)]=\"alias.comment\" [ngModelOptions]=\"{standalone: true}\" placeholder=\"{{ 'EDIT_ALIAS.COMMENT.PLACEHOLDER' | translate }}\" (contextmenu)=\"variablesService.onContextMenu($event)\"></textarea>\r\n <div class=\"error-block\" *ngIf=\"alias.comment.length > 0 && notEnoughMoney\">\r\n {{ 'EDIT_ALIAS.FORM_ERRORS.NO_MONEY' | translate }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"alias-cost\">{{ \"EDIT_ALIAS.COST\" | translate : {value: variablesService.default_fee, currency: variablesService.defaultCurrency} }}</div>\r\n\r\n <div class=\"wrap-buttons\">\r\n <button type=\"button\" class=\"blue-button\" (click)=\"updateAlias()\" [disabled]=\"notEnoughMoney || oldAliasComment === alias.comment\">{{ 'EDIT_ALIAS.BUTTON_EDIT' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button\" (click)=\"back()\">{{ 'EDIT_ALIAS.BUTTON_CANCEL' | translate }}</button>\r\n </div>\r\n\r\n </form>\r\n\r\n</div>\r\n\r\n\r\n"
2019-02-15 16:28:31 +02:00
/***/ } ) ,
/***/ "./src/app/edit-alias/edit-alias.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / edit - alias / edit - alias . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ".form-edit {\n margin: 2.4rem 0; }\n .form-edit .alias-name {\n width: 50%; }\n .form-edit .alias-cost {\n font-size: 1.3rem;\n margin-top: 2rem; }\n .form-edit .wrap-buttons {\n display: flex;\n justify-content: space-between;\n margin: 2.5rem -0.7rem; }\n .form-edit .wrap-buttons button {\n margin: 0 0.7rem;\n width: 15rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvZWRpdC1hbGlhcy9EOlxcUHJvamVjdHNcXFphbm9cXHNyY1xcZ3VpXFxxdC1kYWVtb25cXGh0bWxfc291cmNlL3NyY1xcYXBwXFxlZGl0LWFsaWFzXFxlZGl0LWFsaWFzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZ0JBQWdCLEVBQUE7RUFEbEI7SUFJSSxVQUFVLEVBQUE7RUFKZDtJQVFJLGlCQUFpQjtJQUNqQixnQkFBZ0IsRUFBQTtFQVRwQjtJQWFJLGFBQWE7SUFDYiw4QkFBOEI7SUFDOUIsc0JBQXNCLEVBQUE7RUFmMUI7TUFrQk0sZ0JBQWdCO01BQ2hCLFlBQVksRUFBQSIsImZpbGUiOiJzcmMvYXBwL2VkaXQtYWxpYXMvZWRpdC1hbGlhcy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5mb3JtLWVkaXQge1xyXG4gIG1hcmdpbjogMi40cmVtIDA7XHJcblxyXG4gIC5hbGlhcy1uYW1lIHtcclxuICAgIHdpZHRoOiA1MCU7XHJcbiAgfVxyXG5cclxuICAuYWxpYXMtY29zdCB7XHJcbiAgICBmb250LXNpemU6IDEuM3JlbTtcclxuICAgIG1hcmdpbi10b3A6IDJyZW07XHJcbiAgfVxyXG5cclxuICAud3JhcC1idXR0b25zIHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XHJcbiAgICBtYXJnaW46IDIuNXJlbSAtMC43cmVtO1xyXG5cclxuICAgIGJ1dHRvbiB7XHJcbiAgICAgIG1hcmdpbjogMCAwLjdyZW07XHJcbiAgICAgIHdpZHRoOiAxNXJlbTtcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19 */"
2019-02-15 16:28:31 +02:00
/***/ } ) ,
/***/ "./src/app/edit-alias/edit-alias.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / edit - alias / edit - alias . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: EditAliasComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "EditAliasComponent" , function ( ) { return EditAliasComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _common _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
/* harmony import */ var _helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var EditAliasComponent = /** @class */ ( function ( ) {
2019-02-19 09:51:20 +02:00
function EditAliasComponent ( location , router , backend , variablesService , modalService , ngZone ) {
2019-02-15 16:28:31 +02:00
this . location = location ;
this . router = router ;
this . backend = backend ;
this . variablesService = variablesService ;
this . modalService = modalService ;
2019-02-19 09:51:20 +02:00
this . ngZone = ngZone ;
this . requestProcessing = false ;
2019-02-15 16:28:31 +02:00
}
EditAliasComponent . prototype . ngOnInit = function ( ) {
this . wallet = this . variablesService . currentWallet ;
var alias = this . backend . getWalletAlias ( this . wallet . address ) ;
this . alias = {
name : alias . name ,
address : alias . address ,
comment : alias . comment
} ;
2019-02-19 09:51:20 +02:00
this . oldAliasComment = alias . comment ;
2019-02-15 16:28:31 +02:00
this . notEnoughMoney = this . wallet . unlocked _balance . isLessThan ( this . variablesService . default _fee _big ) ;
} ;
EditAliasComponent . prototype . updateAlias = function ( ) {
var _this = this ;
2019-02-19 09:51:20 +02:00
if ( this . requestProcessing || this . notEnoughMoney || this . oldAliasComment === this . alias . comment ) {
2019-02-15 16:28:31 +02:00
return ;
}
2019-02-19 09:51:20 +02:00
this . requestProcessing = true ;
2019-02-15 16:28:31 +02:00
this . backend . updateAlias ( this . wallet . wallet _id , this . alias , this . variablesService . default _fee , function ( status ) {
if ( status ) {
_this . modalService . prepareModal ( 'success' , '' ) ;
_this . wallet . alias [ 'comment' ] = _this . alias . comment ;
2019-02-19 09:51:20 +02:00
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/wallet/' + _this . wallet . wallet _id ] ) ;
} ) ;
2019-02-15 16:28:31 +02:00
}
2019-02-19 09:51:20 +02:00
_this . requestProcessing = false ;
2019-02-15 16:28:31 +02:00
} ) ;
} ;
EditAliasComponent . prototype . back = function ( ) {
this . location . back ( ) ;
} ;
EditAliasComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-edit-alias' ,
template : _ _webpack _require _ _ ( /*! ./edit-alias.component.html */ "./src/app/edit-alias/edit-alias.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./edit-alias.component.scss */ "./src/app/edit-alias/edit-alias.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _common _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Location" ] ,
_angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Router" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "VariablesService" ] ,
2019-02-19 09:51:20 +02:00
_helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "ModalService" ] ,
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ] )
2019-02-15 16:28:31 +02:00
] , EditAliasComponent ) ;
return EditAliasComponent ;
} ( ) ) ;
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/history/history.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / history / history . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-02-22 16:21:44 +02:00
module . exports = "<div class=\"wrap-table\">\r\n\r\n <table class=\"history-table\">\r\n <thead>\r\n <tr #head (window:resize)=\"calculateWidth()\">\r\n <th>{{ 'HISTORY.STATUS' | translate }}</th>\r\n <th>{{ 'HISTORY.DATE' | translate }}</th>\r\n <th>{{ 'HISTORY.AMOUNT' | translate }}</th>\r\n <th>{{ 'HISTORY.FEE' | translate }}</th>\r\n <th>{{ 'HISTORY.ADDRESS' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let item of variablesService.currentWallet.history\">\r\n <tr (click)=\"openDetails(item.tx_hash)\">\r\n <td>\r\n <div class=\"status\" [class.send]=\"!item.is_income\" [class.received]=\"item.is_income\">\r\n <ng-container *ngIf=\"variablesService.height_app - item.height < 10 || item.height === 0 && item.timestamp > 0\">\r\n <div class=\"confirmation\" tooltip=\"{{ 'HISTORY.STATUS_TOOLTIP' | translate : {'current': getHeight(item)/10, 'total': 10} }}\" placement=\"bottom-left\" tooltipClass=\"table-tooltip\" [delay]=\"500\">\r\n <div class=\"fill\" [style.height]=\"getHeight(item) + '%'\"></div>\r\n </div>\r\n </ng-container>\r\n <i class=\"icon\"></i>\r\n <span>{{ (item.is_income ? 'HISTORY.RECEIVED' : 'HISTORY.SEND') | translate }}</span>\r\n </div>\r\n </td>\r\n <td>{{item.timestamp * 1000 | date : 'dd-MM-yyyy HH:mm'}}</td>\r\n <td>\r\n <span *ngIf=\"item.sortAmount && item.sortAmount.toString() !== '0'\">{{item.sortAmount | intToMoney}} {{variablesService.defaultCurrency}}</span>\r\n </td>\r\n <td>\r\n <span *ngIf=\"item.sortFee && item.sortFee.toString() !== '0'\">{{item.sortFee | intToMoney}} {{variablesService.defaultCurrency}}</span>\r\n </td>\r\n <td class=\"remote-address\">\r\n <span *ngIf=\"!(item.tx_type === 0 && item.remote_addresses && item.remote_addresses[0])\">{{item | historyTypeMessages}}</span>\r\n <span *ngIf=\"item.tx_type === 0 && item.remote_addresses && item.remote_addresses[0]\" (contextmenu)=\"variablesService.onContextMenuOnlyCopy($event, item.remote_addresses[0])\">{{item.remote_addresses[0]}}</span>\r\n </td>\r\n </tr>\r\n <tr class=\"transaction-details\" [class.open]=\"item.tx_hash === openedDetails\">\r\n <td colspan=\"5\">\r\n <ng-container *ngIf=\"item.tx_hash === openedDetails\">\r\n <app-transaction-details [transaction]=\"item\" [sizes]=\"calculatedWidth\"></app-transaction-details>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/history/history.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / history / history . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = " : host { \ n width : 100 % ; } \ n \ n . wrap - table { \ n margin : - 3 rem ; } \ n \ n . wrap - table table tbody tr td { \ n min - width : 10 rem ; } \ n \ n . wrap - table table tbody tr . status { \ n position : relative ; \ n display : flex ; \ n align - items : center ; } \ n \ n . wrap - table table tbody tr . status . confirmation { \ n position : absolute ; \ n top : 50 % ; \ n left : - 2 rem ; \ n - webkit - transform : translateY ( - 50 % ) ; \ n transform : translateY ( - 50 % ) ; \ n display : flex ; \ n align - items : flex - end ; \ n width : 0.7 rem ; \ n height : 1.5 rem ; } \ n \ n . wrap - table table tbody tr . status . confirmation . fill { \ n width : 100 % ; } \ n \ n . wrap - table table tbody tr . status . icon { \ n margin - right : 1 rem ; \ n width : 1.7 rem ; \ n height : 1.7 rem ; } \ n \ n . wrap - table table tbody tr . status . send . icon { \ n - webkit - mask : url ( 'send.svg' ) no - repeat center ; \ n mask : url ( 'send.svg' ) no - repeat center ; } \ n \ n . wrap - table table tbody tr . status . received . icon { \ n - webkit - mask : url ( 'receive.svg' ) no - repeat center ; \ n mask : url ( 'receive.svg' ) no - repeat center ; } \ n \ n . wrap - table table tbody tr . remote - address { \ n overflow : hidden ; \ n text - overflow : ellipsis ; \ n max - width : 25 vw ; } \ n \ n . wrap - table table tbody tr : not ( . transaction - details ) { \ n cursor : pointer ; } \ n \ n . wrap - table table tbody tr . transaction - details { \ n transition : 0.5 s height linear , 0 s font - size ; \ n transition - delay : 0 s , 0.5 s ; \ n height : 0 ; } \ n \ n . wrap - table table tbody tr . transaction - details . open { \ n height : 13.2 rem ; } \ n \ n . wrap - table table tbody tr . transaction - details td { \ n position : relative ; \ n overflow : hidden ; \ n line - height : inherit ; \ n padding - top : 0 ; \ n padding - bottom : 0 ; } \ n \ n / * # sourceMappingURL = data : application / json ; base64 , eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvaGlzdG9yeS9EOlxcUHJvamVjdHNcXFphbm9cXHNyY1xcZ3VpXFxxdC1kYWVtb25cXGh0bWxfc291cmNlL3NyY1xcYXBwXFxoaXN0b3J5XFxoaXN0b3J5LmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsV0FBVyxFQUFBOztBQUdiO0VBQ0UsYUFBYSxFQUFBOztBQURmO0lBVVUsZ0JBQWdCLEVBQUE7O0FBVjFCO0lBY1Usa0JBQWtCO0lBQ2xCLGFBQWE7SUFDYixtQkFBbUIsRUFBQTs7QUFoQjdCO01BbUJZLGtCQUFrQjtNQUNsQixRQUFRO01BQ1IsV0FBVztNQUNYLG1DQUEyQjtjQUEzQiwyQkFBMkI7TUFDM0IsYUFBYTtNQUNiLHFCQUFxQjtNQUNyQixhQUFhO01BQ2IsY0FBYyxFQUFBOztBQTFCMUI7UUE2QmMsV0FBVyxFQUFBOztBQTdCekI7TUFrQ1ksa0JBQWtCO01BQ2xCLGFBQWE7TUFDYixjQUFjLEVBQUE7O0FBcEMxQjtNQTBDYyw4Q0FBdUQ7Y0FBdkQsc0NBQXVELEVBQUE7O0FBMUNyRTtNQWlEYyxpREFBMEQ7Y0FBMUQseUNBQTBELEVBQUE7O0FBakR4RTtJQXVEVSxnQkFBZ0I7SUFDaEIsdUJBQXVCO0lBQ3ZCLGVBQWUsRUFBQTs7QUF6RHpCO0lBNkRVLGVBQWUsRUFBQTs7QUE3RHpCO0lBa0VVLDRDQUE0QztJQUM1QywwQkFBMEI7SUFDMUIsU0FBUyxFQUFBOztBQXBFbkI7TUF1RVksZUFBZSxFQUFBOztBQXZFM0I7TUEyRVksa0JBQWtCO01BQ2xCLGdCQUFnQjtNQUNoQixvQkFBb0I7TUFDcEIsY0FBYztNQUNkLGlCQUFpQixFQUFBIiwiZmlsZSI6InNyYy9hcHAvaGlzdG9yeS9oaXN0b3J5LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiOmhvc3Qge1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4ud3JhcC10YWJsZSB7XHJcbiAgbWFyZ2luOiAtM3JlbTtcclxuXHJcbiAgdGFibGUge1xyXG5cclxuICAgIHRib2R5IHtcclxuXHJcbiAgICAgIHRyIHtcclxuXHJcbiAgICAgICAgdGQge1xyXG4gICAgICAgICAgbWluLXdpZHRoOiAxMHJlbTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC5zdGF0dXMge1xyXG4gICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xyXG4gICAgICAgICAgZGlzcGxheTogZmxleDtcclxuICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XHJcblxyXG4gICAgICAgICAgLmNvbmZpcm1hdGlvbiB7XHJcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICAgICAgICAgICAgdG9wOiA1MCU7XHJcbiAgICAgICAgICAgIGxlZnQ6IC0ycmVtO1xyXG4gICAgICAgICAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoLTUwJSk7XHJcbiAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBmbGV4LWVuZDtcclxuICAgICAgICAgICAgd2lkdGg6IDAuN3JlbTtcclxuICAgICAgICAgICAgaGVpZ2h0OiAxLjVyZW07XHJcblxyXG4gICAgICAgICAgICAuZmlsbCB7XHJcbiAgICAgICAgICAgICAgd2lkdGg6IDEwMCU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAuaWNvbiB7XHJcbiAgICAgICAgICAgIG1hcmdpbi1yaWdodDogMXJlbTtcclxuICAgICAgICAgICAgd2lkdGg6IDEuN3JlbTtcclxuICAgICAgICAgICAgaGVpZ2h0OiAxLjdyZW07XHJcbiAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgJi5zZW5kICB7XHJcblxyXG4gICAgICAgICAgICAuaWNvbiB7XHJcbiAgICAgICAgICAgICAgbWFzazog
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/history/history.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / history / history . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: HistoryComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "HistoryComponent" , function ( ) { return HistoryComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
2019-01-09 15:25:03 +02:00
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2019-02-14 17:28:29 +02:00
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-02-14 17:28:29 +02:00
2018-12-27 18:50:45 +03:00
var HistoryComponent = /** @class */ ( function ( ) {
2019-02-14 17:28:29 +02:00
function HistoryComponent ( route , variablesService ) {
this . route = route ;
2018-12-27 18:50:45 +03:00
this . variablesService = variablesService ;
2019-01-21 18:46:48 +02:00
this . openedDetails = false ;
2019-01-22 17:02:50 +02:00
this . calculatedWidth = [ ] ;
2018-12-27 18:50:45 +03:00
}
2019-02-14 17:28:29 +02:00
HistoryComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
this . parentRouting = this . route . parent . params . subscribe ( function ( ) {
_this . openedDetails = false ;
} ) ;
} ;
2019-01-22 17:02:50 +02:00
HistoryComponent . prototype . ngAfterViewChecked = function ( ) {
this . calculateWidth ( ) ;
} ;
2018-12-27 18:50:45 +03:00
HistoryComponent . prototype . getHeight = function ( item ) {
if ( ( this . variablesService . height _app - item . height >= 10 && item . height !== 0 ) || ( item . is _mining === true && item . height === 0 ) ) {
return 100 ;
}
else {
if ( item . height === 0 || this . variablesService . height _app - item . height < 0 ) {
return 0 ;
}
else {
return ( this . variablesService . height _app - item . height ) * 10 ;
}
}
} ;
2019-02-19 17:33:37 +02:00
HistoryComponent . prototype . openDetails = function ( tx _hash ) {
if ( tx _hash === this . openedDetails ) {
2019-01-21 18:46:48 +02:00
this . openedDetails = false ;
}
else {
2019-02-19 17:33:37 +02:00
this . openedDetails = tx _hash ;
2019-01-21 18:46:48 +02:00
}
2018-12-27 18:50:45 +03:00
} ;
2019-01-22 17:02:50 +02:00
HistoryComponent . prototype . calculateWidth = function ( ) {
this . calculatedWidth = [ ] ;
this . calculatedWidth . push ( this . head . nativeElement . childNodes [ 0 ] . clientWidth ) ;
this . calculatedWidth . push ( this . head . nativeElement . childNodes [ 1 ] . clientWidth + this . head . nativeElement . childNodes [ 2 ] . clientWidth ) ;
this . calculatedWidth . push ( this . head . nativeElement . childNodes [ 3 ] . clientWidth ) ;
this . calculatedWidth . push ( this . head . nativeElement . childNodes [ 4 ] . clientWidth ) ;
} ;
2019-02-14 17:28:29 +02:00
HistoryComponent . prototype . ngOnDestroy = function ( ) {
this . parentRouting . unsubscribe ( ) ;
} ;
2019-01-22 17:02:50 +02:00
_ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ViewChild" ] ) ( 'head' ) ,
_ _metadata ( "design:type" , _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ElementRef" ] )
] , HistoryComponent . prototype , "head" , void 0 ) ;
2018-12-27 18:50:45 +03:00
HistoryComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-history' ,
template : _ _webpack _require _ _ ( /*! ./history.component.html */ "./src/app/history/history.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./history.component.scss */ "./src/app/history/history.component.scss" ) ]
} ) ,
2019-02-14 17:28:29 +02:00
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "ActivatedRoute" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "VariablesService" ] ] )
2018-12-27 18:50:45 +03:00
] , HistoryComponent ) ;
return HistoryComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/login/login.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / login / login . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-01-29 12:29:31 +02:00
module . exports = "<div class=\"content\">\r\n\r\n <div class=\"wrap-login\">\r\n\r\n <div class=\"logo\"></div>\r\n\r\n <form *ngIf=\"type === 'reg'\" class=\"form-login\" [formGroup]=\"regForm\" (ngSubmit)=\"onSubmitCreatePass()\">\r\n\r\n <div class=\"input-block\">\r\n <label for=\"master-pass\">{{ 'LOGIN.SETUP_MASTER_PASS' | translate }}</label>\r\n <input type=\"password\" id=\"master-pass\" formControlName=\"password\">\r\n <div class=\"error-block\" *ngIf=\"regForm.controls['password'].invalid && (regForm.controls['password'].dirty || regForm.controls['password'].touched)\">\r\n <div *ngIf=\"regForm.controls['password'].errors['required']\">\r\n {{ 'LOGIN.FORM_ERRORS.PASS_REQUIRED' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"confirm-pass\">{{ 'LOGIN.SETUP_CONFIRM_PASS' | translate }}</label>\r\n <input type=\"password\" id=\"confirm-pass\" formControlName=\"confirmation\">\r\n <div class=\"error-block\" *ngIf=\"regForm.controls['confirmation'].invalid && (regForm.controls['confirmation'].dirty || regForm.controls['confirmation'].touched)\">\r\n <div *ngIf=\"regForm.controls['confirmation'].errors['required']\">\r\n {{ 'LOGIN.FORM_ERRORS.CONFIRM_REQUIRED' | translate }}\r\n </div>\r\n </div>\r\n <div class=\"error-block\" *ngIf=\"regForm.controls['password'].dirty && regForm.controls['confirmation'].dirty && regForm.errors\">\r\n <div *ngIf=\"regForm.errors['mismatch']\">\r\n {{ 'LOGIN.FORM_ERRORS.MISMATCH' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <button type=\"submit\" class=\"blue-button\">{{ 'LOGIN.BUTTON_NEXT' | translate }}</button>\r\n\r\n </form>\r\n\r\n <form *ngIf=\"type !== 'reg'\" class=\"form-login\" [formGroup]=\"authForm\" (ngSubmit)=\"onSubmitAuthPass()\">\r\n\r\n <div class=\"input-block\">\r\n <label for=\"master-pass-login\">{{ 'LOGIN.MASTER_PASS' | translate }}</label>\r\n <input type=\"password\" id=\"master-pass-login\" formControlName=\"password\" autofocus>\r\n <div class=\"error-block\" *ngIf=\"authForm.controls['password'].invalid && (authForm.controls['password'].dirty || authForm.controls['password'].touched)\">\r\n <div *ngIf=\"authForm.controls['password'].errors['required']\">\r\n {{ 'LOGIN.FORM_ERRORS.PASS_REQUIRED' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <button type=\"submit\" class=\"blue-button\">{{ 'LOGIN.BUTTON_NEXT' | translate }}</button>\r\n\r\n </form>\r\n\r\n </div>\r\n\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/login/login.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / login / login . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ":host {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%; }\n :host .content {\n display: flex; }\n :host .content .wrap-login {\n margin: auto;\n width: 100%;\n max-width: 40rem; }\n :host .content .wrap-login .logo {\n background: url('logo.svg') no-repeat center;\n width: 100%;\n height: 20rem; }\n :host .content .wrap-login .form-login {\n display: flex;\n flex-direction: column; }\n :host .content .wrap-login .form-login button {\n margin: 2.5rem auto;\n width: 100%;\n max-width: 15rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvbG9naW4vRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxcbG9naW5cXGxvZ2luLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZUFBZTtFQUNmLE1BQU07RUFDTixPQUFPO0VBQ1AsV0FBVztFQUNYLFlBQVksRUFBQTtFQUxkO0lBUUksYUFBYSxFQUFBO0VBUmpCO01BV00sWUFBWTtNQUNaLFdBQVc7TUFDWCxnQkFBZ0IsRUFBQTtFQWJ0QjtRQWdCUSw0Q0FBNkQ7UUFDN0QsV0FBVztRQUNYLGFBQWEsRUFBQTtFQWxCckI7UUFzQlEsYUFBYTtRQUNiLHNCQUFzQixFQUFBO0VBdkI5QjtVQTBCVSxtQkFBbUI7VUFDbkIsV0FBVztVQUNYLGdCQUFnQixFQUFBIiwiZmlsZSI6InNyYy9hcHAvbG9naW4vbG9naW4uY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCB7XHJcbiAgcG9zaXRpb246IGZpeGVkO1xyXG4gIHRvcDogMDtcclxuICBsZWZ0OiAwO1xyXG4gIHdpZHRoOiAxMDAlO1xyXG4gIGhlaWdodDogMTAwJTtcclxuXHJcbiAgLmNvbnRlbnQge1xyXG4gICAgZGlzcGxheTogZmxleDtcclxuXHJcbiAgICAud3JhcC1sb2dpbiB7XHJcbiAgICAgIG1hcmdpbjogYXV0bztcclxuICAgICAgd2lkdGg6IDEwMCU7XHJcbiAgICAgIG1heC13aWR0aDogNDByZW07XHJcblxyXG4gICAgICAubG9nbyB7XHJcbiAgICAgICAgYmFja2dyb3VuZDogdXJsKC4uLy4uL2Fzc2V0cy9pY29ucy9sb2dvLnN2Zykgbm8tcmVwZWF0IGNlbnRlcjtcclxuICAgICAgICB3aWR0aDogMTAwJTtcclxuICAgICAgICBoZWlnaHQ6IDIwcmVtO1xyXG4gICAgICB9XHJcblxyXG4gICAgICAuZm9ybS1sb2dpbiB7XHJcbiAgICAgICAgZGlzcGxheTogZmxleDtcclxuICAgICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xyXG5cclxuICAgICAgICBidXR0b24ge1xyXG4gICAgICAgICAgbWFyZ2luOiAyLjVyZW0gYXV0bztcclxuICAgICAgICAgIHdpZHRoOiAxMDAlO1xyXG4gICAgICAgICAgbWF4LXdpZHRoOiAxNXJlbTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19 */"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/login/login.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / login / login . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: LoginComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "LoginComponent" , function ( ) { return LoginComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2019-01-09 15:25:03 +02:00
/* harmony import */ var _helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
/* harmony import */ var _helpers _models _wallet _model _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/models/wallet.model */ "./src/app/_helpers/models/wallet.model.ts" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-09 15:25:03 +02:00
2018-12-27 18:50:45 +03:00
var LoginComponent = /** @class */ ( function ( ) {
2019-01-09 15:25:03 +02:00
function LoginComponent ( route , router , backend , variablesService , modalService , ngZone ) {
2018-12-27 18:50:45 +03:00
this . route = route ;
this . router = router ;
this . backend = backend ;
this . variablesService = variablesService ;
2019-01-09 15:25:03 +02:00
this . modalService = modalService ;
2018-12-27 18:50:45 +03:00
this . ngZone = ngZone ;
this . regForm = new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormGroup" ] ( {
password : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' , _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required ) ,
confirmation : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' , _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required )
} , function ( g ) {
return g . get ( 'password' ) . value === g . get ( 'confirmation' ) . value ? null : { 'mismatch' : true } ;
} ) ;
this . authForm = new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormGroup" ] ( {
password : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' , _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required )
} ) ;
this . type = 'reg' ;
}
LoginComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
2019-01-09 15:25:03 +02:00
this . queryRouting = this . route . queryParams . subscribe ( function ( params ) {
2018-12-27 18:50:45 +03:00
if ( params . type ) {
_this . type = params . type ;
}
} ) ;
} ;
LoginComponent . prototype . onSubmitCreatePass = function ( ) {
var _this = this ;
if ( this . regForm . valid ) {
this . variablesService . appPass = this . regForm . get ( 'password' ) . value ;
this . backend . storeSecureAppData ( function ( status , data ) {
if ( status ) {
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/' ] ) ;
} ) ;
}
else {
console . log ( data [ 'error_code' ] ) ;
}
} ) ;
}
} ;
LoginComponent . prototype . onSubmitAuthPass = function ( ) {
var _this = this ;
if ( this . authForm . valid ) {
var appPass _1 = this . authForm . get ( 'password' ) . value ;
this . backend . getSecureAppData ( { pass : appPass _1 } , function ( status , data ) {
2019-01-09 15:25:03 +02:00
if ( ! data . error _code ) {
2018-12-27 18:50:45 +03:00
_this . variablesService . startCountdown ( ) ;
_this . variablesService . appPass = appPass _1 ;
if ( _this . variablesService . wallets . length ) {
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/wallet/' + _this . variablesService . wallets [ 0 ] . wallet _id ] ) ;
} ) ;
return ;
}
if ( Object . keys ( data ) . length !== 0 ) {
var openWallets _1 = 0 ;
var runWallets _1 = 0 ;
data . forEach ( function ( wallet , wallet _index ) {
_this . backend . openWallet ( wallet . path , wallet . pass , true , function ( open _status , open _data ) {
if ( open _status ) {
openWallets _1 ++ ;
_this . backend . runWallet ( open _data . wallet _id , function ( run _status ) {
if ( run _status ) {
runWallets _1 ++ ;
_this . ngZone . run ( function ( ) {
2019-01-09 15:25:03 +02:00
var new _wallet = new _helpers _models _wallet _model _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "Wallet" ] ( open _data . wallet _id , wallet . name , wallet . pass , open _data [ 'wi' ] . path , open _data [ 'wi' ] . address , open _data [ 'wi' ] . balance , open _data [ 'wi' ] . unlocked _balance , open _data [ 'wi' ] . mined _total , open _data [ 'wi' ] . tracking _hey ) ;
2019-02-06 17:57:20 +02:00
new _wallet . alias = _this . backend . getWalletAlias ( new _wallet . address ) ;
2018-12-27 18:50:45 +03:00
if ( open _data . recent _history && open _data . recent _history . history ) {
new _wallet . prepareHistory ( open _data . recent _history . history ) ;
}
_this . backend . getContracts ( open _data . wallet _id , function ( contracts _status , contracts _data ) {
if ( contracts _status && contracts _data . hasOwnProperty ( 'contracts' ) ) {
_this . ngZone . run ( function ( ) {
new _wallet . prepareContractsAfterOpen ( contracts _data . contracts , _this . variablesService . exp _med _ts , _this . variablesService . height _app , _this . variablesService . settings . viewedContracts , _this . variablesService . settings . notViewedContracts ) ;
} ) ;
}
} ) ;
_this . variablesService . wallets . push ( new _wallet ) ;
if ( _this . variablesService . wallets . length === 1 ) {
_this . router . navigate ( [ '/wallet/' + _this . variablesService . wallets [ 0 ] . wallet _id ] ) ;
}
} ) ;
}
else {
if ( wallet _index === data . length - 1 && runWallets _1 === 0 ) {
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/' ] ) ;
} ) ;
}
// console.log(run_data['error_code']);
}
} ) ;
}
else {
if ( wallet _index === data . length - 1 && openWallets _1 === 0 ) {
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/' ] ) ;
} ) ;
}
}
} ) ;
} ) ;
}
else {
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/' ] ) ;
} ) ;
}
}
} ) ;
}
} ;
2019-01-09 15:25:03 +02:00
LoginComponent . prototype . ngOnDestroy = function ( ) {
this . queryRouting . unsubscribe ( ) ;
} ;
2018-12-27 18:50:45 +03:00
LoginComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-login' ,
template : _ _webpack _require _ _ ( /*! ./login.component.html */ "./src/app/login/login.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./login.component.scss */ "./src/app/login/login.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "ActivatedRoute" ] ,
_angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Router" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "VariablesService" ] ,
2019-01-09 15:25:03 +02:00
_helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "ModalService" ] ,
2018-12-27 18:50:45 +03:00
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ] )
] , LoginComponent ) ;
return LoginComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/main/main.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / main / main . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-01-09 15:25:03 +02:00
module . exports = "<div class=\"content\">\r\n <div class=\"add-wallet\">\r\n <h3 class=\"add-wallet-title\">{{ 'MAIN.TITLE' | translate }}</h3>\r\n <div class=\"add-wallet-buttons\">\r\n <button type=\"button\" class=\"blue-button\" [routerLink]=\"['/create']\">{{ 'MAIN.BUTTON_NEW_WALLET' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button\" (click)=\"openWallet()\">{{ 'MAIN.BUTTON_OPEN_WALLET' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button\" [routerLink]=\"['/restore']\">{{ 'MAIN.BUTTON_RESTORE_BACKUP' | translate }}</button>\r\n </div>\r\n <div class=\"add-wallet-help\" (click)=\"openInBrowser()\">\r\n <i class=\"icon\"></i><span>{{ 'MAIN.HELP' | translate }}</span>\r\n </div>\r\n </div>\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/main/main.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / main / main . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ":host {\n flex: 1 0 auto;\n padding: 3rem; }\n\n.content {\n padding: 3rem;\n min-height: 100%; }\n\n.add-wallet .add-wallet-title {\n margin-bottom: 1rem; }\n\n.add-wallet .add-wallet-buttons {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0 -0.5rem;\n padding: 1.5rem 0; }\n\n.add-wallet .add-wallet-buttons button {\n flex: 1 0 auto;\n margin: 0 0.5rem; }\n\n.add-wallet .add-wallet-help {\n display: flex;\n cursor: pointer;\n font-size: 1.3rem;\n line-height: 1.4rem; }\n\n.add-wallet .add-wallet-help .icon {\n -webkit-mask: url('howto.svg') no-repeat center;\n mask: url('howto.svg') no-repeat center;\n margin-right: 0.8rem;\n width: 1.4rem;\n height: 1.4rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvbWFpbi9EOlxcUHJvamVjdHNcXFphbm9cXHNyY1xcZ3VpXFxxdC1kYWVtb25cXGh0bWxfc291cmNlL3NyY1xcYXBwXFxtYWluXFxtYWluLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsY0FBYztFQUNkLGFBQWEsRUFBQTs7QUFHZjtFQUNFLGFBQWE7RUFDYixnQkFBZ0IsRUFBQTs7QUFHbEI7RUFHSSxtQkFBbUIsRUFBQTs7QUFIdkI7RUFPSSxhQUFhO0VBQ2IsbUJBQW1CO0VBQ25CLDhCQUE4QjtFQUM5QixpQkFBaUI7RUFDakIsaUJBQWlCLEVBQUE7O0FBWHJCO0lBY00sY0FBYztJQUNkLGdCQUFnQixFQUFBOztBQWZ0QjtFQW9CSSxhQUFhO0VBQ2IsZUFBZTtFQUNmLGlCQUFpQjtFQUNqQixtQkFBbUIsRUFBQTs7QUF2QnZCO0lBMEJNLCtDQUF3RDtZQUF4RCx1Q0FBd0Q7SUFDeEQsb0JBQW9CO0lBQ3BCLGFBQWE7SUFDYixjQUFjLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9tYWluL21haW4uY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCB7XHJcbiAgZmxleDogMSAwIGF1dG87XHJcbiAgcGFkZGluZzogM3JlbTtcclxufVxyXG5cclxuLmNvbnRlbnQge1xyXG4gIHBhZGRpbmc6IDNyZW07XHJcbiAgbWluLWhlaWdodDogMTAwJTtcclxufVxyXG5cclxuLmFkZC13YWxsZXQge1xyXG5cclxuICAuYWRkLXdhbGxldC10aXRsZSB7XHJcbiAgICBtYXJnaW4tYm90dG9tOiAxcmVtO1xyXG4gIH1cclxuXHJcbiAgLmFkZC13YWxsZXQtYnV0dG9ucyB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcclxuICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtcclxuICAgIG1hcmdpbjogMCAtMC41cmVtO1xyXG4gICAgcGFkZGluZzogMS41cmVtIDA7XHJcblxyXG4gICAgYnV0dG9uIHtcclxuICAgICAgZmxleDogMSAwIGF1dG87XHJcbiAgICAgIG1hcmdpbjogMCAwLjVyZW07XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAuYWRkLXdhbGxldC1oZWxwIHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBjdXJzb3I6IHBvaW50ZXI7XHJcbiAgICBmb250LXNpemU6IDEuM3JlbTtcclxuICAgIGxpbmUtaGVpZ2h0OiAxLjRyZW07XHJcblxyXG4gICAgLmljb24ge1xyXG4gICAgICBtYXNrOiB1cmwoLi4vLi4vYXNzZXRzL2ljb25zL2hvd3RvLnN2Zykgbm8tcmVwZWF0IGNlbnRlcjtcclxuICAgICAgbWFyZ2luLXJpZ2h0OiAwLjhyZW07XHJcbiAgICAgIHdpZHRoOiAxLjRyZW07XHJcbiAgICAgIGhlaWdodDogMS40cmVtO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0= */"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/main/main.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / main / main . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: MainComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "MainComponent" , function ( ) { return MainComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
2019-01-09 15:25:03 +02:00
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-09 15:25:03 +02:00
2018-12-27 18:50:45 +03:00
var MainComponent = /** @class */ ( function ( ) {
2019-01-09 15:25:03 +02:00
function MainComponent ( router , backend , variablesService , ngZone , translate ) {
2018-12-27 18:50:45 +03:00
this . router = router ;
this . backend = backend ;
this . variablesService = variablesService ;
this . ngZone = ngZone ;
2019-01-09 15:25:03 +02:00
this . translate = translate ;
2018-12-27 18:50:45 +03:00
}
MainComponent . prototype . ngOnInit = function ( ) { } ;
MainComponent . prototype . openWallet = function ( ) {
var _this = this ;
2019-01-09 15:25:03 +02:00
this . backend . openFileDialog ( this . translate . instant ( 'MAIN.CHOOSE_PATH' ) , '*' , this . variablesService . settings . default _path , function ( file _status , file _data ) {
2018-12-27 18:50:45 +03:00
if ( file _status ) {
_this . variablesService . settings . default _path = file _data . path . substr ( 0 , file _data . path . lastIndexOf ( '/' ) ) ;
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/open' ] , { queryParams : { path : file _data . path } } ) ;
} ) ;
}
else {
console . log ( file _data [ 'error_code' ] ) ;
}
} ) ;
} ;
2019-01-09 15:25:03 +02:00
MainComponent . prototype . openInBrowser = function ( ) {
2019-03-18 17:04:17 +02:00
this . backend . openUrlInBrowser ( 'docs.zano.org/v1.0/docs/how-to-create-wallet' ) ;
2019-01-09 15:25:03 +02:00
} ;
2018-12-27 18:50:45 +03:00
MainComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-main' ,
template : _ _webpack _require _ _ ( /*! ./main.component.html */ "./src/app/main/main.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./main.component.scss */ "./src/app/main/main.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "Router" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "VariablesService" ] ,
2019-01-09 15:25:03 +02:00
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ,
_ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "TranslateService" ] ] )
2018-12-27 18:50:45 +03:00
] , MainComponent ) ;
return MainComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/messages/messages.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / messages / messages . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-01-29 12:29:31 +02:00
module . exports = "<div class=\"wrap-table\">\r\n\r\n <table class=\"messages-table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'MESSAGES.ADDRESS' | translate }}</th>\r\n <th>{{ 'MESSAGES.MESSAGE' | translate }}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let message of messages\" [routerLink]=\"[message.address]\">\r\n <td>\r\n <span>{{message.address}}</span>\r\n <i class=\"icon\" *ngIf=\"message.is_new\"></i>\r\n </td>\r\n <td>\r\n <span>{{message.message}}</span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/messages/messages.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / messages / messages . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ":host {\n width: 100%; }\n\n.wrap-table {\n margin: -3rem; }\n\n.wrap-table table tbody tr td:first-child {\n position: relative;\n padding-right: 5rem;\n width: 18rem; }\n\n.wrap-table table tbody tr td:first-child span {\n display: block;\n line-height: 3.5rem;\n max-width: 10rem; }\n\n.wrap-table table tbody tr td:first-child .icon {\n position: absolute;\n top: 50%;\n right: 1rem;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n display: block;\n -webkit-mask: url('alert.svg') no-repeat 0;\n mask: url('alert.svg') no-repeat 0;\n width: 1.2rem;\n height: 1.2rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvbWVzc2FnZXMvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxcbWVzc2FnZXNcXG1lc3NhZ2VzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsV0FBVyxFQUFBOztBQUdiO0VBQ0UsYUFBYSxFQUFBOztBQURmO0lBWVksa0JBQWtCO0lBQ2xCLG1CQUFtQjtJQUNuQixZQUFZLEVBQUE7O0FBZHhCO01BaUJjLGNBQWM7TUFDZCxtQkFBbUI7TUFDbkIsZ0JBQWdCLEVBQUE7O0FBbkI5QjtNQXVCYyxrQkFBa0I7TUFDbEIsUUFBUTtNQUNSLFdBQVc7TUFDWCxtQ0FBMkI7Y0FBM0IsMkJBQTJCO01BQzNCLGNBQWM7TUFDZCwwQ0FBbUQ7Y0FBbkQsa0NBQW1EO01BQ25ELGFBQWE7TUFDYixjQUFjLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9tZXNzYWdlcy9tZXNzYWdlcy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIjpob3N0IHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG5cclxuLndyYXAtdGFibGUge1xyXG4gIG1hcmdpbjogLTNyZW07XHJcblxyXG4gIHRhYmxlIHtcclxuXHJcbiAgICB0Ym9keSB7XHJcblxyXG4gICAgICB0ciB7XHJcblxyXG4gICAgICAgIHRkIHtcclxuXHJcbiAgICAgICAgICAmOmZpcnN0LWNoaWxkIHtcclxuICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xyXG4gICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiA1cmVtO1xyXG4gICAgICAgICAgICB3aWR0aDogMThyZW07XHJcblxyXG4gICAgICAgICAgICBzcGFuIHtcclxuICAgICAgICAgICAgICBkaXNwbGF5OiBibG9jaztcclxuICAgICAgICAgICAgICBsaW5lLWhlaWdodDogMy41cmVtO1xyXG4gICAgICAgICAgICAgIG1heC13aWR0aDogMTByZW07XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC5pY29uIHtcclxuICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgICAgICAgICAgICAgdG9wOiA1MCU7XHJcbiAgICAgICAgICAgICAgcmlnaHQ6IDFyZW07XHJcbiAgICAgICAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVZKC01MCUpO1xyXG4gICAgICAgICAgICAgIGRpc3BsYXk6IGJsb2NrO1xyXG4gICAgICAgICAgICAgIG1hc2s6IHVybCguLi8uLi9hc3NldHMvaWNvbnMvYWxlcnQuc3ZnKSBuby1yZXBlYXQgMDtcclxuICAgICAgICAgICAgICB3aWR0aDogMS4ycmVtO1xyXG4gICAgICAgICAgICAgIGhlaWdodDogMS4ycmVtO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ== */"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/messages/messages.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / messages / messages . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: MessagesComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "MessagesComponent" , function ( ) { return MessagesComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var MessagesComponent = /** @class */ ( function ( ) {
function MessagesComponent ( ) {
this . messages = [
{
is _new : true ,
address : '@bitmap' ,
message : 'No more miners for you!'
} ,
{
is _new : false ,
address : 'Hjkwey36gHasdhkajshd4bxnb5mcvowyefb2633FdsFGGWbb' ,
message : 'Hey! What’ s with our BBR deal?'
} ,
{
is _new : false ,
address : '@john' ,
message : 'I’ m coming!'
}
] ;
}
MessagesComponent . prototype . ngOnInit = function ( ) { } ;
MessagesComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-messages' ,
template : _ _webpack _require _ _ ( /*! ./messages.component.html */ "./src/app/messages/messages.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./messages.component.scss */ "./src/app/messages/messages.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ ] )
] , MessagesComponent ) ;
return MessagesComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/open-wallet/open-wallet.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / open - wallet / open - wallet . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-01-29 12:29:31 +02:00
module . exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/main']\">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>\r\n <span>{{ 'BREADCRUMBS.OPEN_WALLET' | translate }}</span>\r\n </div>\r\n <a class=\"back-btn\" [routerLink]=\"['/main']\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </a>\r\n </div>\r\n\r\n <form class=\"form-open\" [formGroup]=\"openForm\">\r\n\r\n <div class=\"input-block\">\r\n <label for=\"wallet-name\">{{ 'OPEN_WALLET.NAME' | translate }}</label>\r\n <input type=\"text\" id=\"wallet-name\" formControlName=\"name\">\r\n <div class=\"error-block\" *ngIf=\"openForm.controls['name'].invalid && (openForm.controls['name'].dirty || openForm.controls['name'].touched)\">\r\n <div *ngIf=\"openForm.controls['name'].errors['required']\">\r\n {{ 'OPEN_WALLET.FORM_ERRORS.NAME_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"openForm.controls['name'].errors['duplicate']\">\r\n {{ 'OPEN_WALLET.FORM_ERRORS.NAME_DUPLICATE' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"wallet-password\">{{ 'OPEN_WALLET.PASS' | translate }}</label>\r\n <input type=\"password\" id=\"wallet-password\" formControlName=\"password\">\r\n </div>\r\n\r\n <div class=\"wrap-buttons\">\r\n <button type=\"button\" class=\"blue-button create-button\" (click)=\"openWallet()\" [disabled]=\"!openForm.valid\">{{ 'OPEN_WALLET.BUTTON' | translate }}</button>\r\n </div>\r\n\r\n </form>\r\n\r\n</div>\r\n\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/open-wallet/open-wallet.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / open - wallet / open - wallet . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ".form-open {\n margin: 2.4rem 0;\n width: 50%; }\n .form-open .wrap-buttons {\n display: flex;\n margin: 2.5rem -0.7rem; }\n .form-open .wrap-buttons button {\n margin: 0 0.7rem; }\n .form-open .wrap-buttons button.create-button {\n flex: 1 1 50%; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvb3Blbi13YWxsZXQvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxcb3Blbi13YWxsZXRcXG9wZW4td2FsbGV0LmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZ0JBQWdCO0VBQ2hCLFVBQVUsRUFBQTtFQUZaO0lBS0ksYUFBYTtJQUNiLHNCQUFzQixFQUFBO0VBTjFCO01BU00sZ0JBQWdCLEVBQUE7RUFUdEI7UUFZUSxhQUFhLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9vcGVuLXdhbGxldC9vcGVuLXdhbGxldC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5mb3JtLW9wZW4ge1xyXG4gIG1hcmdpbjogMi40cmVtIDA7XHJcbiAgd2lkdGg6IDUwJTtcclxuXHJcbiAgLndyYXAtYnV0dG9ucyB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgbWFyZ2luOiAyLjVyZW0gLTAuN3JlbTtcclxuXHJcbiAgICBidXR0b24ge1xyXG4gICAgICBtYXJnaW46IDAgMC43cmVtO1xyXG5cclxuICAgICAgJi5jcmVhdGUtYnV0dG9uIHtcclxuICAgICAgICBmbGV4OiAxIDEgNTAlO1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ== */"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/open-wallet/open-wallet.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / open - wallet / open - wallet . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: OpenWalletComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "OpenWalletComponent" , function ( ) { return OpenWalletComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2019-01-09 15:25:03 +02:00
/* harmony import */ var _helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _models _wallet _model _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/models/wallet.model */ "./src/app/_helpers/models/wallet.model.ts" ) ;
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-09 15:25:03 +02:00
2018-12-27 18:50:45 +03:00
var OpenWalletComponent = /** @class */ ( function ( ) {
2019-01-09 15:25:03 +02:00
function OpenWalletComponent ( route , router , backend , variablesService , modalService , ngZone , translate ) {
2018-12-27 18:50:45 +03:00
var _this = this ;
this . route = route ;
this . router = router ;
this . backend = backend ;
this . variablesService = variablesService ;
2019-01-09 15:25:03 +02:00
this . modalService = modalService ;
2018-12-27 18:50:45 +03:00
this . ngZone = ngZone ;
2019-01-09 15:25:03 +02:00
this . translate = translate ;
2018-12-27 18:50:45 +03:00
this . openForm = new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormGroup" ] ( {
name : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' , [ _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required , function ( g ) {
for ( var i = 0 ; i < _this . variablesService . wallets . length ; i ++ ) {
if ( g . value === _this . variablesService . wallets [ i ] . name ) {
return { 'duplicate' : true } ;
}
}
return null ;
} ] ) ,
password : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' )
} ) ;
}
OpenWalletComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
2019-01-09 15:25:03 +02:00
this . queryRouting = this . route . queryParams . subscribe ( function ( params ) {
2018-12-27 18:50:45 +03:00
if ( params . path ) {
_this . filePath = params . path ;
var filename = '' ;
if ( params . path . lastIndexOf ( '.' ) === - 1 ) {
filename = params . path . substr ( params . path . lastIndexOf ( '/' ) + 1 ) ;
}
else {
filename = params . path . substr ( params . path . lastIndexOf ( '/' ) + 1 , params . path . lastIndexOf ( '.' ) - 1 - params . path . lastIndexOf ( '/' ) ) ;
}
if ( filename . length > 25 ) {
filename = filename . slice ( 0 , 25 ) ;
}
_this . openForm . get ( 'name' ) . setValue ( filename ) ;
2019-01-29 16:46:36 +02:00
_this . openForm . get ( 'name' ) . markAsTouched ( ) ;
2018-12-27 18:50:45 +03:00
}
} ) ;
} ;
OpenWalletComponent . prototype . openWallet = function ( ) {
var _this = this ;
if ( this . openForm . valid ) {
this . backend . openWallet ( this . filePath , this . openForm . get ( 'password' ) . value , false , function ( open _status , open _data , open _error ) {
if ( open _error && open _error === 'FILE_NOT_FOUND' ) {
2019-01-22 14:24:34 +02:00
var error _translate = _this . translate . instant ( 'OPEN_WALLET.FILE_NOT_FOUND1' ) ;
2019-01-09 15:25:03 +02:00
error _translate += ':<br>' + _this . filePath ;
2019-01-22 14:24:34 +02:00
error _translate += _this . translate . instant ( 'OPEN_WALLET.FILE_NOT_FOUND2' ) ;
2019-01-09 15:25:03 +02:00
_this . modalService . prepareModal ( 'error' , error _translate ) ;
2018-12-27 18:50:45 +03:00
}
else {
if ( open _status || open _error === 'FILE_RESTORED' ) {
var exists _1 = false ;
_this . variablesService . wallets . forEach ( function ( wallet ) {
if ( wallet . address === open _data [ 'wi' ] . address ) {
exists _1 = true ;
}
} ) ;
if ( exists _1 ) {
2019-01-09 15:25:03 +02:00
_this . modalService . prepareModal ( 'error' , 'OPEN_WALLET.WITH_ADDRESS_ALREADY_OPEN' ) ;
2018-12-27 18:50:45 +03:00
_this . backend . closeWallet ( open _data . wallet _id , function ( close _status , close _data ) {
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/' ] ) ;
} ) ;
} ) ;
}
else {
_this . backend . runWallet ( open _data . wallet _id , function ( run _status , run _data ) {
if ( run _status ) {
2019-01-09 15:25:03 +02:00
var new _wallet _1 = new _helpers _models _wallet _model _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "Wallet" ] ( open _data . wallet _id , _this . openForm . get ( 'name' ) . value , _this . openForm . get ( 'password' ) . value , open _data [ 'wi' ] . path , open _data [ 'wi' ] . address , open _data [ 'wi' ] . balance , open _data [ 'wi' ] . unlocked _balance , open _data [ 'wi' ] . mined _total , open _data [ 'wi' ] . tracking _hey ) ;
2019-02-07 17:45:24 +02:00
new _wallet _1 . alias = _this . backend . getWalletAlias ( new _wallet _1 . address ) ;
2018-12-27 18:50:45 +03:00
if ( open _data . recent _history && open _data . recent _history . history ) {
new _wallet _1 . prepareHistory ( open _data . recent _history . history ) ;
}
_this . backend . getContracts ( open _data . wallet _id , function ( contracts _status , contracts _data ) {
if ( contracts _status && contracts _data . hasOwnProperty ( 'contracts' ) ) {
_this . ngZone . run ( function ( ) {
new _wallet _1 . prepareContractsAfterOpen ( contracts _data . contracts , _this . variablesService . exp _med _ts , _this . variablesService . height _app , _this . variablesService . settings . viewedContracts , _this . variablesService . settings . notViewedContracts ) ;
} ) ;
}
} ) ;
_this . variablesService . wallets . push ( new _wallet _1 ) ;
_this . backend . storeSecureAppData ( function ( status , data ) {
console . log ( 'Store App Data' , status , data ) ;
} ) ;
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/wallet/' + open _data . wallet _id ] ) ;
} ) ;
}
else {
console . log ( run _data [ 'error_code' ] ) ;
}
} ) ;
}
}
}
} ) ;
}
} ;
2019-01-09 15:25:03 +02:00
OpenWalletComponent . prototype . ngOnDestroy = function ( ) {
this . queryRouting . unsubscribe ( ) ;
} ;
2018-12-27 18:50:45 +03:00
OpenWalletComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-open-wallet' ,
template : _ _webpack _require _ _ ( /*! ./open-wallet.component.html */ "./src/app/open-wallet/open-wallet.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./open-wallet.component.scss */ "./src/app/open-wallet/open-wallet.component.scss" ) ]
} ) ,
2019-01-09 15:25:03 +02:00
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "ActivatedRoute" ] ,
_angular _router _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "Router" ] ,
2018-12-27 18:50:45 +03:00
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "VariablesService" ] ,
2019-01-09 15:25:03 +02:00
_helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "ModalService" ] ,
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ,
_ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "TranslateService" ] ] )
2018-12-27 18:50:45 +03:00
] , OpenWalletComponent ) ;
return OpenWalletComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/purchase/purchase.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / purchase / purchase . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-01-31 16:10:02 +02:00
module . exports = "<div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"'/wallet/' + currentWalletId + '/contracts'\">{{ 'BREADCRUMBS.CONTRACTS' | translate }}</span>\r\n <span *ngIf=\"newPurchase\">{{ 'BREADCRUMBS.NEW_PURCHASE' | translate }}</span>\r\n <span *ngIf=\"!newPurchase\">{{ 'BREADCRUMBS.OLD_PURCHASE' | translate }}</span>\r\n </div>\r\n <button type=\"button\" class=\"back-btn\" (click)=\"back()\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </button>\r\n</div>\r\n\r\n<form class=\"form-purchase scrolled-content\" [formGroup]=\"purchaseForm\">\r\n\r\n <div class=\"input-block\">\r\n <label for=\"purchase-description\">{{ 'PURCHASE.DESCRIPTION' | translate }}</label>\r\n <input type=\"text\" id=\"purchase-description\" formControlName=\"description\" maxlength=\"100\" [readonly]=\"!newPurchase\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"purchaseForm.controls['description'].invalid && (purchaseForm.controls['description'].dirty || purchaseForm.controls['description'].touched)\">\r\n <div *ngIf=\"purchaseForm.controls['description'].errors['required']\">\r\n {{ 'PURCHASE.FORM_ERRORS.DESC_REQUIRED' | translate }}\r\n </div>\r\n </div>\r\n <div class=\"error-block\" *ngIf=\"newPurchase && purchaseForm.controls['description'].value.length >= 100\">\r\n <div>\r\n {{ 'PURCHASE.FORM_ERRORS.COMMENT_MAXIMUM' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-blocks-row\">\r\n <div class=\"input-block\">\r\n <label for=\"purchase-seller\">{{ 'PURCHASE.SELLER' | translate }}</label>\r\n <input type=\"text\" id=\"purchase-seller\" formControlName=\"seller\" [readonly]=\"!newPurchase\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"purchaseForm.controls['seller'].invalid && (purchaseForm.controls['seller'].dirty || purchaseForm.controls['seller'].touched)\">\r\n <div *ngIf=\"purchaseForm.controls['seller'].errors['required']\">\r\n {{ 'PURCHASE.FORM_ERRORS.SELLER_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"purchaseForm.controls['seller'].errors['address_not_valid']\">\r\n {{ 'PURCHASE.FORM_ERRORS.SELLER_NOT_VALID' | translate }}\r\n </div>\r\n <div *ngIf=\"purchaseForm.controls['seller'].errors['address_same']\">\r\n {{ 'PURCHASE.FORM_ERRORS.SELLER_SAME' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"purchase-amount\">{{ 'PURCHASE.AMOUNT' | translate }}</label>\r\n <input type=\"text\" id=\"purchase-amount\" formControlName=\"amount\" appInputValidate=\"money\" [readonly]=\"!newPurchase\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"purchaseForm.controls['amount'].invalid && (purchaseForm.controls['amount'].dirty || purchaseForm.controls['amount'].touched)\">\r\n <div *ngIf=\"purchaseForm.controls['amount'].errors['required']\">\r\n {{ 'PURCHASE.FORM_ERRORS.AMOUNT_REQUIRED' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-blocks-row\">\r\n <div class=\"input-block\">\r\n <label for=\"purchase-your-deposit\">{{ 'PURCHASE.YOUR_DEPOSIT' | translate }}</label>\r\n <input type=\"text\" id=\"purchase-your-deposit\" formControlName=\"yourDeposit\" appInputValidate=\"money\" [readonly]=\"!newPurchase\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"purchaseForm.controls['yourDeposit'].invalid && (purchaseForm.controls['yourDeposit'].dirty || purchaseForm.controls['yourDeposit'].touched)\">\r\n <div *ngIf=\"purchaseForm.controls['yourDeposit'].errors['required']\" > \ r \ n { { 'PURCHASE.FORM_ERRORS.YOUR_DEPOSIT_REQUIRED' | translate } } \ r \ n < / d i v > \ r \ n < / d i v > \ r \ n < / d i v > \ r \ n \ r \ n < d i v
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/purchase/purchase.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / purchase / purchase . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = " : host { \ n display : flex ; \ n flex - direction : column ; \ n width : 100 % ; } \ n \ n . head { \ n flex : 0 0 auto ; \ n box - sizing : content - box ; \ n margin : - 3 rem - 3 rem 0 ; } \ n \ n . form - purchase { \ n flex : 1 1 auto ; \ n margin : 1.5 rem - 3 rem 0 ; \ n padding : 0 3 rem ; \ n overflow - y : overlay ; } \ n \ n . form - purchase . input - blocks - row { \ n display : flex ; } \ n \ n . form - purchase . input - blocks - row . input - block { \ n flex - basis : 50 % ; } \ n \ n . form - purchase . input - blocks - row . input - block : first - child { \ n margin - right : 1.5 rem ; } \ n \ n . form - purchase . input - blocks - row . input - block : last - child { \ n margin - left : 1.5 rem ; } \ n \ n . form - purchase . input - blocks - row . input - block . checkbox - block { \ n display : flex ; } \ n \ n . form - purchase . purchase - select { \ n display : flex ; \ n align - items : center ; \ n background : transparent ; \ n border : none ; \ n font - size : 1.3 rem ; \ n line - height : 1.3 rem ; \ n margin : 1.5 rem 0 0 ; \ n padding : 0 ; \ n width : 100 % ; \ n max - width : 15 rem ; \ n height : 1.3 rem ; } \ n \ n . form - purchase . purchase - select . arrow { \ n margin - left : 1 rem ; \ n width : 0.8 rem ; \ n height : 0.8 rem ; } \ n \ n . form - purchase . purchase - select . arrow . down { \ n - webkit - mask : url ( 'arrow-down.svg' ) no - repeat center ; \ n mask : url ( 'arrow-down.svg' ) no - repeat center ; } \ n \ n . form - purchase . purchase - select . arrow . up { \ n - webkit - mask : url ( 'arrow-up.svg' ) no - repeat center ; \ n mask : url ( 'arrow-up.svg' ) no - repeat center ; } \ n \ n . form - purchase . additional - details { \ n display : flex ; \ n margin - top : 1.5 rem ; \ n padding : 0.5 rem 0 2 rem ; } \ n \ n . form - purchase . additional - details > div { \ n flex - basis : 25 % ; } \ n \ n . form - purchase . additional - details > div : first - child { \ n padding - left : 1.5 rem ; \ n padding - right : 1 rem ; } \ n \ n . form - purchase . additional - details > div : last - child { \ n padding - left : 1 rem ; \ n padding - right : 1.5 rem ; } \ n \ n . form - purchase . purchase - states { \ n display : flex ; \ n flex - direction : column ; \ n align - items : center ; \ n justify - content : center ; \ n font - size : 1.2 rem ; \ n line - height : 2.9 rem ; } \ n \ n . form - purchase . send - button { \ n margin : 2.4 rem 0 ; \ n width : 100 % ; \ n max - width : 15 rem ; } \ n \ n . form - purchase . purchase - buttons { \ n display : flex ; \ n justify - content : space - between ; \ n margin : 2.4 rem - 0.5 rem ; \ n width : calc ( 100 % + 1 rem ) ; } \ n \ n . form - purchase . purchase - buttons button { \ n flex : 0 1 33 % ; \ n margin : 0 0.5 rem ; } \ n \ n . progress - bar - container { \ n position : absolute ; \ n bottom : 0 ; \ n left : 0 ; \ n padding : 0 3 rem ; \ n width : 100 % ; \ n height : 3 rem ; } \ n \ n . progress - bar - container . progress - bar { \ n position : absolute ; \ n top : - 0.7 rem ; \ n left : 0 ; \ n margin : 0 3 rem ; \ n width : calc ( 100 % - 6 rem ) ; \ n height : 0.7 rem ; } \ n \ n . progress - bar - container . progress - bar . progress - bar - full { \ n height : 0.7 rem ; } \ n \ n . progress - bar - container . progress - labels { \ n display : flex ; \ n align - items : center ; \ n justify - content : space - between ; \ n font - size : 1.2 rem ; \ n height : 100 % ; } \ n \ n . progress - bar - container . progress - labels span { \ n flex : 1 0 0 ; \ n text - align : center ; } \ n \ n . progress - bar - container . progress - labels span : first - child { \ n text - align : left ; } \ n \ n . progress - bar - container . progress - labels span : last - child { \ n text - align : right ; } \ n \ n . progress - bar - container . progress - time { \ n position : absolute ; \ n top : - 3 rem ; \ n left : 50 % ; \ n - webkit - transform : translateX ( - 50 % ) ; \ n transform : translateX ( - 50 % ) ; \ n font - size : 1.2 rem ; } \ n \ n / * # sourceMappingURL = data : application / json ; base64 , eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcHVyY2hhc2UvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxccHVyY2hhc2VcXHB1cmNoYXNlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsYUFBYTtFQUNiLHNCQUFzQjtFQUN0QixXQUFXLEVBQUE7O0FBR2I7RUFDRSxjQUFjO0VBQ2QsdUJBQXVCO0VBQ3ZCLHFCQUFxQixFQUFBOztBQUd2QjtFQUNFLGNBQWM7RUFDZCxzQkFBc0I7RUFDdEIsZUFBZTtFQUNmLG1CQUFtQixFQUFBOztBQUpyQjtJQU9JLGFBQWEsRUFBQTs7QUFQakI7TUFVTSxlQUFlLEVBQUE7O0FBVnJCO1FBYVEsb0JBQW9CLEVBQUE7O0FBYjVCO1FBaUJRLG1CQUFtQixFQUFBOztBQWp
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/purchase/purchase.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / purchase / purchase . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: PurchaseComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PurchaseComponent" , function ( ) { return PurchaseComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2019-01-09 15:25:03 +02:00
/* harmony import */ var _helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
/* harmony import */ var _angular _common _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js" ) ;
/* harmony import */ var _helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/pipes/int-to-money.pipe */ "./src/app/_helpers/pipes/int-to-money.pipe.ts" ) ;
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _8 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-09 15:25:03 +02:00
2018-12-27 18:50:45 +03:00
var PurchaseComponent = /** @class */ ( function ( ) {
2019-01-09 15:25:03 +02:00
function PurchaseComponent ( route , backend , variablesService , modalService , ngZone , location , intToMoneyPipe , translate ) {
2019-01-29 16:46:36 +02:00
var _this = this ;
2018-12-27 18:50:45 +03:00
this . route = route ;
this . backend = backend ;
this . variablesService = variablesService ;
2019-01-09 15:25:03 +02:00
this . modalService = modalService ;
2018-12-27 18:50:45 +03:00
this . ngZone = ngZone ;
this . location = location ;
this . intToMoneyPipe = intToMoneyPipe ;
2019-01-09 15:25:03 +02:00
this . translate = translate ;
2018-12-27 18:50:45 +03:00
this . newPurchase = false ;
this . purchaseForm = new _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FormGroup" ] ( {
description : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FormControl" ] ( '' , _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Validators" ] . required ) ,
2019-01-29 16:46:36 +02:00
seller : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FormControl" ] ( '' , [ _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Validators" ] . required , function ( g ) {
if ( g . value === _this . variablesService . currentWallet . address ) {
return { 'address_same' : true } ;
}
return null ;
2019-01-30 17:18:18 +02:00
} , function ( g ) {
if ( g . value ) {
_this . backend . validateAddress ( g . value , function ( valid _status ) {
_this . ngZone . run ( function ( ) {
if ( valid _status === false ) {
g . setErrors ( Object . assign ( { 'address_not_valid' : true } , g . errors ) ) ;
}
else {
if ( g . hasError ( 'address_not_valid' ) ) {
delete g . errors [ 'address_not_valid' ] ;
if ( Object . keys ( g . errors ) . length === 0 ) {
g . setErrors ( null ) ;
}
}
}
} ) ;
} ) ;
return ( g . hasError ( 'address_not_valid' ) ) ? { 'address_not_valid' : true } : null ;
}
return null ;
2019-01-29 16:46:36 +02:00
} ] ) ,
2018-12-27 18:50:45 +03:00
amount : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FormControl" ] ( null , _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Validators" ] . required ) ,
yourDeposit : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FormControl" ] ( null , _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Validators" ] . required ) ,
sellerDeposit : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FormControl" ] ( null , _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Validators" ] . required ) ,
2019-01-29 16:46:36 +02:00
sameAmount : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FormControl" ] ( { value : false , disabled : false } ) ,
2018-12-27 18:50:45 +03:00
comment : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FormControl" ] ( '' ) ,
2019-01-29 16:46:36 +02:00
fee : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FormControl" ] ( this . variablesService . default _fee ) ,
2019-01-09 15:25:03 +02:00
time : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FormControl" ] ( { value : '12' , disabled : false } ) ,
2019-01-29 16:46:36 +02:00
timeCancel : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FormControl" ] ( { value : '12' , disabled : false } ) ,
2018-12-27 18:50:45 +03:00
payment : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FormControl" ] ( '' )
} ) ;
this . additionalOptions = false ;
this . currentContract = null ;
}
PurchaseComponent . prototype . checkAndChangeHistory = function ( ) {
var _this = this ;
if ( this . currentContract . state === 201 ) {
this . historyBlock = this . variablesService . currentWallet . history . find ( function ( item ) { return item . tx _type === 8 && item . contract [ 0 ] . contract _id === _this . currentContract . contract _id && item . contract [ 0 ] . is _a === _this . currentContract . is _a ; } ) ;
}
else if ( this . currentContract . state === 601 ) {
this . historyBlock = this . variablesService . currentWallet . history . find ( function ( item ) { return item . tx _type === 12 && item . contract [ 0 ] . contract _id === _this . currentContract . contract _id && item . contract [ 0 ] . is _a === _this . currentContract . is _a ; } ) ;
}
} ;
PurchaseComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
this . parentRouting = this . route . parent . params . subscribe ( function ( params ) {
_this . currentWalletId = params [ 'id' ] ;
} ) ;
2019-01-09 15:25:03 +02:00
this . subRouting = this . route . params . subscribe ( function ( params ) {
2018-12-27 18:50:45 +03:00
if ( params . hasOwnProperty ( 'id' ) ) {
_this . currentContract = _this . variablesService . currentWallet . getContract ( params [ 'id' ] ) ;
2019-01-30 17:18:18 +02:00
_this . purchaseForm . controls [ 'seller' ] . setValidators ( [ ] ) ;
_this . purchaseForm . updateValueAndValidity ( ) ;
2018-12-27 18:50:45 +03:00
_this . purchaseForm . setValue ( {
description : _this . currentContract . private _detailes . t ,
seller : _this . currentContract . private _detailes . b _addr ,
amount : _this . intToMoneyPipe . transform ( _this . currentContract . private _detailes . to _pay ) ,
yourDeposit : _this . intToMoneyPipe . transform ( _this . currentContract . private _detailes . a _pledge ) ,
sellerDeposit : _this . intToMoneyPipe . transform ( _this . currentContract . private _detailes . b _pledge ) ,
2019-01-29 16:46:36 +02:00
sameAmount : _this . currentContract . private _detailes . to _pay . isEqualTo ( _this . currentContract . private _detailes . b _pledge ) ,
2018-12-27 18:50:45 +03:00
comment : _this . currentContract . private _detailes . c ,
2019-01-29 16:46:36 +02:00
fee : _this . variablesService . default _fee ,
2019-01-09 15:25:03 +02:00
time : '12' ,
timeCancel : '12' ,
2018-12-27 18:50:45 +03:00
payment : _this . currentContract . payment _id
} ) ;
2019-01-29 16:46:36 +02:00
_this . purchaseForm . get ( 'sameAmount' ) . disable ( ) ;
2018-12-27 18:50:45 +03:00
_this . newPurchase = false ;
if ( _this . currentContract . is _new ) {
if ( _this . currentContract . is _a && _this . currentContract . state === 2 ) {
_this . currentContract . state = 120 ;
}
if ( _this . currentContract . state === 130 && _this . currentContract . cancel _expiration _time !== 0 && _this . currentContract . cancel _expiration _time < _this . variablesService . exp _med _ts ) {
_this . currentContract . state = 2 ;
}
_this . variablesService . settings . viewedContracts = ( _this . variablesService . settings . viewedContracts ) ? _this . variablesService . settings . viewedContracts : [ ] ;
var findViewedCont = false ;
for ( var j = 0 ; j < _this . variablesService . settings . viewedContracts . length ; j ++ ) {
if ( _this . variablesService . settings . viewedContracts [ j ] . contract _id === _this . currentContract . contract _id && _this . variablesService . settings . viewedContracts [ j ] . is _a === _this . currentContract . is _a ) {
_this . variablesService . settings . viewedContracts [ j ] . state = _this . currentContract . state ;
findViewedCont = true ;
break ;
}
}
if ( ! findViewedCont ) {
_this . variablesService . settings . viewedContracts . push ( {
contract _id : _this . currentContract . contract _id ,
is _a : _this . currentContract . is _a ,
state : _this . currentContract . state
} ) ;
}
_this . currentContract . is _new = false ;
setTimeout ( function ( ) {
_this . variablesService . currentWallet . recountNewContracts ( ) ;
} , 0 ) ;
}
2019-01-09 15:25:03 +02:00
_this . checkAndChangeHistory ( ) ;
2018-12-27 18:50:45 +03:00
}
else {
_this . newPurchase = true ;
}
} ) ;
2019-01-09 15:25:03 +02:00
this . heightAppEvent = this . variablesService . getHeightAppEvent . subscribe ( function ( newHeight ) {
if ( _this . currentContract && _this . currentContract . state === 201 && _this . currentContract . height !== 0 && ( newHeight - _this . currentContract . height ) >= 10 ) {
_this . currentContract . state = 2 ;
_this . currentContract . is _new = true ;
_this . variablesService . currentWallet . recountNewContracts ( ) ;
}
else if ( _this . currentContract && _this . currentContract . state === 601 && _this . currentContract . height !== 0 && ( newHeight - _this . currentContract . height ) >= 10 ) {
_this . currentContract . state = 6 ;
_this . currentContract . is _new = true ;
_this . variablesService . currentWallet . recountNewContracts ( ) ;
}
2019-01-29 16:46:36 +02:00
if ( ! _this . newPurchase && _this . currentContract . is _a && ( _this . currentContract . state === 201 || _this . currentContract . state === 2 || _this . currentContract . state === 120 || _this . currentContract . state === 130 ) ) {
if ( _this . currentContract . cancel _expiration _time === 0 && ( _this . currentContract . height === 0 || ( _this . variablesService . height _app - _this . currentContract . height ) < 10 ) ) {
_this . purchaseForm . get ( 'timeCancel' ) . disable ( ) ;
}
else {
_this . purchaseForm . get ( 'timeCancel' ) . enable ( ) ;
}
}
2019-01-09 15:25:03 +02:00
} ) ;
2018-12-27 18:50:45 +03:00
} ;
PurchaseComponent . prototype . toggleOptions = function ( ) {
this . additionalOptions = ! this . additionalOptions ;
} ;
PurchaseComponent . prototype . getProgressBarWidth = function ( ) {
2019-01-09 15:25:03 +02:00
var progress = '9rem' ;
if ( ! this . newPurchase ) {
if ( this . currentContract ) {
if ( [ 110 , 3 , 4 , 6 , 140 ] . indexOf ( this . currentContract . state ) !== - 1 ) {
progress = '100%' ;
}
else {
progress = '50%' ;
}
}
2018-12-27 18:50:45 +03:00
}
2019-01-09 15:25:03 +02:00
return progress ;
2018-12-27 18:50:45 +03:00
} ;
PurchaseComponent . prototype . sameAmountChange = function ( ) {
if ( this . purchaseForm . get ( 'sameAmount' ) . value ) {
this . purchaseForm . get ( 'sellerDeposit' ) . clearValidators ( ) ;
this . purchaseForm . get ( 'sellerDeposit' ) . updateValueAndValidity ( ) ;
}
else {
this . purchaseForm . get ( 'sellerDeposit' ) . setValidators ( [ _angular _forms _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Validators" ] . required ] ) ;
this . purchaseForm . get ( 'sellerDeposit' ) . updateValueAndValidity ( ) ;
}
} ;
PurchaseComponent . prototype . createPurchase = function ( ) {
var _this = this ;
if ( this . purchaseForm . valid ) {
if ( this . purchaseForm . get ( 'sameAmount' ) . value ) {
this . purchaseForm . get ( 'sellerDeposit' ) . setValue ( this . purchaseForm . get ( 'amount' ) . value ) ;
}
2019-01-09 15:25:03 +02:00
this . backend . createProposal ( this . variablesService . currentWallet . wallet _id , this . purchaseForm . get ( 'description' ) . value , this . purchaseForm . get ( 'comment' ) . value , this . variablesService . currentWallet . address , this . purchaseForm . get ( 'seller' ) . value , this . purchaseForm . get ( 'amount' ) . value , this . purchaseForm . get ( 'yourDeposit' ) . value , this . purchaseForm . get ( 'sellerDeposit' ) . value , this . purchaseForm . get ( 'time' ) . value , this . purchaseForm . get ( 'payment' ) . value , function ( create _status ) {
if ( create _status ) {
_this . back ( ) ;
}
2018-12-27 18:50:45 +03:00
} ) ;
}
} ;
PurchaseComponent . prototype . back = function ( ) {
this . location . back ( ) ;
} ;
PurchaseComponent . prototype . acceptState = function ( ) {
var _this = this ;
this . backend . acceptProposal ( this . currentWalletId , this . currentContract . contract _id , function ( accept _status ) {
if ( accept _status ) {
2019-01-09 15:25:03 +02:00
_this . modalService . prepareModal ( 'info' , 'PURCHASE.ACCEPT_STATE_WAIT_BIG' ) ;
2018-12-27 18:50:45 +03:00
_this . back ( ) ;
}
} ) ;
} ;
PurchaseComponent . prototype . ignoredContract = function ( ) {
this . variablesService . settings . notViewedContracts = ( this . variablesService . settings . notViewedContracts ) ? this . variablesService . settings . notViewedContracts : [ ] ;
var findViewedCont = false ;
for ( var j = 0 ; j < this . variablesService . settings . notViewedContracts . length ; j ++ ) {
if ( this . variablesService . settings . notViewedContracts [ j ] . contract _id === this . currentContract . contract _id && this . variablesService . settings . notViewedContracts [ j ] . is _a === this . currentContract . is _a ) {
this . variablesService . settings . notViewedContracts [ j ] . state = 110 ;
this . variablesService . settings . notViewedContracts [ j ] . time = this . currentContract . expiration _time ;
findViewedCont = true ;
break ;
}
}
if ( ! findViewedCont ) {
this . variablesService . settings . notViewedContracts . push ( {
contract _id : this . currentContract . contract _id ,
is _a : this . currentContract . is _a ,
state : 110 ,
time : this . currentContract . expiration _time
} ) ;
}
this . currentContract . is _new = true ;
this . currentContract . state = 110 ;
this . currentContract . time = this . currentContract . expiration _time ;
this . variablesService . currentWallet . recountNewContracts ( ) ;
2019-01-09 15:25:03 +02:00
this . modalService . prepareModal ( 'info' , 'PURCHASE.IGNORED_ACCEPT' ) ;
2018-12-27 18:50:45 +03:00
this . back ( ) ;
} ;
PurchaseComponent . prototype . productNotGot = function ( ) {
var _this = this ;
this . backend . releaseProposal ( this . currentWalletId , this . currentContract . contract _id , 'REL_B' , function ( release _status ) {
if ( release _status ) {
2019-01-09 15:25:03 +02:00
_this . modalService . prepareModal ( 'info' , 'PURCHASE.BURN_PROPOSAL' ) ;
2018-12-27 18:50:45 +03:00
_this . back ( ) ;
}
} ) ;
} ;
PurchaseComponent . prototype . dealsDetailsFinish = function ( ) {
var _this = this ;
this . backend . releaseProposal ( this . currentWalletId , this . currentContract . contract _id , 'REL_N' , function ( release _status ) {
if ( release _status ) {
2019-01-09 15:25:03 +02:00
_this . modalService . prepareModal ( 'success' , 'PURCHASE.SUCCESS_FINISH_PROPOSAL' ) ;
2018-12-27 18:50:45 +03:00
_this . back ( ) ;
}
} ) ;
} ;
PurchaseComponent . prototype . dealsDetailsCancel = function ( ) {
var _this = this ;
2019-01-09 15:25:03 +02:00
this . backend . requestCancelContract ( this . currentWalletId , this . currentContract . contract _id , this . purchaseForm . get ( 'timeCancel' ) . value , function ( cancel _status ) {
2018-12-27 18:50:45 +03:00
if ( cancel _status ) {
2019-01-09 15:25:03 +02:00
_this . modalService . prepareModal ( 'info' , 'PURCHASE.SEND_CANCEL_PROPOSAL' ) ;
2018-12-27 18:50:45 +03:00
_this . back ( ) ;
}
} ) ;
} ;
PurchaseComponent . prototype . dealsDetailsDontCanceling = function ( ) {
this . variablesService . settings . notViewedContracts = this . variablesService . settings . notViewedContracts ? this . variablesService . settings . notViewedContracts : [ ] ;
var findViewedCont = false ;
for ( var j = 0 ; j < this . variablesService . settings . notViewedContracts . length ; j ++ ) {
if ( this . variablesService . settings . notViewedContracts [ j ] . contract _id === this . currentContract . contract _id && this . variablesService . settings . notViewedContracts [ j ] . is _a === this . currentContract . is _a ) {
this . variablesService . settings . notViewedContracts [ j ] . state = 130 ;
this . variablesService . settings . notViewedContracts [ j ] . time = this . currentContract . cancel _expiration _time ;
findViewedCont = true ;
break ;
}
}
if ( ! findViewedCont ) {
this . variablesService . settings . notViewedContracts . push ( {
contract _id : this . currentContract . contract _id ,
is _a : this . currentContract . is _a ,
state : 130 ,
time : this . currentContract . cancel _expiration _time
} ) ;
}
this . currentContract . is _new = true ;
this . currentContract . state = 130 ;
this . currentContract . time = this . currentContract . cancel _expiration _time ;
this . variablesService . currentWallet . recountNewContracts ( ) ;
2019-01-09 15:25:03 +02:00
this . modalService . prepareModal ( 'info' , 'PURCHASE.IGNORED_CANCEL' ) ;
2018-12-27 18:50:45 +03:00
this . back ( ) ;
} ;
PurchaseComponent . prototype . dealsDetailsSellerCancel = function ( ) {
var _this = this ;
this . backend . acceptCancelContract ( this . currentWalletId , this . currentContract . contract _id , function ( accept _status ) {
if ( accept _status ) {
2019-01-09 15:25:03 +02:00
_this . modalService . prepareModal ( 'info' , 'PURCHASE.DEALS_CANCELED_WAIT' ) ;
2018-12-27 18:50:45 +03:00
_this . back ( ) ;
}
} ) ;
} ;
PurchaseComponent . prototype . ngOnDestroy = function ( ) {
this . parentRouting . unsubscribe ( ) ;
2019-01-09 15:25:03 +02:00
this . subRouting . unsubscribe ( ) ;
this . heightAppEvent . unsubscribe ( ) ;
2018-12-27 18:50:45 +03:00
} ;
PurchaseComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-purchase' ,
template : _ _webpack _require _ _ ( /*! ./purchase.component.html */ "./src/app/purchase/purchase.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./purchase.component.scss */ "./src/app/purchase/purchase.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ActivatedRoute" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "VariablesService" ] ,
2019-01-09 15:25:03 +02:00
_helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "ModalService" ] ,
2018-12-27 18:50:45 +03:00
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ,
2019-01-09 15:25:03 +02:00
_angular _common _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "Location" ] ,
_helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "IntToMoneyPipe" ] ,
_ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "TranslateService" ] ] )
2018-12-27 18:50:45 +03:00
] , PurchaseComponent ) ;
return PurchaseComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/receive/receive.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / receive / receive . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-02-19 17:33:37 +02:00
module . exports = "<div class=\"wrap-qr\">\r\n <img src=\"{{qrImageSrc}}\" alt=\"qr-code\">\r\n <div class=\"wrap-address\">\r\n <div class=\"address\">{{variablesService.currentWallet.address}}</div>\r\n <button type=\"button\" class=\"btn-copy-address\" [class.copy]=\"!copyAnimation\" [class.copied]=\"copyAnimation\" (click)=\"copyAddress()\"></button>\r\n </div>\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/receive/receive.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / receive / receive . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ":host {\n width: 100%; }\n\n.wrap-qr {\n display: flex;\n flex-direction: column;\n align-items: center; }\n\n.wrap-qr img {\n margin: 4rem 0; }\n\n.wrap-qr .wrap-address {\n display: flex;\n align-items: center;\n font-size: 1.4rem;\n line-height: 2.7rem; }\n\n.wrap-qr .wrap-address .btn-copy-address {\n margin-left: 1.2rem;\n width: 1.7rem;\n height: 1.7rem; }\n\n.wrap-qr .wrap-address .btn-copy-address.copy {\n -webkit-mask: url('copy.svg') no-repeat center;\n mask: url('copy.svg') no-repeat center; }\n\n.wrap-qr .wrap-address .btn-copy-address.copy:hover {\n opacity: 0.75; }\n\n.wrap-qr .wrap-address .btn-copy-address.copied {\n -webkit-mask: url('complete-testwallet.svg') no-repeat center;\n mask: url('complete-testwallet.svg') no-repeat center; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcmVjZWl2ZS9EOlxcUHJvamVjdHNcXFphbm9cXHNyY1xcZ3VpXFxxdC1kYWVtb25cXGh0bWxfc291cmNlL3NyY1xcYXBwXFxyZWNlaXZlXFxyZWNlaXZlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsV0FBVyxFQUFBOztBQUdiO0VBQ0UsYUFBYTtFQUNiLHNCQUFzQjtFQUN0QixtQkFBbUIsRUFBQTs7QUFIckI7SUFNSSxjQUFjLEVBQUE7O0FBTmxCO0lBVUksYUFBYTtJQUNiLG1CQUFtQjtJQUNuQixpQkFBaUI7SUFDakIsbUJBQW1CLEVBQUE7O0FBYnZCO01BZ0JNLG1CQUFtQjtNQUNuQixhQUFhO01BQ2IsY0FBYyxFQUFBOztBQWxCcEI7UUFxQlEsOENBQXVEO2dCQUF2RCxzQ0FBdUQsRUFBQTs7QUFyQi9EO1VBd0JVLGFBQWEsRUFBQTs7QUF4QnZCO1FBNkJRLDZEQUFzRTtnQkFBdEUscURBQXNFLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9yZWNlaXZlL3JlY2VpdmUuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCB7XHJcbiAgd2lkdGg6IDEwMCU7XHJcbn1cclxuXHJcbi53cmFwLXFyIHtcclxuICBkaXNwbGF5OiBmbGV4O1xyXG4gIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XHJcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcclxuXHJcbiAgaW1nIHtcclxuICAgIG1hcmdpbjogNHJlbSAwO1xyXG4gIH1cclxuXHJcbiAgLndyYXAtYWRkcmVzcyB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcclxuICAgIGZvbnQtc2l6ZTogMS40cmVtO1xyXG4gICAgbGluZS1oZWlnaHQ6IDIuN3JlbTtcclxuXHJcbiAgICAuYnRuLWNvcHktYWRkcmVzcyB7XHJcbiAgICAgIG1hcmdpbi1sZWZ0OiAxLjJyZW07XHJcbiAgICAgIHdpZHRoOiAxLjdyZW07XHJcbiAgICAgIGhlaWdodDogMS43cmVtO1xyXG5cclxuICAgICAgJi5jb3B5IHtcclxuICAgICAgICBtYXNrOiB1cmwoLi4vLi4vYXNzZXRzL2ljb25zL2NvcHkuc3ZnKSBuby1yZXBlYXQgY2VudGVyO1xyXG5cclxuICAgICAgICAmOmhvdmVyIHtcclxuICAgICAgICAgIG9wYWNpdHk6IDAuNzU7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcblxyXG4gICAgICAmLmNvcGllZCB7XHJcbiAgICAgICAgbWFzazogdXJsKC4uLy4uL2Fzc2V0cy9pY29ucy9jb21wbGV0ZS10ZXN0d2FsbGV0LnN2Zykgbm8tcmVwZWF0IGNlbnRlcjtcclxuICAgICAgfVxyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0= */"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/receive/receive.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / receive / receive . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: ReceiveComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "ReceiveComponent" , function ( ) { return ReceiveComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var qrcode _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! qrcode */ "./node_modules/qrcode/lib/browser.js" ) ;
/* harmony import */ var qrcode _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( qrcode _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var ReceiveComponent = /** @class */ ( function ( ) {
2019-02-19 17:33:37 +02:00
function ReceiveComponent ( route , backend , variablesService ) {
2018-12-27 18:50:45 +03:00
this . route = route ;
this . backend = backend ;
this . variablesService = variablesService ;
2019-02-19 17:33:37 +02:00
this . copyAnimation = false ;
2018-12-27 18:50:45 +03:00
}
ReceiveComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
this . parentRouting = this . route . parent . params . subscribe ( function ( ) {
qrcode _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default . a . toDataURL ( _this . variablesService . currentWallet . address , {
width : 106 ,
height : 106
} ) . then ( function ( url ) {
_this . qrImageSrc = url ;
} ) . catch ( function ( err ) {
console . error ( err ) ;
} ) ;
} ) ;
} ;
ReceiveComponent . prototype . copyAddress = function ( ) {
2019-01-31 13:10:46 +02:00
var _this = this ;
2018-12-27 18:50:45 +03:00
this . backend . setClipboard ( this . variablesService . currentWallet . address ) ;
2019-02-19 17:33:37 +02:00
this . copyAnimation = true ;
this . copyAnimationTimeout = window . setTimeout ( function ( ) {
_this . copyAnimation = false ;
2019-01-31 13:10:46 +02:00
} , 2000 ) ;
2018-12-27 18:50:45 +03:00
} ;
ReceiveComponent . prototype . ngOnDestroy = function ( ) {
this . parentRouting . unsubscribe ( ) ;
2019-02-19 17:33:37 +02:00
clearTimeout ( this . copyAnimationTimeout ) ;
2018-12-27 18:50:45 +03:00
} ;
ReceiveComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-receive' ,
template : _ _webpack _require _ _ ( /*! ./receive.component.html */ "./src/app/receive/receive.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./receive.component.scss */ "./src/app/receive/receive.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "ActivatedRoute" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "VariablesService" ] ] )
] , ReceiveComponent ) ;
return ReceiveComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/restore-wallet/restore-wallet.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / restore - wallet / restore - wallet . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/main']\">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>\r\n <span>{{ 'BREADCRUMBS.RESTORE_WALLET' | translate }}</span>\r\n </div>\r\n <a class=\"back-btn\" [routerLink]=\"['/main']\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </a>\r\n </div>\r\n\r\n <form class=\"form-restore\" [formGroup]=\"restoreForm\">\r\n\r\n <div class=\"input-block half-block\">\r\n <label for=\"wallet-name\">{{ 'RESTORE_WALLET.LABEL_NAME' | translate }}</label>\r\n <input type=\"text\" id=\"wallet-name\" formControlName=\"name\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n <div class=\"error-block\" *ngIf=\"restoreForm.controls['name'].invalid && (restoreForm.controls['name'].dirty || restoreForm.controls['name'].touched)\">\r\n <div *ngIf=\"restoreForm.controls['name'].errors['required']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.NAME_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"restoreForm.controls['name'].errors['duplicate']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.NAME_DUPLICATE' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block half-block\">\r\n <label for=\"wallet-password\">{{ 'RESTORE_WALLET.PASS' | translate }}</label>\r\n <input type=\"password\" id=\"wallet-password\" formControlName=\"password\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n </div>\r\n\r\n <div class=\"input-block half-block\">\r\n <label for=\"confirm-wallet-password\">{{ 'RESTORE_WALLET.CONFIRM' | translate }}</label>\r\n <input type=\"password\" id=\"confirm-wallet-password\" formControlName=\"confirm\" [attr.disabled]=\"walletSaved ? '' : null\">\r\n <div class=\"error-block\" *ngIf=\"restoreForm.controls['password'].dirty && restoreForm.controls['confirm'].dirty && restoreForm.errors\">\r\n <div *ngIf=\"restoreForm.errors['confirm_mismatch']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.CONFIRM_NOT_MATCH' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"phrase-key\">{{ 'RESTORE_WALLET.LABEL_PHRASE_KEY' | translate }}</label>\r\n <input type=\"text\" id=\"phrase-key\" formControlName=\"key\" [attr.disabled]=\"walletSaved ? '' : null\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"restoreForm.controls['key'].invalid && (restoreForm.controls['key'].dirty || restoreForm.controls['key'].touched)\">\r\n <div *ngIf=\"restoreForm.controls['key'].errors['required']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.KEY_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"restoreForm.controls['key'].errors['key_not_valid']\">\r\n {{ 'RESTORE_WALLET.FORM_ERRORS.KEY_NOT_VALID' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wrap-buttons\">\r\n <button type=\"button\" class=\"transparent-button\" *ngIf=\"walletSaved\">{{restoreForm.controls['name'].value}}</button>\r\n <button type=\"button\" class=\"blue-button select-button\" (click)=\"saveWallet()\" [disabled]=\"!restoreForm.valid\" *ngIf=\"!walletSaved\">{{ 'RESTORE_WALLET.BUTTON_SELECT' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button create-button\" (click)=\"createWallet()\" [disabled]=\"!walletSaved\">{{ 'RESTORE_WALLET.BUTTON_CREATE' | translate }}</button>\r\n </div>\r\n\r\n </form>\r\n\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/restore-wallet/restore-wallet.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / restore - wallet / restore - wallet . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ".form-restore {\n margin: 2.4rem 0;\n width: 100%; }\n .form-restore .input-block.half-block {\n width: 50%; }\n .form-restore .wrap-buttons {\n display: flex;\n margin: 2.5rem -0.7rem;\n width: 50%; }\n .form-restore .wrap-buttons button {\n margin: 0 0.7rem; }\n .form-restore .wrap-buttons button.transparent-button {\n flex-basis: 50%; }\n .form-restore .wrap-buttons button.select-button {\n flex-basis: 60%; }\n .form-restore .wrap-buttons button.create-button {\n flex: 1 1 50%; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcmVzdG9yZS13YWxsZXQvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxccmVzdG9yZS13YWxsZXRcXHJlc3RvcmUtd2FsbGV0LmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZ0JBQWdCO0VBQ2hCLFdBQVcsRUFBQTtFQUZiO0lBT00sVUFBVSxFQUFBO0VBUGhCO0lBWUksYUFBYTtJQUNiLHNCQUFzQjtJQUN0QixVQUFVLEVBQUE7RUFkZDtNQWlCTSxnQkFBZ0IsRUFBQTtFQWpCdEI7UUFvQlEsZUFBZSxFQUFBO0VBcEJ2QjtRQXdCUSxlQUFlLEVBQUE7RUF4QnZCO1FBNEJRLGFBQWEsRUFBQSIsImZpbGUiOiJzcmMvYXBwL3Jlc3RvcmUtd2FsbGV0L3Jlc3RvcmUtd2FsbGV0LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmZvcm0tcmVzdG9yZSB7XHJcbiAgbWFyZ2luOiAyLjRyZW0gMDtcclxuICB3aWR0aDogMTAwJTtcclxuXHJcbiAgLmlucHV0LWJsb2NrIHtcclxuXHJcbiAgICAmLmhhbGYtYmxvY2sge1xyXG4gICAgICB3aWR0aDogNTAlO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgLndyYXAtYnV0dG9ucyB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgbWFyZ2luOiAyLjVyZW0gLTAuN3JlbTtcclxuICAgIHdpZHRoOiA1MCU7XHJcblxyXG4gICAgYnV0dG9uIHtcclxuICAgICAgbWFyZ2luOiAwIDAuN3JlbTtcclxuXHJcbiAgICAgICYudHJhbnNwYXJlbnQtYnV0dG9uIHtcclxuICAgICAgICBmbGV4LWJhc2lzOiA1MCU7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgICYuc2VsZWN0LWJ1dHRvbiB7XHJcbiAgICAgICAgZmxleC1iYXNpczogNjAlO1xyXG4gICAgICB9XHJcblxyXG4gICAgICAmLmNyZWF0ZS1idXR0b24ge1xyXG4gICAgICAgIGZsZXg6IDEgMSA1MCU7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19 */"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/restore-wallet/restore-wallet.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / restore - wallet / restore - wallet . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: RestoreWalletComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "RestoreWalletComponent" , function ( ) { return RestoreWalletComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2019-01-09 15:25:03 +02:00
/* harmony import */ var _helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
/* harmony import */ var _helpers _models _wallet _model _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/models/wallet.model */ "./src/app/_helpers/models/wallet.model.ts" ) ;
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-09 15:25:03 +02:00
2018-12-27 18:50:45 +03:00
var RestoreWalletComponent = /** @class */ ( function ( ) {
2019-01-09 15:25:03 +02:00
function RestoreWalletComponent ( router , backend , variablesService , modalService , ngZone , translate ) {
2018-12-27 18:50:45 +03:00
var _this = this ;
this . router = router ;
this . backend = backend ;
this . variablesService = variablesService ;
2019-01-09 15:25:03 +02:00
this . modalService = modalService ;
2018-12-27 18:50:45 +03:00
this . ngZone = ngZone ;
2019-01-09 15:25:03 +02:00
this . translate = translate ;
2018-12-27 18:50:45 +03:00
this . restoreForm = new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormGroup" ] ( {
name : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' , [ _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required , function ( g ) {
for ( var i = 0 ; i < _this . variablesService . wallets . length ; i ++ ) {
if ( g . value === _this . variablesService . wallets [ i ] . name ) {
return { 'duplicate' : true } ;
}
}
return null ;
} ] ) ,
key : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' , _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required ) ,
password : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' ) ,
confirm : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' )
} , function ( g ) {
return g . get ( 'password' ) . value === g . get ( 'confirm' ) . value ? null : { 'confirm_mismatch' : true } ;
} ) ;
this . wallet = {
id : ''
} ;
this . walletSaved = false ;
}
RestoreWalletComponent . prototype . ngOnInit = function ( ) {
} ;
RestoreWalletComponent . prototype . createWallet = function ( ) {
2019-02-19 09:51:20 +02:00
var _this = this ;
this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/seed-phrase' ] , { queryParams : { wallet _id : _this . wallet . id } } ) ;
} ) ;
2018-12-27 18:50:45 +03:00
} ;
RestoreWalletComponent . prototype . saveWallet = function ( ) {
var _this = this ;
if ( this . restoreForm . valid ) {
this . backend . isValidRestoreWalletText ( this . restoreForm . get ( 'key' ) . value , function ( valid _status , valid _data ) {
if ( valid _data === 'FALSE' ) {
_this . ngZone . run ( function ( ) {
_this . restoreForm . get ( 'key' ) . setErrors ( { key _not _valid : true } ) ;
} ) ;
}
else {
2019-01-09 15:25:03 +02:00
_this . backend . saveFileDialog ( _this . translate . instant ( 'RESTORE_WALLET.CHOOSE_PATH' ) , '*' , _this . variablesService . settings . default _path , function ( save _status , save _data ) {
2018-12-27 18:50:45 +03:00
if ( save _status ) {
_this . variablesService . settings . default _path = save _data . path . substr ( 0 , save _data . path . lastIndexOf ( '/' ) ) ;
_this . backend . restoreWallet ( save _data . path , _this . restoreForm . get ( 'password' ) . value , _this . restoreForm . get ( 'key' ) . value , function ( restore _status , restore _data ) {
if ( restore _status ) {
_this . wallet . id = restore _data . wallet _id ;
2019-01-09 15:25:03 +02:00
_this . variablesService . opening _wallet = new _helpers _models _wallet _model _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "Wallet" ] ( restore _data . wallet _id , _this . restoreForm . get ( 'name' ) . value , _this . restoreForm . get ( 'password' ) . value , restore _data [ 'wi' ] . path , restore _data [ 'wi' ] . address , restore _data [ 'wi' ] . balance , restore _data [ 'wi' ] . unlocked _balance , restore _data [ 'wi' ] . mined _total , restore _data [ 'wi' ] . tracking _hey ) ;
2019-02-07 17:45:24 +02:00
_this . variablesService . opening _wallet . alias = _this . backend . getWalletAlias ( _this . variablesService . opening _wallet . address ) ;
2018-12-27 18:50:45 +03:00
if ( restore _data . recent _history && restore _data . recent _history . history ) {
_this . variablesService . opening _wallet . prepareHistory ( restore _data . recent _history . history ) ;
}
_this . backend . getContracts ( _this . variablesService . opening _wallet . wallet _id , function ( contracts _status , contracts _data ) {
if ( contracts _status && contracts _data . hasOwnProperty ( 'contracts' ) ) {
_this . ngZone . run ( function ( ) {
_this . variablesService . opening _wallet . prepareContractsAfterOpen ( contracts _data . contracts , _this . variablesService . exp _med _ts , _this . variablesService . height _app , _this . variablesService . settings . viewedContracts , _this . variablesService . settings . notViewedContracts ) ;
} ) ;
}
} ) ;
_this . ngZone . run ( function ( ) {
_this . walletSaved = true ;
} ) ;
}
else {
2019-01-09 15:25:03 +02:00
_this . modalService . prepareModal ( 'error' , 'RESTORE_WALLET.NOT_CORRECT_FILE_OR_PASSWORD' ) ;
2018-12-27 18:50:45 +03:00
}
} ) ;
}
} ) ;
}
} ) ;
}
} ;
RestoreWalletComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-restore-wallet' ,
template : _ _webpack _require _ _ ( /*! ./restore-wallet.component.html */ "./src/app/restore-wallet/restore-wallet.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./restore-wallet.component.scss */ "./src/app/restore-wallet/restore-wallet.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Router" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "VariablesService" ] ,
2019-01-09 15:25:03 +02:00
_helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "ModalService" ] ,
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ,
_ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "TranslateService" ] ] )
2018-12-27 18:50:45 +03:00
] , RestoreWalletComponent ) ;
return RestoreWalletComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/seed-phrase/seed-phrase.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / seed - phrase / seed - phrase . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-02-19 09:51:20 +02:00
module . exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/main']\">{{ 'BREADCRUMBS.ADD_WALLET' | translate }}</span>\r\n <span>{{ 'BREADCRUMBS.SAVE_PHRASE' | translate }}</span>\r\n </div>\r\n <a class=\"back-btn\" [routerLink]=\"['/main']\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </a>\r\n </div>\r\n\r\n <h3 class=\"seed-phrase-title\">{{ 'SEED_PHRASE.TITLE' | translate }}</h3>\r\n\r\n <div class=\"seed-phrase-content\" (contextmenu)=\"variablesService.onContextMenuOnlyCopy($event, seedPhrase)\">\r\n <ng-container *ngFor=\"let word of seedPhrase.split(' '); let index = index\">\r\n <div class=\"word\">{{(index + 1) + '. ' + word}}</div>\r\n </ng-container>\r\n </div>\r\n\r\n <button type=\"button\" class=\"blue-button\" (click)=\"runWallet()\">{{ 'SEED_PHRASE.BUTTON_CREATE_ACCOUNT' | translate }}</button>\r\n\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/seed-phrase/seed-phrase.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / seed - phrase / seed - phrase . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ".seed-phrase-title {\n line-height: 2.2rem;\n padding: 2.2rem 0; }\n\n.seed-phrase-content {\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n padding: 1.4rem;\n width: 100%;\n height: 12rem; }\n\n.seed-phrase-content .word {\n line-height: 2.2rem;\n max-width: 13rem; }\n\nbutton {\n margin: 2.8rem 0;\n width: 25%;\n min-width: 1.5rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc2VlZC1waHJhc2UvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxcc2VlZC1waHJhc2VcXHNlZWQtcGhyYXNlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsbUJBQW1CO0VBQ25CLGlCQUFpQixFQUFBOztBQUduQjtFQUNFLGFBQWE7RUFDYixzQkFBc0I7RUFDdEIsZUFBZTtFQUNmLGVBQWU7RUFDZixXQUFXO0VBQ1gsYUFBYSxFQUFBOztBQU5mO0lBU0ksbUJBQW1CO0lBQ25CLGdCQUFnQixFQUFBOztBQUlwQjtFQUNFLGdCQUFnQjtFQUNoQixVQUFVO0VBQ1YsaUJBQWlCLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9zZWVkLXBocmFzZS9zZWVkLXBocmFzZS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5zZWVkLXBocmFzZS10aXRsZSB7XHJcbiAgbGluZS1oZWlnaHQ6IDIuMnJlbTtcclxuICBwYWRkaW5nOiAyLjJyZW0gMDtcclxufVxyXG5cclxuLnNlZWQtcGhyYXNlLWNvbnRlbnQge1xyXG4gIGRpc3BsYXk6IGZsZXg7XHJcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcclxuICBmbGV4LXdyYXA6IHdyYXA7XHJcbiAgcGFkZGluZzogMS40cmVtO1xyXG4gIHdpZHRoOiAxMDAlO1xyXG4gIGhlaWdodDogMTJyZW07XHJcblxyXG4gIC53b3JkIHtcclxuICAgIGxpbmUtaGVpZ2h0OiAyLjJyZW07XHJcbiAgICBtYXgtd2lkdGg6IDEzcmVtO1xyXG4gIH1cclxufVxyXG5cclxuYnV0dG9uIHtcclxuICBtYXJnaW46IDIuOHJlbSAwO1xyXG4gIHdpZHRoOiAyNSU7XHJcbiAgbWluLXdpZHRoOiAxLjVyZW07XHJcbn1cclxuIl19 */"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/seed-phrase/seed-phrase.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / seed - phrase / seed - phrase . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: SeedPhraseComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SeedPhraseComponent" , function ( ) { return SeedPhraseComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2019-03-14 16:26:29 +02:00
/* harmony import */ var _helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-03-14 16:26:29 +02:00
2018-12-27 18:50:45 +03:00
var SeedPhraseComponent = /** @class */ ( function ( ) {
2019-03-14 16:26:29 +02:00
function SeedPhraseComponent ( route , router , backend , variablesService , modalService , ngZone ) {
2018-12-27 18:50:45 +03:00
this . route = route ;
this . router = router ;
this . backend = backend ;
this . variablesService = variablesService ;
2019-03-14 16:26:29 +02:00
this . modalService = modalService ;
2018-12-27 18:50:45 +03:00
this . ngZone = ngZone ;
this . seedPhrase = '' ;
}
SeedPhraseComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
2019-01-09 15:25:03 +02:00
this . queryRouting = this . route . queryParams . subscribe ( function ( params ) {
2018-12-27 18:50:45 +03:00
if ( params . wallet _id ) {
_this . wallet _id = params . wallet _id ;
2019-01-22 14:24:34 +02:00
_this . backend . getSmartWalletInfo ( params . wallet _id , function ( status , data ) {
2018-12-27 18:50:45 +03:00
if ( data . hasOwnProperty ( 'restore_key' ) ) {
_this . ngZone . run ( function ( ) {
_this . seedPhrase = data [ 'restore_key' ] . trim ( ) ;
} ) ;
}
} ) ;
}
} ) ;
} ;
SeedPhraseComponent . prototype . runWallet = function ( ) {
var _this = this ;
var exists = false ;
this . variablesService . wallets . forEach ( function ( wallet ) {
if ( wallet . address === _this . variablesService . opening _wallet . address ) {
exists = true ;
}
} ) ;
if ( ! exists ) {
this . backend . runWallet ( this . wallet _id , function ( run _status , run _data ) {
if ( run _status ) {
_this . variablesService . wallets . push ( _this . variablesService . opening _wallet ) ;
_this . backend . storeSecureAppData ( function ( status , data ) {
console . log ( 'Store App Data' , status , data ) ;
} ) ;
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/wallet/' + _this . wallet _id ] ) ;
} ) ;
}
else {
console . log ( run _data [ 'error_code' ] ) ;
}
} ) ;
}
else {
this . variablesService . opening _wallet = null ;
2019-03-14 16:26:29 +02:00
this . modalService . prepareModal ( 'error' , 'OPEN_WALLET.WITH_ADDRESS_ALREADY_OPEN' ) ;
2018-12-27 18:50:45 +03:00
this . backend . closeWallet ( this . wallet _id , function ( close _status , close _data ) {
console . log ( close _status , close _data ) ;
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/' ] ) ;
} ) ;
} ) ;
}
} ;
2019-01-09 15:25:03 +02:00
SeedPhraseComponent . prototype . ngOnDestroy = function ( ) {
this . queryRouting . unsubscribe ( ) ;
} ;
2018-12-27 18:50:45 +03:00
SeedPhraseComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-seed-phrase' ,
template : _ _webpack _require _ _ ( /*! ./seed-phrase.component.html */ "./src/app/seed-phrase/seed-phrase.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./seed-phrase.component.scss */ "./src/app/seed-phrase/seed-phrase.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "ActivatedRoute" ] ,
_angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Router" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "VariablesService" ] ,
2019-03-14 16:26:29 +02:00
_helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "ModalService" ] ,
2018-12-27 18:50:45 +03:00
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ] )
] , SeedPhraseComponent ) ;
return SeedPhraseComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/send/send.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / send / send . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-01-30 17:18:18 +02:00
module . exports = "<form class=\"form-send\" [formGroup]=\"sendForm\" (ngSubmit)=\"onSend()\">\r\n\r\n <div class=\"input-block\">\r\n <label for=\"send-address\">{{ 'SEND.ADDRESS' | translate }}</label>\r\n <input type=\"text\" id=\"send-address\" formControlName=\"address\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"sendForm.controls['address'].invalid && (sendForm.controls['address'].dirty || sendForm.controls['address'].touched)\">\r\n <div *ngIf=\"sendForm.controls['address'].errors['required']\">\r\n {{ 'SEND.FORM_ERRORS.ADDRESS_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"sendForm.controls['address'].errors['address_not_valid']\">\r\n {{ 'SEND.FORM_ERRORS.ADDRESS_NOT_VALID' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-blocks-row\">\r\n\r\n <div class=\"input-block\">\r\n <label for=\"send-amount\">{{ 'SEND.AMOUNT' | translate }}</label>\r\n <input type=\"text\" id=\"send-amount\" formControlName=\"amount\" appInputValidate=\"money\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"sendForm.controls['amount'].invalid && (sendForm.controls['amount'].dirty || sendForm.controls['amount'].touched)\">\r\n <div *ngIf=\"sendForm.controls['amount'].errors['required']\">\r\n {{ 'SEND.FORM_ERRORS.AMOUNT_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"sendForm.controls['amount'].errors['zero']\">\r\n {{ 'SEND.FORM_ERRORS.AMOUNT_ZERO' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"send-comment\">{{ 'SEND.COMMENT' | translate }}</label>\r\n <input type=\"text\" id=\"send-comment\" formControlName=\"comment\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n </div>\r\n\r\n </div>\r\n\r\n <button type=\"button\" class=\"send-select\" (click)=\"toggleOptions()\">\r\n <span>{{ 'SEND.DETAILS' | translate }}</span><i class=\"icon arrow\" [class.down]=\"!additionalOptions\" [class.up]=\"additionalOptions\"></i>\r\n </button>\r\n\r\n <div class=\"additional-details\" *ngIf=\"additionalOptions\">\r\n\r\n <div class=\"input-block\">\r\n <label for=\"send-mixin\">{{ 'SEND.MIXIN' | translate }}</label>\r\n <input type=\"text\" id=\"send-mixin\" formControlName=\"mixin\" appInputValidate=\"integer\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"sendForm.controls['mixin'].invalid && (sendForm.controls['mixin'].dirty || sendForm.controls['mixin'].touched)\">\r\n <div *ngIf=\"sendForm.controls['mixin'].errors['required']\">\r\n {{ 'SEND.FORM_ERRORS.AMOUNT_REQUIRED' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"send-fee\">{{ 'SEND.FEE' | translate }}</label>\r\n <input type=\"text\" id=\"send-fee\" formControlName=\"fee\" appInputValidate=\"money\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"sendForm.controls['fee'].invalid && (sendForm.controls['fee'].dirty || sendForm.controls['fee'].touched)\">\r\n <div *ngIf=\"sendForm.controls['fee'].errors['required']\">\r\n {{ 'SEND.FORM_ERRORS.FEE_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"sendForm.controls['fee'].errors['less_min']\">\r\n {{ 'SEND.FORM_ERRORS.FEE_MINIMUM' | translate : {fee: variablesService.default_fee} }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <button type=\"submit\" class=\"blue-button\" [disabled]=\"!sendForm.valid || !variablesService.currentWallet.loaded\">{{ 'SEND.BUTTON' | translate }}</button>\r\n\r\n</form>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/send/send.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / send / send . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = " : host { \ n width : 100 % ; } \ n \ n . form - send . input - blocks - row { \ n display : flex ; } \ n \ n . form - send . input - blocks - row > div { \ n flex - basis : 50 % ; } \ n \ n . form - send . input - blocks - row > div : first - child { \ n margin - right : 1.5 rem ; } \ n \ n . form - send . input - blocks - row > div : last - child { \ n margin - left : 1.5 rem ; } \ n \ n . form - send . send - select { \ n display : flex ; \ n align - items : center ; \ n background : transparent ; \ n border : none ; \ n font - size : 1.3 rem ; \ n line - height : 1.3 rem ; \ n margin : 1.5 rem 0 0 ; \ n padding : 0 ; \ n width : 100 % ; \ n max - width : 15 rem ; \ n height : 1.3 rem ; } \ n \ n . form - send . send - select . arrow { \ n margin - left : 1 rem ; \ n width : 0.8 rem ; \ n height : 0.8 rem ; } \ n \ n . form - send . send - select . arrow . down { \ n - webkit - mask : url ( 'arrow-down.svg' ) no - repeat center ; \ n mask : url ( 'arrow-down.svg' ) no - repeat center ; } \ n \ n . form - send . send - select . arrow . up { \ n - webkit - mask : url ( 'arrow-up.svg' ) no - repeat center ; \ n mask : url ( 'arrow-up.svg' ) no - repeat center ; } \ n \ n . form - send . additional - details { \ n display : flex ; \ n margin - top : 1.5 rem ; \ n padding : 0.5 rem 0 2 rem ; } \ n \ n . form - send . additional - details > div { \ n flex - basis : 25 % ; } \ n \ n . form - send . additional - details > div : first - child { \ n padding - left : 1.5 rem ; \ n padding - right : 1 rem ; } \ n \ n . form - send . additional - details > div : last - child { \ n padding - left : 1 rem ; \ n padding - right : 1.5 rem ; } \ n \ n . form - send button { \ n margin : 2.4 rem 0 ; \ n width : 100 % ; \ n max - width : 15 rem ; } \ n \ n / * # sourceMappingURL = data : application / json ; base64 , eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc2VuZC9EOlxcUHJvamVjdHNcXFphbm9cXHNyY1xcZ3VpXFxxdC1kYWVtb25cXGh0bWxfc291cmNlL3NyY1xcYXBwXFxzZW5kXFxzZW5kLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsV0FBVyxFQUFBOztBQUdiO0VBR0ksYUFBYSxFQUFBOztBQUhqQjtJQU1NLGVBQWUsRUFBQTs7QUFOckI7TUFTUSxvQkFBb0IsRUFBQTs7QUFUNUI7TUFhUSxtQkFBbUIsRUFBQTs7QUFiM0I7RUFtQkksYUFBYTtFQUNiLG1CQUFtQjtFQUNuQix1QkFBdUI7RUFDdkIsWUFBWTtFQUNaLGlCQUFpQjtFQUNqQixtQkFBbUI7RUFDbkIsa0JBQWtCO0VBQ2xCLFVBQVU7RUFDVixXQUFXO0VBQ1gsZ0JBQWdCO0VBQ2hCLGNBQWMsRUFBQTs7QUE3QmxCO0lBZ0NNLGlCQUFpQjtJQUNqQixhQUFhO0lBQ2IsY0FBYyxFQUFBOztBQWxDcEI7TUFxQ1Esb0RBQTREO2NBQTVELDRDQUE0RCxFQUFBOztBQXJDcEU7TUF5Q1Esa0RBQTBEO2NBQTFELDBDQUEwRCxFQUFBOztBQXpDbEU7RUErQ0ksYUFBYTtFQUNiLGtCQUFrQjtFQUNsQixzQkFBc0IsRUFBQTs7QUFqRDFCO0lBb0RNLGVBQWUsRUFBQTs7QUFwRHJCO01BdURRLG9CQUFvQjtNQUNwQixtQkFBbUIsRUFBQTs7QUF4RDNCO01BNERRLGtCQUFrQjtNQUNsQixxQkFBcUIsRUFBQTs7QUE3RDdCO0VBbUVJLGdCQUFnQjtFQUNoQixXQUFXO0VBQ1gsZ0JBQWdCLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9zZW5kL3NlbmQuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCB7XHJcbiAgd2lkdGg6IDEwMCU7XHJcbn1cclxuXHJcbi5mb3JtLXNlbmQge1xyXG5cclxuICAuaW5wdXQtYmxvY2tzLXJvdyB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG5cclxuICAgID4gZGl2IHtcclxuICAgICAgZmxleC1iYXNpczogNTAlO1xyXG5cclxuICAgICAgJjpmaXJzdC1jaGlsZCB7XHJcbiAgICAgICAgbWFyZ2luLXJpZ2h0OiAxLjVyZW07XHJcbiAgICAgIH1cclxuXHJcbiAgICAgICY6bGFzdC1jaGlsZCB7XHJcbiAgICAgICAgbWFyZ2luLWxlZnQ6IDEuNXJlbTtcclxuICAgICAgfVxyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgLnNlbmQtc2VsZWN0IHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xyXG4gICAgYmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XHJcbiAgICBib3JkZXI6IG5vbmU7XHJcbiAgICBmb250LXNpemU6IDEuM3JlbTtcclxuICAgIGxpbmUtaGVpZ2h0OiAxLjNyZW07XHJcbiAgICBtYXJnaW46IDEuNXJlbSAwIDA7XHJcbiAgICBwYWRkaW5nOiAwO1xyXG4gICAgd2lkdGg6IDEwMCU7XHJcbiAgICBtYXgtd2lkdGg6IDE1cmVtO1xyXG4gICAgaGVpZ2h0OiAxLjNyZW07XHJcblxyXG4gICAgLmFycm93IHtcclxuICAgICAgbWFyZ2luLWxlZnQ6IDFyZW07XHJcbiAgICAgIHdpZHRoOiAwLjhyZW07XHJcbiAgICAgIGhlaWdodDogMC44cmVtO1xyXG5cclxuICAgICAgJi5kb3duIHtcclxuICAgICAgICBtYXNrOiB1cmwofnNyYy9hc3NldHMvaWNvbnMvYXJyb3ctZG93bi5zdmcpIG5vLXJlcGVhdCBjZW50ZXI7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgICYudXAge1xyXG4gICAgICAgIG1hc2s6IHVybCh + c3JjL2Fzc2V0cy9pY29ucy9hcnJvdy11cC5zdmcpIG5vLXJlcGVhdCBjZW50ZXI7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcblxyXG4gIC5hZGRpdGlvbmFsLWRldGFpbHMge1xyXG4gICAgZGlzcGxheTogZmxleDtcclxuICAgIG1hcmdpbi10b3A6IDEuNXJlbTtcclxuICAgIHBhZGRpbmc6IDAuNXJlbSAwIDJyZW07XHJcblxyXG4gICAgPiBkaXYge1xyXG4gICAgICBmbGV4LWJhc2lzOiAyNSU7XHJcblxyXG4gICAgICAmOmZpcnN0LWNoaWxkIHtcclxuICAgICAgICBwYWR
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/send/send.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / send / send . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: SendComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SendComponent" , function ( ) { return SendComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
2019-01-09 15:25:03 +02:00
/* harmony import */ var _helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
2019-01-29 16:46:36 +02:00
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! bignumber.js */ "./node_modules/bignumber.js/bignumber.js" ) ;
/* harmony import */ var bignumber _js _ _WEBPACK _IMPORTED _MODULE _6 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( bignumber _js _ _WEBPACK _IMPORTED _MODULE _6 _ _ ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-09 15:25:03 +02:00
2019-01-29 16:46:36 +02:00
2018-12-27 18:50:45 +03:00
var SendComponent = /** @class */ ( function ( ) {
2019-01-09 15:25:03 +02:00
function SendComponent ( route , backend , variablesService , modalService , ngZone ) {
2019-01-29 16:46:36 +02:00
var _this = this ;
2018-12-27 18:50:45 +03:00
this . route = route ;
this . backend = backend ;
this . variablesService = variablesService ;
2019-01-09 15:25:03 +02:00
this . modalService = modalService ;
2018-12-27 18:50:45 +03:00
this . ngZone = ngZone ;
this . currentWalletId = null ;
this . sendForm = new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormGroup" ] ( {
2019-01-30 17:18:18 +02:00
address : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' , [ _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required , function ( g ) {
if ( g . value ) {
_this . backend . validateAddress ( g . value , function ( valid _status ) {
_this . ngZone . run ( function ( ) {
if ( valid _status === false ) {
g . setErrors ( Object . assign ( { 'address_not_valid' : true } , g . errors ) ) ;
}
else {
if ( g . hasError ( 'address_not_valid' ) ) {
delete g . errors [ 'address_not_valid' ] ;
if ( Object . keys ( g . errors ) . length === 0 ) {
g . setErrors ( null ) ;
}
}
}
} ) ;
} ) ;
return ( g . hasError ( 'address_not_valid' ) ) ? { 'address_not_valid' : true } : null ;
}
return null ;
} ] ) ,
2019-01-29 16:46:36 +02:00
amount : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( null , [ _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required , function ( g ) {
2019-01-30 17:49:23 +02:00
if ( new bignumber _js _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "BigNumber" ] ( g . value ) . eq ( 0 ) ) {
2019-01-29 16:46:36 +02:00
return { 'zero' : true } ;
}
return null ;
} ] ) ,
2019-01-30 17:49:23 +02:00
comment : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( null ) ,
2018-12-27 18:50:45 +03:00
mixin : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( 0 , _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required ) ,
2019-01-29 16:46:36 +02:00
fee : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( this . variablesService . default _fee , [ _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required , function ( g ) {
if ( ( new bignumber _js _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "BigNumber" ] ( g . value ) ) . isLessThan ( _this . variablesService . default _fee ) ) {
return { 'less_min' : true } ;
}
return null ;
} ] )
2018-12-27 18:50:45 +03:00
} ) ;
this . additionalOptions = false ;
}
SendComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
this . parentRouting = this . route . parent . params . subscribe ( function ( params ) {
_this . currentWalletId = params [ 'id' ] ;
2019-01-30 17:49:23 +02:00
_this . sendForm . reset ( {
address : _this . variablesService . currentWallet . send _data [ 'address' ] ,
amount : _this . variablesService . currentWallet . send _data [ 'amount' ] ,
comment : _this . variablesService . currentWallet . send _data [ 'comment' ] ,
mixin : _this . variablesService . currentWallet . send _data [ 'mixin' ] || 0 ,
fee : _this . variablesService . currentWallet . send _data [ 'fee' ] || _this . variablesService . default _fee
} ) ;
2018-12-27 18:50:45 +03:00
} ) ;
} ;
SendComponent . prototype . onSend = function ( ) {
var _this = this ;
if ( this . sendForm . valid ) {
this . backend . validateAddress ( this . sendForm . get ( 'address' ) . value , function ( valid _status ) {
if ( valid _status === false ) {
_this . ngZone . run ( function ( ) {
_this . sendForm . get ( 'address' ) . setErrors ( { address _not _valid : true } ) ;
} ) ;
}
else {
_this . backend . sendMoney ( _this . currentWalletId , _this . sendForm . get ( 'address' ) . value , _this . sendForm . get ( 'amount' ) . value , _this . sendForm . get ( 'fee' ) . value , _this . sendForm . get ( 'mixin' ) . value , _this . sendForm . get ( 'comment' ) . value , function ( send _status , send _data ) {
if ( send _status ) {
2019-01-09 15:25:03 +02:00
_this . modalService . prepareModal ( 'success' , 'SEND.SUCCESS_SENT' ) ;
2019-01-30 17:49:23 +02:00
_this . variablesService . currentWallet . send _data = { address : null , amount : null , comment : null , mixin : null , fee : null } ;
_this . sendForm . reset ( { address : null , amount : null , comment : null , mixin : 0 , fee : _this . variablesService . default _fee } ) ;
2018-12-27 18:50:45 +03:00
}
} ) ;
}
} ) ;
}
} ;
SendComponent . prototype . toggleOptions = function ( ) {
this . additionalOptions = ! this . additionalOptions ;
} ;
SendComponent . prototype . ngOnDestroy = function ( ) {
this . parentRouting . unsubscribe ( ) ;
2019-01-30 17:49:23 +02:00
this . variablesService . currentWallet . send _data = {
address : this . sendForm . get ( 'address' ) . value ,
amount : this . sendForm . get ( 'amount' ) . value ,
comment : this . sendForm . get ( 'comment' ) . value ,
mixin : this . sendForm . get ( 'mixin' ) . value ,
fee : this . sendForm . get ( 'fee' ) . value
} ;
2018-12-27 18:50:45 +03:00
} ;
SendComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-send' ,
template : _ _webpack _require _ _ ( /*! ./send.component.html */ "./src/app/send/send.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./send.component.scss */ "./src/app/send/send.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "ActivatedRoute" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "VariablesService" ] ,
2019-01-09 15:25:03 +02:00
_helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "ModalService" ] ,
2018-12-27 18:50:45 +03:00
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ] )
] , SendComponent ) ;
return SendComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/settings/settings.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / settings / settings . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-18 17:04:17 +02:00
module . exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <button type=\"button\" class=\"back-btn\" (click)=\"back()\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </button>\r\n </div>\r\n\r\n <h3 class=\"settings-title\">{{ 'SETTINGS.TITLE' | translate }}</h3>\r\n\r\n <div class=\"theme-selection\">\r\n <div class=\"radio-block\">\r\n <input class=\"style-radio\" type=\"radio\" id=\"dark\" name=\"theme\" value=\"dark\" [checked]=\"theme == 'dark'\" (change)=\"setTheme('dark')\">\r\n <label for=\"dark\">{{ 'SETTINGS.DARK_THEME' | translate }}</label>\r\n </div>\r\n <div class=\"radio-block\">\r\n <input class=\"style-radio\" type=\"radio\" id=\"white\" name=\"theme\" value=\"white\" [checked]=\"theme == 'white'\" (change)=\"setTheme('white')\">\r\n <label for=\"white\">{{ 'SETTINGS.WHITE_THEME' | translate }}</label>\r\n </div>\r\n <div class=\"radio-block\">\r\n <input class=\"style-radio\" type=\"radio\" id=\"gray\" name=\"theme\" value=\"gray\" [checked]=\"theme == 'gray'\" (change)=\"setTheme('gray')\">\r\n <label for=\"gray\">{{ 'SETTINGS.GRAY_THEME' | translate }}</label>\r\n </div>\r\n </div>\r\n\r\n <div class=\"lock-selection\">\r\n <label class=\"lock-selection-title\">{{ 'SETTINGS.APP_LOCK.TITLE' | translate }}</label>\r\n <ng-select class=\"lock-selection-select\"\r\n [items]=\"appLockOptions\"\r\n bindValue=\"id\"\r\n bindLabel=\"name\"\r\n [(ngModel)]=\"variablesService.settings.appLockTime\"\r\n [clearable]=\"false\"\r\n [searchable]=\"false\"\r\n (change)=\"onLockChange()\">\r\n <ng-template ng-label-tmp let-item=\"item\">\r\n {{item.name | translate}}\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\">\r\n {{item.name | translate}}\r\n </ng-template>\r\n </ng-select>\r\n </div>\r\n\r\n <form class=\"master-password\" [formGroup]=\"changeForm\" (ngSubmit)=\"onSubmitChangePass()\">\r\n\r\n <span class=\"master-password-title\">{{ 'SETTINGS.MASTER_PASSWORD.TITLE' | translate }}</span>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"old-password\">{{ 'SETTINGS.MASTER_PASSWORD.OLD' | translate }}</label>\r\n <input type=\"password\" id=\"old-password\" formControlName=\"password\"/>\r\n <div class=\"error-block\" *ngIf=\"changeForm.controls['password'].invalid && (changeForm.controls['password'].dirty || changeForm.controls['password'].touched)\">\r\n <div *ngIf=\"changeForm.controls['password'].errors['required']\">\r\n {{ 'SETTINGS.FORM_ERRORS.PASS_REQUIRED' | translate }}\r\n </div>\r\n </div>\r\n <div class=\"error-block\" *ngIf=\"changeForm.invalid && changeForm.controls['password'].valid && (changeForm.controls['password'].dirty || changeForm.controls['password'].touched) && changeForm.errors && changeForm.errors.pass_mismatch\">\r\n {{ 'SETTINGS.FORM_ERRORS.PASS_NOT_MATCH' | translate }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"new-password\">{{ 'SETTINGS.MASTER_PASSWORD.NEW' | translate }}</label>\r\n <input type=\"password\" id=\"new-password\" formControlName=\"new_password\"/>\r\n <div class=\"error-block\" *ngIf=\"changeForm.controls['new_password'].invalid && (changeForm.controls['new_password'].dirty || changeForm.controls['new_password'].touched)\">\r\n <div *ngIf=\"changeForm.controls['new_password'].errors['required']\">\r\n {{ 'SETTINGS.FORM_ERRORS.PASS_REQUIRED' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"confirm-password\">{{ 'SETTINGS.MASTER_PASSWORD.CONFIRM' | translate }}</label>\r\n <input type=\"password\" id=\"confirm-password\" formControlName=\"new_confirmation\"/>\r\n <div class=\"error-block\" *ngIf=\" changeForm . controls [ 'new_confirmation' ] . invalid
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/settings/settings.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / settings / settings . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-18 17:04:17 +02:00
module . exports = ".head {\n justify-content: flex-end; }\n\n.settings-title {\n font-size: 1.7rem; }\n\n.theme-selection {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin: 2.4rem 0;\n width: 50%; }\n\n.theme-selection .radio-block {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n font-size: 1.3rem;\n line-height: 2.7rem; }\n\n.lock-selection {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin: 2.4rem 0;\n width: 50%; }\n\n.lock-selection .lock-selection-title {\n display: flex;\n font-size: 1.5rem;\n line-height: 2.7rem;\n margin-bottom: 1rem; }\n\n.master-password {\n width: 50%; }\n\n.master-password .master-password-title {\n display: flex;\n font-size: 1.5rem;\n line-height: 2.7rem;\n margin-bottom: 1rem; }\n\n.master-password button {\n margin: 2.5rem auto;\n width: 100%;\n max-width: 15rem; }\n\n.last-build {\n position: absolute;\n bottom: 3rem;\n left: 3rem;\n font-size: 1rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc2V0dGluZ3MvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxcc2V0dGluZ3NcXHNldHRpbmdzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UseUJBQXlCLEVBQUE7O0FBRzNCO0VBQ0UsaUJBQWlCLEVBQUE7O0FBR25CO0VBQ0UsYUFBYTtFQUNiLHNCQUFzQjtFQUN0Qix1QkFBdUI7RUFDdkIsZ0JBQWdCO0VBQ2hCLFVBQVUsRUFBQTs7QUFMWjtJQVFJLGFBQWE7SUFDYixtQkFBbUI7SUFDbkIsMkJBQTJCO0lBQzNCLGlCQUFpQjtJQUNqQixtQkFBbUIsRUFBQTs7QUFJdkI7RUFDRSxhQUFhO0VBQ2Isc0JBQXNCO0VBQ3RCLHVCQUF1QjtFQUN2QixnQkFBZ0I7RUFDaEIsVUFBVSxFQUFBOztBQUxaO0lBUUksYUFBYTtJQUNiLGlCQUFpQjtJQUNqQixtQkFBbUI7SUFDbkIsbUJBQW1CLEVBQUE7O0FBSXZCO0VBQ0UsVUFBVSxFQUFBOztBQURaO0lBSUksYUFBYTtJQUNiLGlCQUFpQjtJQUNqQixtQkFBbUI7SUFDbkIsbUJBQW1CLEVBQUE7O0FBUHZCO0lBV0ksbUJBQW1CO0lBQ25CLFdBQVc7SUFDWCxnQkFBZ0IsRUFBQTs7QUFJcEI7RUFDRSxrQkFBa0I7RUFDbEIsWUFBWTtFQUNaLFVBQVU7RUFDVixlQUFlLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9zZXR0aW5ncy9zZXR0aW5ncy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5oZWFkIHtcclxuICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtZW5kO1xyXG59XHJcblxyXG4uc2V0dGluZ3MtdGl0bGUge1xyXG4gIGZvbnQtc2l6ZTogMS43cmVtO1xyXG59XHJcblxyXG4udGhlbWUtc2VsZWN0aW9uIHtcclxuICBkaXNwbGF5OiBmbGV4O1xyXG4gIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XHJcbiAgYWxpZ24taXRlbXM6IGZsZXgtc3RhcnQ7XHJcbiAgbWFyZ2luOiAyLjRyZW0gMDtcclxuICB3aWR0aDogNTAlO1xyXG5cclxuICAucmFkaW8tYmxvY2sge1xyXG4gICAgZGlzcGxheTogZmxleDtcclxuICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XHJcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGZsZXgtc3RhcnQ7XHJcbiAgICBmb250LXNpemU6IDEuM3JlbTtcclxuICAgIGxpbmUtaGVpZ2h0OiAyLjdyZW07XHJcbiAgfVxyXG59XHJcblxyXG4ubG9jay1zZWxlY3Rpb24ge1xyXG4gIGRpc3BsYXk6IGZsZXg7XHJcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcclxuICBhbGlnbi1pdGVtczogZmxleC1zdGFydDtcclxuICBtYXJnaW46IDIuNHJlbSAwO1xyXG4gIHdpZHRoOiA1MCU7XHJcblxyXG4gIC5sb2NrLXNlbGVjdGlvbi10aXRsZSB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgZm9udC1zaXplOiAxLjVyZW07XHJcbiAgICBsaW5lLWhlaWdodDogMi43cmVtO1xyXG4gICAgbWFyZ2luLWJvdHRvbTogMXJlbTtcclxuICB9XHJcbn1cclxuXHJcbi5tYXN0ZXItcGFzc3dvcmQge1xyXG4gIHdpZHRoOiA1MCU7XHJcblxyXG4gIC5tYXN0ZXItcGFzc3dvcmQtdGl0bGUge1xyXG4gICAgZGlzcGxheTogZmxleDtcclxuICAgIGZvbnQtc2l6ZTogMS41cmVtO1xyXG4gICAgbGluZS1oZWlnaHQ6IDIuN3JlbTtcclxuICAgIG1hcmdpbi1ib3R0b206IDFyZW07XHJcbiAgfVxyXG5cclxuICBidXR0b24ge1xyXG4gICAgbWFyZ2luOiAyLjVyZW0gYXV0bztcclxuICAgIHdpZHRoOiAxMDAlO1xyXG4gICAgbWF4LXdpZHRoOiAxNXJlbTtcclxuICB9XHJcbn1cclxuXHJcbi5sYXN0LWJ1aWxkIHtcclxuICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgYm90dG9tOiAzcmVtO1xyXG4gIGxlZnQ6IDNyZW07XHJcbiAgZm9udC1zaXplOiAxcmVtO1xyXG59XHJcbiJdfQ== */"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/settings/settings.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / settings / settings . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: SettingsComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SettingsComponent" , function ( ) { return SettingsComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _angular _forms _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js" ) ;
/* harmony import */ var _angular _common _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js" ) ;
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var SettingsComponent = /** @class */ ( function ( ) {
function SettingsComponent ( renderer , variablesService , backend , location ) {
var _this = this ;
this . renderer = renderer ;
this . variablesService = variablesService ;
this . backend = backend ;
this . location = location ;
2019-03-18 17:04:17 +02:00
this . appLockOptions = [
{
id : 5 ,
name : 'SETTINGS.APP_LOCK.TIME1'
} ,
{
id : 15 ,
name : 'SETTINGS.APP_LOCK.TIME2'
} ,
{
id : 60 ,
name : 'SETTINGS.APP_LOCK.TIME3'
} ,
{
id : 0 ,
name : 'SETTINGS.APP_LOCK.TIME4'
}
] ;
2018-12-27 18:50:45 +03:00
this . theme = this . variablesService . settings . theme ;
this . changeForm = new _angular _forms _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "FormGroup" ] ( {
password : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "FormControl" ] ( '' , _angular _forms _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "Validators" ] . required ) ,
new _password : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "FormControl" ] ( '' , _angular _forms _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "Validators" ] . required ) ,
new _confirmation : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "FormControl" ] ( '' , _angular _forms _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "Validators" ] . required )
} , [ function ( g ) {
return g . get ( 'new_password' ) . value === g . get ( 'new_confirmation' ) . value ? null : { 'confirm_mismatch' : true } ;
} , function ( g ) {
return g . get ( 'password' ) . value === _this . variablesService . appPass ? null : { 'pass_mismatch' : true } ;
} ] ) ;
}
SettingsComponent . prototype . ngOnInit = function ( ) { } ;
SettingsComponent . prototype . setTheme = function ( theme ) {
this . renderer . removeClass ( document . body , 'theme-' + this . theme ) ;
this . theme = theme ;
this . variablesService . settings . theme = this . theme ;
this . renderer . addClass ( document . body , 'theme-' + this . theme ) ;
this . backend . storeAppData ( ) ;
} ;
SettingsComponent . prototype . onSubmitChangePass = function ( ) {
var _this = this ;
if ( this . changeForm . valid ) {
this . variablesService . appPass = this . changeForm . get ( 'new_password' ) . value ;
this . backend . storeSecureAppData ( function ( status , data ) {
if ( status ) {
_this . changeForm . reset ( ) ;
}
else {
console . log ( data ) ;
}
} ) ;
}
} ;
2019-03-18 17:04:17 +02:00
SettingsComponent . prototype . onLockChange = function ( ) {
this . variablesService . restartCountdown ( ) ;
this . backend . storeAppData ( ) ;
} ;
2018-12-27 18:50:45 +03:00
SettingsComponent . prototype . back = function ( ) {
this . location . back ( ) ;
} ;
SettingsComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-settings' ,
template : _ _webpack _require _ _ ( /*! ./settings.component.html */ "./src/app/settings/settings.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./settings.component.scss */ "./src/app/settings/settings.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Renderer2" ] , _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "VariablesService" ] , _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "BackendService" ] , _angular _common _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "Location" ] ] )
] , SettingsComponent ) ;
return SettingsComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/sidebar/sidebar.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / sidebar / sidebar . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-18 17:04:17 +02:00
module . exports = "<div class=\"sidebar-accounts\">\r\n <div class=\"sidebar-accounts-header\">\r\n <h3>{{ 'SIDEBAR.TITLE' | translate }}</h3><button [routerLink]=\"['main']\">{{ 'SIDEBAR.ADD_NEW' | translate }}</button>\r\n </div>\r\n <div class=\"sidebar-accounts-list scrolled-content\">\r\n <div class=\"sidebar-account\" *ngFor=\"let wallet of variablesService.wallets\" [class.active]=\"wallet?.wallet_id === walletActive\" [routerLink]=\"['/wallet/' + wallet.wallet_id + '/history']\">\r\n <div class=\"sidebar-account-row account-title-balance\">\r\n <span class=\"title\">{{wallet.name}}</span>\r\n <span class=\"balance\">{{wallet.balance | intToMoney : '3' }} {{variablesService.defaultCurrency}}</span>\r\n </div>\r\n <div class=\"sidebar-account-row account-alias\">\r\n <div style=\"display: flex; align-items: center;\">\r\n <span>{{wallet.alias['name']}}</span>\r\n <ng-container *ngIf=\"wallet.alias['comment'] && wallet.alias['comment'].length\">\r\n <i class=\"icon comment\" tooltip=\"{{wallet.alias['comment']}}\" placement=\"top\" tooltipClass=\"table-tooltip\" [delay]=\"500\"></i>\r\n </ng-container>\r\n </div>\r\n <span>$ {{wallet.getMoneyEquivalent(variablesService.moneyEquivalent) | intToMoney | number : '1.2-2'}}</span>\r\n </div>\r\n <div class=\"sidebar-account-row account-staking\" *ngIf=\"!(!wallet.loaded && variablesService.daemon_state === 2)\">\r\n <span class=\"text\">{{ 'SIDEBAR.ACCOUNT.STAKING' | translate }}</span>\r\n <app-staking-switch [wallet_id]=\"wallet.wallet_id\" [(staking)]=\"wallet.staking\"></app-staking-switch>\r\n </div>\r\n <div class=\"sidebar-account-row account-messages\" *ngIf=\"!(!wallet.loaded && variablesService.daemon_state === 2)\">\r\n <span class=\"text\">{{ 'SIDEBAR.ACCOUNT.MESSAGES' | translate }}</span>\r\n <span class=\"indicator\">{{wallet.new_contracts}}</span>\r\n </div>\r\n <div class=\"sidebar-account-row account-synchronization\" *ngIf=\"!wallet.loaded && variablesService.daemon_state === 2\">\r\n <span class=\"status\">{{ 'SIDEBAR.ACCOUNT.SYNCING' | translate }}</span>\r\n <div class=\"progress-bar-container\">\r\n <div class=\"progress-bar\">\r\n <div class=\"fill\" [style.width]=\"wallet.progress + '%'\"></div>\r\n </div>\r\n <div class=\"progress-percent\">{{ wallet.progress }}%</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<div class=\"sidebar-settings\">\r\n <div class=\"wrap-button\" routerLinkActive=\"active\">\r\n <button [routerLink]=\"['/settings']\">\r\n <i class=\"icon settings\"></i>\r\n <span>{{ 'SIDEBAR.SETTINGS' | translate }}</span>\r\n </button>\r\n </div>\r\n <div class=\"wrap-button\">\r\n <button (click)=\"logOut()\">\r\n <i class=\"icon logout\"></i>\r\n <span>{{ 'SIDEBAR.LOG_OUT' | translate }}</span>\r\n </button>\r\n </div>\r\n</div>\r\n<div class=\"sidebar-synchronization-status\">\r\n <div class=\"status-container\">\r\n <span class=\"offline\" *ngIf=\"variablesService.daemon_state === 0\">\r\n {{ 'SIDEBAR.SYNCHRONIZATION.OFFLINE' | translate }} <span class=\"testnet\">{{ 'SIDEBAR.SYNCHRONIZATION.TESTNET' | translate }}</span>\r\n </span>\r\n <span class=\"syncing\" *ngIf=\"variablesService.daemon_state === 1\">\r\n {{ 'SIDEBAR.SYNCHRONIZATION.SYNCING' | translate }} <span class=\"testnet\">{{ 'SIDEBAR.SYNCHRONIZATION.TESTNET' | translate }}</span>\r\n </span>\r\n <span class=\"online\" *ngIf=\"variablesService.daemon_state === 2\">\r\n {{ 'SIDEBAR.SYNCHRONIZATION.ONLINE' | translate }} <span class=\"testnet\">{{ 'SIDEBAR.SYNCHRONIZATION.TESTNET' | translate }}</span>\r\n </span>\r\n <span class=\"loading\" *ngIf=\"variablesService.daemon_state === 3\">\r\n {{ 'SIDEBAR.SYNCHRONIZATION.LOADING' | translate }}\r\n </span>\r\n <span class=\"offline\" *ngIf=\"variablesService.daemon_state === 4\" > \ r \ n { { ' SIDEBAR . SYNCH
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/sidebar/sidebar.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / sidebar / sidebar . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-18 17:04:17 +02:00
module . exports = " : host { \ n display : flex ; \ n flex - direction : column ; \ n justify - content : space - between ; \ n flex : 0 0 25 rem ; \ n padding : 0 3 rem 3 rem ; } \ n \ n . sidebar - accounts { \ n display : flex ; \ n flex - direction : column ; \ n flex : 1 1 auto ; } \ n \ n . sidebar - accounts . sidebar - accounts - header { \ n display : flex ; \ n align - items : center ; \ n justify - content : space - between ; \ n flex : 0 0 auto ; \ n height : 8 rem ; \ n font - weight : 400 ; } \ n \ n . sidebar - accounts . sidebar - accounts - header h3 { \ n font - size : 1.7 rem ; } \ n \ n . sidebar - accounts . sidebar - accounts - header button { \ n background : transparent ; \ n border : none ; \ n outline : none ; } \ n \ n . sidebar - accounts . sidebar - accounts - list { \ n display : flex ; \ n flex - direction : column ; \ n flex : 1 1 auto ; \ n margin : 0 - 3 rem ; \ n overflow - y : overlay ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account { \ n display : flex ; \ n flex - direction : column ; \ n flex - shrink : 0 ; \ n cursor : pointer ; \ n padding : 2 rem 3 rem ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row { \ n display : flex ; \ n align - items : center ; \ n justify - content : space - between ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - title - balance { \ n line - height : 2.7 rem ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - title - balance . title { \ n font - size : 1.5 rem ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - title - balance . balance { \ n font - size : 1.8 rem ; \ n font - weight : 600 ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - alias { \ n font - size : 1.3 rem ; \ n line - height : 3.4 rem ; \ n margin - bottom : 0.7 rem ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - alias . icon { \ n margin - left : 0.5 rem ; \ n width : 1.2 rem ; \ n height : 1.2 rem ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - alias . icon . comment { \ n - webkit - mask : url ( 'alert.svg' ) no - repeat center ; \ n mask : url ( 'alert.svg' ) no - repeat center ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - staking { \ n line - height : 2.9 rem ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - staking . text { \ n font - size : 1.3 rem ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - messages { \ n line - height : 2.7 rem ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - messages . text { \ n font - size : 1.3 rem ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - messages . indicator { \ n display : flex ; \ n align - items : center ; \ n justify - content : center ; \ n border - radius : 1 rem ; \ n font - size : 1 rem ; \ n min - width : 24 px ; \ n height : 16 px ; \ n padding : 0 5 px ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - synchronization { \ n flex - direction : column ; \ n height : 5.6 rem ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - synchronization . status { \ n align - self : flex - start ; \ n font - size : 1.3 rem ; \ n line - height : 2.6 rem ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - synchronization . progress - bar - container { \ n display : flex ; \ n margin : 0.4 rem 0 ; \ n height : 0.7 rem ; \ n width : 100 % ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - account - row . account - synchronization . progress - bar - container . progress - bar { \ n flex : 1 0 auto ; } \ n \ n . sidebar - accounts . sidebar - accounts - list . sidebar - account . sidebar - a
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/sidebar/sidebar.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / sidebar / sidebar . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: SidebarComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SidebarComponent" , function ( ) { return SidebarComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var SidebarComponent = /** @class */ ( function ( ) {
2019-02-19 09:51:20 +02:00
function SidebarComponent ( route , router , variablesService , ngZone ) {
2018-12-27 18:50:45 +03:00
this . route = route ;
this . router = router ;
this . variablesService = variablesService ;
2019-02-19 09:51:20 +02:00
this . ngZone = ngZone ;
2018-12-27 18:50:45 +03:00
}
SidebarComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
if ( this . router . url . indexOf ( '/wallet/' ) !== - 1 ) {
var localPathArr = this . router . url . split ( '/' ) ;
if ( localPathArr . length >= 3 ) {
this . walletActive = parseInt ( localPathArr [ 2 ] , 10 ) ;
}
}
else if ( this . router . url . indexOf ( '/details' ) !== - 1 ) {
this . walletActive = this . variablesService . currentWallet . wallet _id ;
}
else {
this . walletActive = null ;
}
this . walletSubRouting = this . router . events . subscribe ( function ( event ) {
if ( event instanceof _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "NavigationStart" ] ) {
if ( event . url . indexOf ( '/wallet/' ) !== - 1 ) {
var localPathArr = event . url . split ( '/' ) ;
if ( localPathArr . length >= 3 ) {
_this . walletActive = parseInt ( localPathArr [ 2 ] , 10 ) ;
}
}
else if ( event . url . indexOf ( '/details' ) !== - 1 ) {
_this . walletActive = _this . variablesService . currentWallet . wallet _id ;
}
else {
_this . walletActive = null ;
}
}
} ) ;
} ;
SidebarComponent . prototype . logOut = function ( ) {
2019-02-19 09:51:20 +02:00
var _this = this ;
2018-12-27 18:50:45 +03:00
this . variablesService . stopCountdown ( ) ;
this . variablesService . appPass = '' ;
2019-02-19 09:51:20 +02:00
this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/login' ] , { queryParams : { type : 'auth' } } ) ;
} ) ;
2018-12-27 18:50:45 +03:00
} ;
2019-02-19 16:15:00 +02:00
SidebarComponent . prototype . ngOnDestroy = function ( ) {
this . walletSubRouting . unsubscribe ( ) ;
} ;
2018-12-27 18:50:45 +03:00
SidebarComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-sidebar' ,
template : _ _webpack _require _ _ ( /*! ./sidebar.component.html */ "./src/app/sidebar/sidebar.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./sidebar.component.scss */ "./src/app/sidebar/sidebar.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ActivatedRoute" ] ,
_angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Router" ] ,
2019-02-19 09:51:20 +02:00
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "VariablesService" ] ,
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ] )
2018-12-27 18:50:45 +03:00
] , SidebarComponent ) ;
return SidebarComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/staking/staking.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / staking / staking . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-02-20 18:01:18 +02:00
module . exports = "<div class=\"chart-header\">\r\n <div class=\"general\">\r\n <div>\r\n <span class=\"label\">{{ 'STAKING.TITLE' | translate }}</span>\r\n <span class=\"value\">\r\n <app-staking-switch [wallet_id]=\"variablesService.currentWallet.wallet_id\" [(staking)]=\"variablesService.currentWallet.staking\"></app-staking-switch>\r\n </span>\r\n </div>\r\n <div>\r\n <span class=\"label\">{{ 'STAKING.TITLE_PENDING' | translate }}</span>\r\n <span class=\"value\">{{pending.total | intToMoney}} {{variablesService.defaultCurrency}}</span>\r\n </div>\r\n <div>\r\n <span class=\"label\">{{ 'STAKING.TITLE_TOTAL' | translate }}</span>\r\n <span class=\"value\">{{total | intToMoney}} {{variablesService.defaultCurrency}}</span>\r\n </div>\r\n </div>\r\n <div class=\"selected\" *ngIf=\"selectedDate && selectedDate.date\">\r\n <span>{{selectedDate.date | date : 'MMM. EEEE, dd, yyyy'}}</span>\r\n <span>{{selectedDate.amount}} {{variablesService.defaultCurrency}}</span>\r\n </div>\r\n</div>\r\n\r\n<div class=\"chart\">\r\n <div [chart]=\"chart\"></div>\r\n</div>\r\n\r\n<div class=\"chart-options\">\r\n <div class=\"title\">\r\n {{ 'STAKING.TITLE_PERIOD' | translate }}\r\n </div>\r\n <div class=\"options\">\r\n <ng-container *ngFor=\"let period of periods\">\r\n <button type=\"button\" [class.active]=\"period.active\" (click)=\"changePeriod(period)\">{{period.title}}</button>\r\n </ng-container>\r\n </div>\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/staking/staking.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / staking / staking . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = " : host { \ n display : flex ; \ n flex - direction : column ; \ n width : 100 % ; } \ n \ n . chart - header { \ n display : flex ; \ n flex : 0 0 auto ; } \ n \ n . chart - header . general { \ n display : flex ; \ n flex - direction : column ; \ n align - items : flex - start ; \ n justify - content : center ; \ n flex - grow : 1 ; \ n font - size : 1.3 rem ; \ n margin : - 0.5 rem 0 ; } \ n \ n . chart - header . general > div { \ n display : flex ; \ n align - items : center ; \ n margin : 0.5 rem 0 ; \ n height : 2 rem ; } \ n \ n . chart - header . general > div . label { \ n display : inline - block ; \ n width : 9 rem ; } \ n \ n . chart - header . selected { \ n display : flex ; \ n flex - direction : column ; \ n align - items : flex - end ; \ n justify - content : center ; \ n flex - grow : 1 ; \ n font - size : 1.8 rem ; } \ n \ n . chart - header . selected span { \ n line - height : 2.9 rem ; } \ n \ n . chart { \ n display : flex ; \ n align - items : center ; \ n flex : 1 1 auto ; \ n min - height : 40 rem ; } \ n \ n . chart > div { \ n width : 100 % ; \ n height : 100 % ; } \ n \ n . chart - options { \ n display : flex ; \ n align - items : center ; \ n height : 2.4 rem ; \ n flex : 0 0 auto ; } \ n \ n . chart - options . title { \ n font - size : 1.3 rem ; \ n width : 9 rem ; } \ n \ n . chart - options . options { \ n display : flex ; \ n justify - content : space - between ; \ n flex - grow : 1 ; \ n height : 100 % ; } \ n \ n . chart - options . options button { \ n display : flex ; \ n align - items : center ; \ n justify - content : center ; \ n flex : 1 1 auto ; \ n cursor : pointer ; \ n font - size : 1.3 rem ; \ n margin : 0 0.1 rem ; \ n padding : 0 ; \ n height : 100 % ; } \ n \ n / * # sourceMappingURL = data : application / json ; base64 , eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvc3Rha2luZy9EOlxcUHJvamVjdHNcXFphbm9cXHNyY1xcZ3VpXFxxdC1kYWVtb25cXGh0bWxfc291cmNlL3NyY1xcYXBwXFxzdGFraW5nXFxzdGFraW5nLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsYUFBYTtFQUNiLHNCQUFzQjtFQUN0QixXQUFXLEVBQUE7O0FBR2I7RUFDRSxhQUFhO0VBQ2IsY0FBYyxFQUFBOztBQUZoQjtJQUtJLGFBQWE7SUFDYixzQkFBc0I7SUFDdEIsdUJBQXVCO0lBQ3ZCLHVCQUF1QjtJQUN2QixZQUFZO0lBQ1osaUJBQWlCO0lBQ2pCLGlCQUFpQixFQUFBOztBQVhyQjtNQWNNLGFBQWE7TUFDYixtQkFBbUI7TUFDbkIsZ0JBQWdCO01BQ2hCLFlBQVksRUFBQTs7QUFqQmxCO1FBb0JRLHFCQUFxQjtRQUNyQixXQUFXLEVBQUE7O0FBckJuQjtJQTJCSSxhQUFhO0lBQ2Isc0JBQXNCO0lBQ3RCLHFCQUFxQjtJQUNyQix1QkFBdUI7SUFDdkIsWUFBWTtJQUNaLGlCQUFpQixFQUFBOztBQWhDckI7TUFtQ00sbUJBQW1CLEVBQUE7O0FBS3pCO0VBQ0UsYUFBYTtFQUNiLG1CQUFtQjtFQUNuQixjQUFjO0VBQ2QsaUJBQWlCLEVBQUE7O0FBSm5CO0lBT0ksV0FBVztJQUNYLFlBQVksRUFBQTs7QUFJaEI7RUFDRSxhQUFhO0VBQ2IsbUJBQW1CO0VBQ25CLGNBQWM7RUFDZCxjQUFjLEVBQUE7O0FBSmhCO0lBT0ksaUJBQWlCO0lBQ2pCLFdBQVcsRUFBQTs7QUFSZjtJQVlJLGFBQWE7SUFDYiw4QkFBOEI7SUFDOUIsWUFBWTtJQUNaLFlBQVksRUFBQTs7QUFmaEI7TUFrQk0sYUFBYTtNQUNiLG1CQUFtQjtNQUNuQix1QkFBdUI7TUFDdkIsY0FBYztNQUNkLGVBQWU7TUFDZixpQkFBaUI7TUFDakIsZ0JBQWdCO01BQ2hCLFVBQVU7TUFDVixZQUFZLEVBQUEiLCJmaWxlIjoic3JjL2FwcC9zdGFraW5nL3N0YWtpbmcuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCB7XHJcbiAgZGlzcGxheTogZmxleDtcclxuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uY2hhcnQtaGVhZGVyIHtcclxuICBkaXNwbGF5OiBmbGV4O1xyXG4gIGZsZXg6IDAgMCBhdXRvO1xyXG5cclxuICAuZ2VuZXJhbCB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcclxuICAgIGFsaWduLWl0ZW1zOiBmbGV4LXN0YXJ0O1xyXG4gICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XHJcbiAgICBmbGV4LWdyb3c6IDE7XHJcbiAgICBmb250LXNpemU6IDEuM3JlbTtcclxuICAgIG1hcmdpbjogLTAuNXJlbSAwO1xyXG5cclxuICAgID4gZGl2IHtcclxuICAgICAgZGlzcGxheTogZmxleDtcclxuICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcclxuICAgICAgbWFyZ2luOiAwLjVyZW0gMDtcclxuICAgICAgaGVpZ2h0OiAycmVtO1xyXG5cclxuICAgICAgLmxhYmVsIHtcclxuICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XHJcbiAgICAgICAgd2lkdGg6IDlyZW07XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcblxyXG4gIC5zZWxlY3RlZCB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcclxuICAgIGFsaWduLWl0ZW1zOiBmbGV4LWVuZDtcclxuICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xyXG4gICAgZmxleC1ncm93OiAxO1xyXG4gICAgZm9udC1zaXplOiAxLjhyZW07XHJcblxyXG4gICAgc3BhbiB7XHJcbiAgICAgIGxpbmUtaGVpZ2h0OiAyLjlyZW07XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcblxyXG4uY2hhcnQge1xyXG4gIGRpc3BsYXk6IGZsZXg7XHJcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcclxuICBmbGV4OiAxIDEgYXV0bztcclxuICBt
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/staking/staking.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / staking / staking . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: StakingComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "StakingComponent" , function ( ) { return StakingComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
/* harmony import */ var angular _highcharts _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! angular-highcharts */ "./node_modules/angular-highcharts/fesm5/angular-highcharts.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/pipes/int-to-money.pipe */ "./src/app/_helpers/pipes/int-to-money.pipe.ts" ) ;
2019-01-31 16:10:02 +02:00
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-31 16:10:02 +02:00
2018-12-27 18:50:45 +03:00
var StakingComponent = /** @class */ ( function ( ) {
2019-01-31 16:10:02 +02:00
function StakingComponent ( route , variablesService , backend , ngZone , intToMoneyPipe , translate ) {
2018-12-27 18:50:45 +03:00
this . route = route ;
this . variablesService = variablesService ;
this . backend = backend ;
this . ngZone = ngZone ;
this . intToMoneyPipe = intToMoneyPipe ;
2019-01-31 16:10:02 +02:00
this . translate = translate ;
2018-12-27 18:50:45 +03:00
this . periods = [
{
2019-01-31 16:10:02 +02:00
title : this . translate . instant ( 'STAKING.DAY' ) ,
key : '1 day' ,
2018-12-27 18:50:45 +03:00
active : false
} ,
{
2019-01-31 16:10:02 +02:00
title : this . translate . instant ( 'STAKING.WEEK' ) ,
key : '1 week' ,
2018-12-27 18:50:45 +03:00
active : false
} ,
{
2019-01-31 16:10:02 +02:00
title : this . translate . instant ( 'STAKING.MONTH' ) ,
key : '1 month' ,
2018-12-27 18:50:45 +03:00
active : false
} ,
{
2019-01-31 16:10:02 +02:00
title : this . translate . instant ( 'STAKING.YEAR' ) ,
key : '1 year' ,
2018-12-27 18:50:45 +03:00
active : false
} ,
{
2019-01-31 16:10:02 +02:00
title : this . translate . instant ( 'STAKING.ALL' ) ,
key : 'All' ,
2018-12-27 18:50:45 +03:00
active : true
}
] ;
this . selectedDate = {
date : null ,
amount : null
} ;
this . originalData = [ ] ;
this . total = 0 ;
this . pending = {
list : [ ] ,
total : 0
} ;
}
StakingComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
this . parentRouting = this . route . parent . params . subscribe ( function ( ) {
_this . getMiningHistory ( ) ;
} ) ;
this . heightAppEvent = this . variablesService . getHeightAppEvent . subscribe ( function ( newHeight ) {
if ( _this . pending . total ) {
var pendingCount = _this . pending . list . length ;
for ( var i = pendingCount - 1 ; i >= 0 ; i -- ) {
if ( newHeight - _this . pending . list [ i ] . h >= 10 ) {
_this . pending . list . splice ( i , 1 ) ;
}
}
if ( pendingCount !== _this . pending . list . length ) {
_this . pending . total = 0 ;
for ( var i = 0 ; i < _this . pending . list . length ; i ++ ) {
_this . pending . total += _this . pending . list [ i ] . a ;
}
}
}
} ) ;
this . refreshStackingEvent = this . variablesService . getRefreshStackingEvent . subscribe ( function ( wallet _id ) {
if ( _this . variablesService . currentWallet . wallet _id === wallet _id ) {
_this . getMiningHistory ( ) ;
}
} ) ;
} ;
StakingComponent . prototype . drawChart = function ( data ) {
var _this = this ;
this . chart = new angular _highcharts _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Chart" ] ( {
title : { text : '' } ,
credits : { enabled : false } ,
exporting : { enabled : false } ,
legend : { enabled : false } ,
chart : {
type : 'line' ,
backgroundColor : 'transparent' ,
height : null ,
zoomType : null
} ,
yAxis : {
min : 0 ,
tickAmount : 5 ,
title : {
text : ''
} ,
gridLineColor : '#2b3644' ,
gridLineWidth : 2 ,
lineColor : '#2b3644' ,
lineWidth : 2 ,
tickWidth : 2 ,
tickLength : 120 ,
tickColor : '#2b3644' ,
labels : {
y : - 8 ,
align : 'left' ,
x : - 120 ,
style : {
'color' : '#e0e0e0' ,
'fontSize' : '13px'
} ,
format : '{value} ' + this . variablesService . defaultCurrency
} ,
showLastLabel : false ,
} ,
xAxis : {
type : 'datetime' ,
gridLineColor : '#2b3644' ,
lineColor : '#2b3644' ,
lineWidth : 2 ,
tickWidth : 2 ,
tickLength : 10 ,
tickColor : '#2b3644' ,
labels : {
style : {
'color' : '#e0e0e0' ,
'fontSize' : '13px'
}
} ,
minPadding : 0 ,
maxPadding : 0 ,
minRange : 86400000 ,
// tickInterval: 86400000,
minTickInterval : 3600000 ,
} ,
tooltip : {
enabled : false
} ,
plotOptions : {
area : {
fillColor : {
linearGradient : {
x1 : 0 ,
y1 : 0 ,
x2 : 0 ,
y2 : 1
} ,
stops : [
[ 0 , 'rgba(124,181,236,0.2)' ] ,
[ 1 , 'rgba(124,181,236,0)' ]
]
} ,
marker : {
enabled : false ,
radius : 2
} ,
lineWidth : 2 ,
threshold : null
} ,
series : {
point : {
events : {
mouseOver : function ( obj ) {
_this . selectedDate . date = obj . target [ 'x' ] ;
_this . selectedDate . amount = obj . target [ 'y' ] ;
}
}
} ,
events : {
mouseOut : function ( ) {
_this . selectedDate . date = null ;
_this . selectedDate . amount = null ;
}
}
}
} ,
series : [
{
type : 'area' ,
data : data
}
]
} ) ;
} ;
StakingComponent . prototype . getMiningHistory = function ( ) {
var _this = this ;
if ( this . variablesService . currentWallet . loaded ) {
this . backend . getMiningHistory ( this . variablesService . currentWallet . wallet _id , function ( status , data ) {
_this . total = 0 ;
_this . pending . list = [ ] ;
_this . pending . total = 0 ;
_this . originalData = [ ] ;
if ( data . mined _entries ) {
data . mined _entries . forEach ( function ( item , key ) {
if ( item . t . toString ( ) . length === 10 ) {
data . mined _entries [ key ] . t = ( new Date ( item . t * 1000 ) ) . setUTCMilliseconds ( 0 ) ;
}
} ) ;
data . mined _entries . forEach ( function ( item ) {
_this . total += item . a ;
if ( _this . variablesService . height _app - item . h < 10 ) {
_this . pending . list . push ( item ) ;
_this . pending . total += item . a ;
}
_this . originalData . push ( [ parseInt ( item . t , 10 ) , parseFloat ( _this . intToMoneyPipe . transform ( item . a ) ) ] ) ;
} ) ;
_this . originalData = _this . originalData . sort ( function ( a , b ) {
return a [ 0 ] - b [ 0 ] ;
} ) ;
}
_this . ngZone . run ( function ( ) {
_this . drawChart ( JSON . parse ( JSON . stringify ( _this . originalData ) ) ) ;
} ) ;
} ) ;
}
} ;
StakingComponent . prototype . changePeriod = function ( period ) {
this . periods . forEach ( function ( p ) {
p . active = false ;
} ) ;
period . active = true ;
var d = new Date ( ) ;
var min = null ;
var newData = [ ] ;
2019-01-31 16:10:02 +02:00
if ( period . key === '1 day' ) {
2018-12-27 18:50:45 +03:00
this . originalData . forEach ( function ( item ) {
var time = ( new Date ( item [ 0 ] ) ) . setUTCMinutes ( 0 , 0 , 0 ) ;
var find = newData . find ( function ( itemNew ) { return itemNew [ 0 ] === time ; } ) ;
if ( find ) {
find [ 1 ] += item [ 1 ] ;
}
else {
newData . push ( [ time , item [ 1 ] ] ) ;
}
} ) ;
this . chart . ref . series [ 0 ] . setData ( newData , true ) ;
min = Date . UTC ( d . getFullYear ( ) , d . getMonth ( ) , d . getDate ( ) - 1 , 0 , 0 , 0 , 0 ) ;
}
2019-01-31 16:10:02 +02:00
else if ( period . key === '1 week' ) {
2018-12-27 18:50:45 +03:00
this . originalData . forEach ( function ( item ) {
var time = ( new Date ( item [ 0 ] ) ) . setUTCHours ( 0 , 0 , 0 , 0 ) ;
var find = newData . find ( function ( itemNew ) { return itemNew [ 0 ] === time ; } ) ;
if ( find ) {
find [ 1 ] += item [ 1 ] ;
}
else {
newData . push ( [ time , item [ 1 ] ] ) ;
}
} ) ;
this . chart . ref . series [ 0 ] . setData ( newData , true ) ;
min = Date . UTC ( d . getFullYear ( ) , d . getMonth ( ) , d . getDate ( ) - 7 , 0 , 0 , 0 , 0 ) ;
}
2019-01-31 16:10:02 +02:00
else if ( period . key === '1 month' ) {
2018-12-27 18:50:45 +03:00
this . originalData . forEach ( function ( item ) {
var time = ( new Date ( item [ 0 ] ) ) . setUTCHours ( 0 , 0 , 0 , 0 ) ;
var find = newData . find ( function ( itemNew ) { return itemNew [ 0 ] === time ; } ) ;
if ( find ) {
find [ 1 ] += item [ 1 ] ;
}
else {
newData . push ( [ time , item [ 1 ] ] ) ;
}
} ) ;
this . chart . ref . series [ 0 ] . setData ( newData , true ) ;
min = Date . UTC ( d . getFullYear ( ) , d . getMonth ( ) - 1 , d . getDate ( ) , 0 , 0 , 0 , 0 ) ;
}
2019-01-31 16:10:02 +02:00
else if ( period . key === '1 year' ) {
2018-12-27 18:50:45 +03:00
this . originalData . forEach ( function ( item ) {
var time = ( new Date ( item [ 0 ] ) ) . setUTCHours ( 0 , 0 , 0 , 0 ) ;
var find = newData . find ( function ( itemNew ) { return itemNew [ 0 ] === time ; } ) ;
if ( find ) {
find [ 1 ] += item [ 1 ] ;
}
else {
newData . push ( [ time , item [ 1 ] ] ) ;
}
} ) ;
this . chart . ref . series [ 0 ] . setData ( newData , true ) ;
min = Date . UTC ( d . getFullYear ( ) - 1 , d . getMonth ( ) , d . getDate ( ) , 0 , 0 , 0 , 0 ) ;
}
else {
this . chart . ref . series [ 0 ] . setData ( this . originalData , true ) ;
}
this . chart . ref . xAxis [ 0 ] . setExtremes ( min , null ) ;
} ;
StakingComponent . prototype . ngOnDestroy = function ( ) {
this . parentRouting . unsubscribe ( ) ;
this . heightAppEvent . unsubscribe ( ) ;
this . refreshStackingEvent . unsubscribe ( ) ;
} ;
StakingComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-staking' ,
template : _ _webpack _require _ _ ( /*! ./staking.component.html */ "./src/app/staking/staking.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./staking.component.scss */ "./src/app/staking/staking.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "ActivatedRoute" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "VariablesService" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "BackendService" ] ,
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ,
2019-01-31 16:10:02 +02:00
_helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "IntToMoneyPipe" ] ,
_ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "TranslateService" ] ] )
2018-12-27 18:50:45 +03:00
] , StakingComponent ) ;
return StakingComponent ;
} ( ) ) ;
2019-02-15 16:28:31 +02:00
/***/ } ) ,
/***/ "./src/app/transfer-alias/transfer-alias.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / transfer - alias / transfer - alias . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-02-20 17:25:26 +02:00
module . exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span [routerLink]=\"['/wallet/' + wallet.wallet_id + '/history']\">{{ wallet.name }}</span>\r\n <span>{{ 'BREADCRUMBS.TRANSFER_ALIAS' | translate }}</span>\r\n </div>\r\n <button class=\"back-btn\" (click)=\"back()\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </button>\r\n </div>\r\n\r\n <form class=\"form-transfer\">\r\n\r\n <div class=\"input-block alias-name\">\r\n <label for=\"alias-name\">\r\n {{ 'EDIT_ALIAS.NAME.LABEL' | translate }}\r\n </label>\r\n <input type=\"text\" id=\"alias-name\" [value]=\"alias.name\" placeholder=\"{{ 'EDIT_ALIAS.NAME.PLACEHOLDER' | translate }}\" readonly>\r\n </div>\r\n\r\n <div class=\"input-block textarea\">\r\n <label for=\"alias-comment\">\r\n {{ 'EDIT_ALIAS.COMMENT.LABEL' | translate }}\r\n </label>\r\n <textarea id=\"alias-comment\" [value]=\"alias.comment\" placeholder=\"{{ 'EDIT_ALIAS.COMMENT.PLACEHOLDER' | translate }}\" readonly></textarea>\r\n </div>\r\n\r\n <div class=\"input-block alias-transfer-address\">\r\n <label for=\"alias-transfer\">\r\n {{ 'TRANSFER_ALIAS.ADDRESS.LABEL' | translate }}\r\n </label>\r\n <input type=\"text\" id=\"alias-transfer\" [(ngModel)]=\"transferAddress\" [ngModelOptions]=\"{standalone: true}\" (ngModelChange)=\"changeAddress()\" placeholder=\"{{ 'TRANSFER_ALIAS.ADDRESS.PLACEHOLDER' | translate }}\" (contextmenu)=\"variablesService.onContextMenu($event)\">\r\n <div class=\"error-block\" *ngIf=\"transferAddress.length > 0 && (transferAddressAlias || !transferAddressValid || (transferAddressValid && !permissionSend) || notEnoughMoney)\">\r\n <div *ngIf=\"!transferAddressValid\">\r\n {{ 'TRANSFER_ALIAS.FORM_ERRORS.WRONG_ADDRESS' | translate }}\r\n </div>\r\n <div *ngIf=\"transferAddressAlias || (transferAddressValid && !permissionSend)\">\r\n {{ 'TRANSFER_ALIAS.FORM_ERRORS.ALIAS_EXISTS' | translate }}\r\n </div>\r\n <div *ngIf=\"notEnoughMoney\">\r\n {{ 'TRANSFER_ALIAS.FORM_ERRORS.NO_MONEY' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"alias-cost\">{{ \"TRANSFER_ALIAS.COST\" | translate : {value: variablesService.default_fee, currency: variablesService.defaultCurrency} }}</div>\r\n\r\n <div class=\"wrap-buttons\">\r\n <button type=\"button\" class=\"blue-button\" (click)=\"transferAlias()\" [disabled]=\"transferAddressAlias || !transferAddressValid || notEnoughMoney\">{{ 'TRANSFER_ALIAS.BUTTON_TRANSFER' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button\" (click)=\"back()\">{{ 'TRANSFER_ALIAS.BUTTON_CANCEL' | translate }}</button>\r\n </div>\r\n\r\n </form>\r\n\r\n</div>\r\n"
2019-02-15 16:28:31 +02:00
/***/ } ) ,
/***/ "./src/app/transfer-alias/transfer-alias.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / transfer - alias / transfer - alias . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ".form-transfer {\n margin: 2.4rem 0; }\n .form-transfer .alias-name {\n width: 50%; }\n .form-transfer .alias-cost {\n font-size: 1.3rem;\n margin-top: 2rem; }\n .form-transfer .wrap-buttons {\n display: flex;\n justify-content: space-between;\n margin: 2.5rem -0.7rem; }\n .form-transfer .wrap-buttons button {\n margin: 0 0.7rem;\n width: 15rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvdHJhbnNmZXItYWxpYXMvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxcdHJhbnNmZXItYWxpYXNcXHRyYW5zZmVyLWFsaWFzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZ0JBQWdCLEVBQUE7RUFEbEI7SUFJSSxVQUFVLEVBQUE7RUFKZDtJQVFJLGlCQUFpQjtJQUNqQixnQkFBZ0IsRUFBQTtFQVRwQjtJQWFJLGFBQWE7SUFDYiw4QkFBOEI7SUFDOUIsc0JBQXNCLEVBQUE7RUFmMUI7TUFrQk0sZ0JBQWdCO01BQ2hCLFlBQVksRUFBQSIsImZpbGUiOiJzcmMvYXBwL3RyYW5zZmVyLWFsaWFzL3RyYW5zZmVyLWFsaWFzLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmZvcm0tdHJhbnNmZXIge1xyXG4gIG1hcmdpbjogMi40cmVtIDA7XHJcblxyXG4gIC5hbGlhcy1uYW1lIHtcclxuICAgIHdpZHRoOiA1MCU7XHJcbiAgfVxyXG5cclxuICAuYWxpYXMtY29zdCB7XHJcbiAgICBmb250LXNpemU6IDEuM3JlbTtcclxuICAgIG1hcmdpbi10b3A6IDJyZW07XHJcbiAgfVxyXG5cclxuICAud3JhcC1idXR0b25zIHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XHJcbiAgICBtYXJnaW46IDIuNXJlbSAtMC43cmVtO1xyXG5cclxuICAgIGJ1dHRvbiB7XHJcbiAgICAgIG1hcmdpbjogMCAwLjdyZW07XHJcbiAgICAgIHdpZHRoOiAxNXJlbTtcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19 */"
2019-02-15 16:28:31 +02:00
/***/ } ) ,
/***/ "./src/app/transfer-alias/transfer-alias.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / transfer - alias / transfer - alias . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: TransferAliasComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "TransferAliasComponent" , function ( ) { return TransferAliasComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _common _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
/* harmony import */ var _helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/modal.service */ "./src/app/_helpers/services/modal.service.ts" ) ;
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var TransferAliasComponent = /** @class */ ( function ( ) {
function TransferAliasComponent ( location , router , backend , variablesService , modalService , ngZone ) {
this . location = location ;
this . router = router ;
this . backend = backend ;
this . variablesService = variablesService ;
this . modalService = modalService ;
this . ngZone = ngZone ;
this . transferAddress = '' ;
2019-02-19 16:15:00 +02:00
this . requestProcessing = false ;
2019-02-15 16:28:31 +02:00
}
TransferAliasComponent . prototype . ngOnInit = function ( ) {
this . wallet = this . variablesService . currentWallet ;
var alias = this . backend . getWalletAlias ( this . wallet . address ) ;
this . alias = {
name : alias . name ,
address : alias . address ,
comment : alias . comment ,
tracking _key : alias . tracking _key
} ;
this . notEnoughMoney = this . wallet . unlocked _balance . isLessThan ( this . variablesService . default _fee _big ) ;
} ;
TransferAliasComponent . prototype . changeAddress = function ( ) {
var _this = this ;
this . backend . validateAddress ( this . transferAddress , function ( status ) {
_this . transferAddressValid = status ;
if ( status ) {
_this . backend . getPoolInfo ( function ( statusPool , dataPool ) {
if ( dataPool . hasOwnProperty ( 'aliases_que' ) && dataPool . aliases _que . length ) {
2019-02-20 17:25:26 +02:00
_this . setStatus ( ! dataPool . aliases _que . some ( function ( el ) { return el . address === _this . transferAddress ; } ) ) ;
2019-02-15 16:28:31 +02:00
}
else {
_this . setStatus ( status ) ;
}
} ) ;
}
else {
_this . setStatus ( false ) ;
}
} ) ;
} ;
TransferAliasComponent . prototype . setStatus = function ( statusSet ) {
var _this = this ;
this . permissionSend = statusSet ;
if ( statusSet ) {
2019-02-20 17:25:26 +02:00
this . backend . getAliasByAddress ( this . transferAddress , function ( status ) {
2019-02-15 16:28:31 +02:00
_this . ngZone . run ( function ( ) {
if ( status ) {
_this . transferAddressAlias = true ;
_this . permissionSend = false ;
}
else {
_this . transferAddressAlias = false ;
}
} ) ;
} ) ;
}
else {
this . ngZone . run ( function ( ) {
_this . transferAddressAlias = false ;
} ) ;
}
} ;
TransferAliasComponent . prototype . transferAlias = function ( ) {
var _this = this ;
2019-02-19 16:15:00 +02:00
if ( this . requestProcessing || ! this . permissionSend || ! this . transferAddressValid || this . notEnoughMoney ) {
2019-02-15 16:28:31 +02:00
return ;
}
2019-02-19 16:15:00 +02:00
this . requestProcessing = true ;
2019-02-15 16:28:31 +02:00
var newAlias = {
name : this . alias . name ,
address : this . transferAddress ,
comment : this . alias . comment ,
tracking _key : this . alias . tracking _key
} ;
this . backend . updateAlias ( this . wallet . wallet _id , newAlias , this . variablesService . default _fee , function ( status , data ) {
if ( status && data . hasOwnProperty ( 'success' ) && data . success ) {
_this . modalService . prepareModal ( 'info' , 'TRANSFER_ALIAS.REQUEST_SEND_REG' ) ;
2019-02-19 09:51:20 +02:00
_this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/wallet/' + _this . wallet . wallet _id ] ) ;
} ) ;
2019-02-15 16:28:31 +02:00
}
2019-02-19 16:15:00 +02:00
_this . requestProcessing = false ;
2019-02-15 16:28:31 +02:00
} ) ;
} ;
TransferAliasComponent . prototype . back = function ( ) {
this . location . back ( ) ;
} ;
TransferAliasComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-transfer-alias' ,
template : _ _webpack _require _ _ ( /*! ./transfer-alias.component.html */ "./src/app/transfer-alias/transfer-alias.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./transfer-alias.component.scss */ "./src/app/transfer-alias/transfer-alias.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _common _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Location" ] ,
_angular _router _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Router" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "VariablesService" ] ,
_helpers _services _modal _service _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "ModalService" ] ,
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ] )
] , TransferAliasComponent ) ;
return TransferAliasComponent ;
} ( ) ) ;
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/typing-message/typing-message.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / typing - message / typing - message . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
module . exports = "<div class=\"head\">\r\n <div class=\"interlocutor\">\r\n @bitmain\r\n </div>\r\n <a class=\"back-btn\" [routerLink]=\"['/main']\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </a>\r\n</div>\r\n\r\n<div class=\"messages-content\">\r\n <div class=\"messages-list scrolled-content\">\r\n <div class=\"date\">10:39</div>\r\n <div class=\"my\">\r\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\r\n </div>\r\n <div class=\"buddy\">\r\n Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\r\n </div>\r\n <div class=\"my\">\r\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\r\n </div>\r\n <div class=\"buddy\">\r\n Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\r\n </div>\r\n <div class=\"date\">11:44</div>\r\n <div class=\"my\">\r\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\r\n </div>\r\n <div class=\"buddy\">\r\n Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\r\n </div>\r\n <div class=\"my\">\r\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\r\n </div>\r\n <div class=\"date\">12:15</div>\r\n <div class=\"my\">\r\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\r\n </div>\r\n <div class=\"buddy\">\r\n Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\r\n </div>\r\n <div class=\"my\">\r\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\r\n </div>\r\n <div class=\"date\">13:13</div>\r\n <div class=\"my\">\r\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\r\n </div>\r\n <div class=\"buddy\">\r\n Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\r\n </div>\r\n <div class=\"my\">\r\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\r\n </div>\r\n </div>\r\n <div class=\"type-message\">\r\n <div class=\"input-block textarea\">\r\n <textarea placeholder=\"{{ 'MESSAGES.SEND_PLACEHOLDER' | translate }}\"></textarea>\r\n </div>\r\n <button type=\"button\" class=\"blue-button\">{{ 'MESSAGES.SEND_BUTTON' | translate }}</button>\r\n </div>\r\n</div>\r\n"
/***/ } ) ,
/***/ "./src/app/typing-message/typing-message.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / typing - message / typing - message . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ":host {\n display: flex;\n flex-direction: column;\n width: 100%; }\n\n.head {\n flex: 0 0 auto;\n box-sizing: content-box;\n margin: -3rem -3rem 0; }\n\n.messages-content {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n flex-grow: 1; }\n\n.messages-content .messages-list {\n display: flex;\n flex-direction: column;\n font-size: 1.3rem;\n margin: 1rem -3rem;\n padding: 0 3rem;\n overflow-y: overlay; }\n\n.messages-content .messages-list div {\n margin: 0.7rem 0; }\n\n.messages-content .messages-list div.date {\n text-align: center; }\n\n.messages-content .messages-list div.my, .messages-content .messages-list div.buddy {\n position: relative;\n padding: 1.8rem;\n max-width: 60%; }\n\n.messages-content .messages-list div.buddy {\n align-self: flex-end; }\n\n.messages-content .type-message {\n display: flex;\n flex: 0 0 auto;\n width: 100%;\n height: 4.2rem; }\n\n.messages-content .type-message .input-block {\n width: 100%; }\n\n.messages-content .type-message .input-block > textarea {\n min-height: 4.2rem; }\n\n.messages-content .type-message button {\n flex: 0 0 15rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvdHlwaW5nLW1lc3NhZ2UvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxcdHlwaW5nLW1lc3NhZ2VcXHR5cGluZy1tZXNzYWdlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsYUFBYTtFQUNiLHNCQUFzQjtFQUN0QixXQUFXLEVBQUE7O0FBR2I7RUFDRSxjQUFjO0VBQ2QsdUJBQXVCO0VBQ3ZCLHFCQUFxQixFQUFBOztBQUd2QjtFQUNFLGFBQWE7RUFDYixzQkFBc0I7RUFDdEIsOEJBQThCO0VBQzlCLFlBQVksRUFBQTs7QUFKZDtJQU9JLGFBQWE7SUFDYixzQkFBc0I7SUFDdEIsaUJBQWlCO0lBQ2pCLGtCQUFrQjtJQUNsQixlQUFlO0lBQ2YsbUJBQW1CLEVBQUE7O0FBWnZCO01BZU0sZ0JBQWdCLEVBQUE7O0FBZnRCO1FBa0JRLGtCQUFrQixFQUFBOztBQWxCMUI7UUFzQlEsa0JBQWtCO1FBQ2xCLGVBQWU7UUFDZixjQUFjLEVBQUE7O0FBeEJ0QjtRQTRCUSxvQkFBb0IsRUFBQTs7QUE1QjVCO0lBa0NJLGFBQWE7SUFDYixjQUFjO0lBQ2QsV0FBVztJQUNYLGNBQWMsRUFBQTs7QUFyQ2xCO01Bd0NNLFdBQVcsRUFBQTs7QUF4Q2pCO1FBMkNRLGtCQUFrQixFQUFBOztBQTNDMUI7TUFnRE0sZUFBZSxFQUFBIiwiZmlsZSI6InNyYy9hcHAvdHlwaW5nLW1lc3NhZ2UvdHlwaW5nLW1lc3NhZ2UuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCB7XHJcbiAgZGlzcGxheTogZmxleDtcclxuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xyXG4gIHdpZHRoOiAxMDAlO1xyXG59XHJcblxyXG4uaGVhZCB7XHJcbiAgZmxleDogMCAwIGF1dG87XHJcbiAgYm94LXNpemluZzogY29udGVudC1ib3g7XHJcbiAgbWFyZ2luOiAtM3JlbSAtM3JlbSAwO1xyXG59XHJcblxyXG4ubWVzc2FnZXMtY29udGVudCB7XHJcbiAgZGlzcGxheTogZmxleDtcclxuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xyXG4gIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtcclxuICBmbGV4LWdyb3c6IDE7XHJcblxyXG4gIC5tZXNzYWdlcy1saXN0IHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xyXG4gICAgZm9udC1zaXplOiAxLjNyZW07XHJcbiAgICBtYXJnaW46IDFyZW0gLTNyZW07XHJcbiAgICBwYWRkaW5nOiAwIDNyZW07XHJcbiAgICBvdmVyZmxvdy15OiBvdmVybGF5O1xyXG5cclxuICAgIGRpdiB7XHJcbiAgICAgIG1hcmdpbjogMC43cmVtIDA7XHJcblxyXG4gICAgICAmLmRhdGUge1xyXG4gICAgICAgIHRleHQtYWxpZ246IGNlbnRlcjtcclxuICAgICAgfVxyXG5cclxuICAgICAgJi5teSwgJi5idWRkeSB7XHJcbiAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xyXG4gICAgICAgIHBhZGRpbmc6IDEuOHJlbTtcclxuICAgICAgICBtYXgtd2lkdGg6IDYwJTtcclxuICAgICAgfVxyXG5cclxuICAgICAgJi5idWRkeSB7XHJcbiAgICAgICAgYWxpZ24tc2VsZjogZmxleC1lbmQ7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcblxyXG4gIC50eXBlLW1lc3NhZ2Uge1xyXG4gICAgZGlzcGxheTogZmxleDtcclxuICAgIGZsZXg6IDAgMCBhdXRvO1xyXG4gICAgd2lkdGg6IDEwMCU7XHJcbiAgICBoZWlnaHQ6IDQuMnJlbTtcclxuXHJcbiAgICAuaW5wdXQtYmxvY2sge1xyXG4gICAgICB3aWR0aDogMTAwJTtcclxuXHJcbiAgICAgID4gdGV4dGFyZWEge1xyXG4gICAgICAgIG1pbi1oZWlnaHQ6IDQuMnJlbTtcclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGJ1dHRvbiB7XHJcbiAgICAgIGZsZXg6IDAgMCAxNXJlbTtcclxuICAgIH1cclxuICB9XHJcbn1cclxuXHJcbiJdfQ== */"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/typing-message/typing-message.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / typing - message / typing - message . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: TypingMessageComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "TypingMessageComponent" , function ( ) { return TypingMessageComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var TypingMessageComponent = /** @class */ ( function ( ) {
function TypingMessageComponent ( route ) {
this . route = route ;
this . route . params . subscribe ( function ( params ) { return console . log ( params ) ; } ) ;
}
TypingMessageComponent . prototype . ngOnInit = function ( ) {
} ;
TypingMessageComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-typing-message' ,
template : _ _webpack _require _ _ ( /*! ./typing-message.component.html */ "./src/app/typing-message/typing-message.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./typing-message.component.scss */ "./src/app/typing-message/typing-message.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ActivatedRoute" ] ] )
] , TypingMessageComponent ) ;
return TypingMessageComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/wallet-details/wallet-details.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / wallet - details / wallet - details . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-02-19 09:51:20 +02:00
module . exports = "<div class=\"content\">\r\n\r\n <div class=\"head\">\r\n <div class=\"breadcrumbs\">\r\n <span (click)=\"back()\">{{variablesService.currentWallet.name}}</span>\r\n <span>{{ 'BREADCRUMBS.WALLET_DETAILS' | translate }}</span>\r\n </div>\r\n <button type=\"button\" class=\"back-btn\" (click)=\"back()\">\r\n <i class=\"icon back\"></i>\r\n <span>{{ 'COMMON.BACK' | translate }}</span>\r\n </button>\r\n </div>\r\n\r\n <form class=\"form-details\" [formGroup]=\"detailsForm\" (ngSubmit)=\"onSubmitEdit()\">\r\n\r\n <div class=\"input-block\">\r\n <label for=\"wallet-name\">{{ 'WALLET_DETAILS.LABEL_NAME' | translate }}</label>\r\n <input type=\"text\" id=\"wallet-name\" formControlName=\"name\">\r\n <div class=\"error-block\" *ngIf=\"detailsForm.controls['name'].invalid && (detailsForm.controls['name'].dirty || detailsForm.controls['name'].touched)\">\r\n <div *ngIf=\"detailsForm.controls['name'].errors['required']\">\r\n {{ 'WALLET_DETAILS.FORM_ERRORS.NAME_REQUIRED' | translate }}\r\n </div>\r\n <div *ngIf=\"detailsForm.controls['name'].errors['duplicate']\">\r\n {{ 'WALLET_DETAILS.FORM_ERRORS.NAME_DUPLICATE' | translate }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-block\">\r\n <label for=\"wallet-location\">{{ 'WALLET_DETAILS.LABEL_FILE_LOCATION' | translate }}</label>\r\n <input type=\"text\" id=\"wallet-location\" formControlName=\"path\" readonly>\r\n </div>\r\n\r\n <div class=\"input-block textarea\">\r\n <label for=\"seed-phrase\">{{ 'WALLET_DETAILS.LABEL_SEED_PHRASE' | translate }}</label>\r\n <div class=\"seed-phrase\" id=\"seed-phrase\">\r\n <div class=\"seed-phrase-hint\" (click)=\"showSeedPhrase()\" *ngIf=\"!showSeed\">{{ 'WALLET_DETAILS.SEED_PHRASE_HINT' | translate }}</div>\r\n <div class=\"seed-phrase-content\" *ngIf=\"showSeed\" (contextmenu)=\"variablesService.onContextMenuOnlyCopy($event, seedPhrase)\">\r\n <ng-container *ngFor=\"let word of seedPhrase.split(' '); let index = index\">\r\n <div class=\"word\">{{(index + 1) + '. ' + word}}</div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wallet-buttons\">\r\n <button type=\"submit\" class=\"blue-button\" [disabled]=\"!detailsForm.valid\">{{ 'WALLET_DETAILS.BUTTON_SAVE' | translate }}</button>\r\n <button type=\"button\" class=\"blue-button\" (click)=\"closeWallet()\">{{ 'WALLET_DETAILS.BUTTON_REMOVE' | translate }}</button>\r\n </div>\r\n\r\n </form>\r\n\r\n</div>\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/wallet-details/wallet-details.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / wallet - details / wallet - details . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = ".form-details {\n margin-top: 1.8rem; }\n .form-details .input-block:first-child {\n width: 50%; }\n .form-details .seed-phrase {\n display: flex;\n font-size: 1.4rem;\n line-height: 1.5rem;\n padding: 1.4rem;\n width: 100%;\n height: 8.8rem; }\n .form-details .seed-phrase .seed-phrase-hint {\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n width: 100%;\n height: 100%; }\n .form-details .seed-phrase .seed-phrase-content {\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n width: 100%;\n height: 100%; }\n .form-details .wallet-buttons {\n display: flex;\n align-items: center;\n justify-content: space-between; }\n .form-details .wallet-buttons button {\n margin: 2.9rem 0;\n width: 100%;\n max-width: 15rem; }\n\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvd2FsbGV0LWRldGFpbHMvRDpcXFByb2plY3RzXFxaYW5vXFxzcmNcXGd1aVxccXQtZGFlbW9uXFxodG1sX3NvdXJjZS9zcmNcXGFwcFxcd2FsbGV0LWRldGFpbHNcXHdhbGxldC1kZXRhaWxzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0Usa0JBQWtCLEVBQUE7RUFEcEI7SUFNTSxVQUFVLEVBQUE7RUFOaEI7SUFXSSxhQUFhO0lBQ2IsaUJBQWlCO0lBQ2pCLG1CQUFtQjtJQUNuQixlQUFlO0lBQ2YsV0FBVztJQUNYLGNBQWMsRUFBQTtFQWhCbEI7TUFtQk0sYUFBYTtNQUNiLG1CQUFtQjtNQUNuQix1QkFBdUI7TUFDdkIsZUFBZTtNQUNmLFdBQVc7TUFDWCxZQUFZLEVBQUE7RUF4QmxCO01BNEJNLGFBQWE7TUFDYixzQkFBc0I7TUFDdEIsZUFBZTtNQUNmLFdBQVc7TUFDWCxZQUFZLEVBQUE7RUFoQ2xCO0lBcUNJLGFBQWE7SUFDYixtQkFBbUI7SUFDbkIsOEJBQThCLEVBQUE7RUF2Q2xDO01BMENNLGdCQUFnQjtNQUNoQixXQUFXO01BQ1gsZ0JBQWdCLEVBQUEiLCJmaWxlIjoic3JjL2FwcC93YWxsZXQtZGV0YWlscy93YWxsZXQtZGV0YWlscy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5mb3JtLWRldGFpbHMge1xyXG4gIG1hcmdpbi10b3A6IDEuOHJlbTtcclxuXHJcbiAgLmlucHV0LWJsb2NrIHtcclxuXHJcbiAgICAmOmZpcnN0LWNoaWxkIHtcclxuICAgICAgd2lkdGg6IDUwJTtcclxuICAgIH1cclxuICB9XHJcblxyXG4gIC5zZWVkLXBocmFzZSB7XHJcbiAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgZm9udC1zaXplOiAxLjRyZW07XHJcbiAgICBsaW5lLWhlaWdodDogMS41cmVtO1xyXG4gICAgcGFkZGluZzogMS40cmVtO1xyXG4gICAgd2lkdGg6IDEwMCU7XHJcbiAgICBoZWlnaHQ6IDguOHJlbTtcclxuXHJcbiAgICAuc2VlZC1waHJhc2UtaGludCB7XHJcbiAgICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XHJcbiAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xyXG4gICAgICBjdXJzb3I6IHBvaW50ZXI7XHJcbiAgICAgIHdpZHRoOiAxMDAlO1xyXG4gICAgICBoZWlnaHQ6IDEwMCU7XHJcbiAgICB9XHJcblxyXG4gICAgLnNlZWQtcGhyYXNlLWNvbnRlbnQge1xyXG4gICAgICBkaXNwbGF5OiBmbGV4O1xyXG4gICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xyXG4gICAgICBmbGV4LXdyYXA6IHdyYXA7XHJcbiAgICAgIHdpZHRoOiAxMDAlO1xyXG4gICAgICBoZWlnaHQ6IDEwMCU7XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAud2FsbGV0LWJ1dHRvbnMge1xyXG4gICAgZGlzcGxheTogZmxleDtcclxuICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XHJcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47XHJcblxyXG4gICAgYnV0dG9uIHtcclxuICAgICAgbWFyZ2luOiAyLjlyZW0gMDtcclxuICAgICAgd2lkdGg6IDEwMCU7XHJcbiAgICAgIG1heC13aWR0aDogMTVyZW07XHJcbiAgICB9XHJcbiAgfVxyXG5cclxufVxyXG4iXX0= */"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/wallet-details/wallet-details.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / wallet - details / wallet - details . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: WalletDetailsComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "WalletDetailsComponent" , function ( ) { return WalletDetailsComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _angular _common _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js" ) ;
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
var WalletDetailsComponent = /** @class */ ( function ( ) {
function WalletDetailsComponent ( router , backend , variablesService , ngZone , location ) {
var _this = this ;
this . router = router ;
this . backend = backend ;
this . variablesService = variablesService ;
this . ngZone = ngZone ;
this . location = location ;
this . seedPhrase = '' ;
this . showSeed = false ;
this . detailsForm = new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormGroup" ] ( {
name : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' , [ _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Validators" ] . required , function ( g ) {
for ( var i = 0 ; i < _this . variablesService . wallets . length ; i ++ ) {
2019-01-29 16:46:36 +02:00
if ( g . value === _this . variablesService . wallets [ i ] . name ) {
if ( _this . variablesService . wallets [ i ] . wallet _id === _this . variablesService . currentWallet . wallet _id ) {
return { 'same' : true } ;
}
else {
return { 'duplicate' : true } ;
}
2018-12-27 18:50:45 +03:00
}
}
return null ;
} ] ) ,
path : new _angular _forms _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FormControl" ] ( '' )
} ) ;
}
WalletDetailsComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
this . showSeed = false ;
this . detailsForm . get ( 'name' ) . setValue ( this . variablesService . currentWallet . name ) ;
this . detailsForm . get ( 'path' ) . setValue ( this . variablesService . currentWallet . path ) ;
2019-01-22 14:24:34 +02:00
this . backend . getSmartWalletInfo ( this . variablesService . currentWallet . wallet _id , function ( status , data ) {
2018-12-27 18:50:45 +03:00
if ( data . hasOwnProperty ( 'restore_key' ) ) {
_this . ngZone . run ( function ( ) {
_this . seedPhrase = data [ 'restore_key' ] . trim ( ) ;
} ) ;
}
} ) ;
} ;
WalletDetailsComponent . prototype . showSeedPhrase = function ( ) {
this . showSeed = true ;
} ;
WalletDetailsComponent . prototype . onSubmitEdit = function ( ) {
2019-02-19 09:51:20 +02:00
var _this = this ;
2018-12-27 18:50:45 +03:00
if ( this . detailsForm . value ) {
this . variablesService . currentWallet . name = this . detailsForm . get ( 'name' ) . value ;
2019-02-19 09:51:20 +02:00
this . ngZone . run ( function ( ) {
_this . router . navigate ( [ '/wallet/' + _this . variablesService . currentWallet . wallet _id ] ) ;
} ) ;
2018-12-27 18:50:45 +03:00
}
} ;
WalletDetailsComponent . prototype . closeWallet = function ( ) {
var _this = this ;
this . backend . closeWallet ( this . variablesService . currentWallet . wallet _id , function ( ) {
for ( var i = _this . variablesService . wallets . length - 1 ; i >= 0 ; i -- ) {
if ( _this . variablesService . wallets [ i ] . wallet _id === _this . variablesService . currentWallet . wallet _id ) {
_this . variablesService . wallets . splice ( i , 1 ) ;
}
}
_this . backend . storeSecureAppData ( function ( ) {
_this . ngZone . run ( function ( ) {
if ( _this . variablesService . wallets . length ) {
_this . variablesService . currentWallet = _this . variablesService . wallets [ 0 ] ;
_this . router . navigate ( [ '/wallet/' + _this . variablesService . currentWallet . wallet _id ] ) ;
}
else {
_this . router . navigate ( [ '/' ] ) ;
}
} ) ;
} ) ;
} ) ;
} ;
WalletDetailsComponent . prototype . back = function ( ) {
this . location . back ( ) ;
} ;
WalletDetailsComponent . prototype . ngOnDestroy = function ( ) { } ;
WalletDetailsComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-wallet-details' ,
template : _ _webpack _require _ _ ( /*! ./wallet-details.component.html */ "./src/app/wallet-details/wallet-details.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./wallet-details.component.scss */ "./src/app/wallet-details/wallet-details.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "Router" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "VariablesService" ] ,
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ,
_angular _common _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "Location" ] ] )
] , WalletDetailsComponent ) ;
return WalletDetailsComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/app/wallet/wallet.component.html" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / wallet / wallet . component . html * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-02-20 17:25:26 +02:00
module . exports = "<div class=\"header\">\r\n <div>\r\n <h3>{{variablesService.currentWallet.name}}</h3>\r\n <!--<button (click)=\"openInBrowser('docs.zano.org/docs/how-to-get-alias')\">-->\r\n <button [routerLink]=\"['/assign-alias']\" *ngIf=\"!variablesService.currentWallet.alias.hasOwnProperty('name') && variablesService.currentWallet.loaded && variablesService.daemon_state === 2 && variablesService.currentWallet.alias_available\">\r\n <i class=\"icon account\"></i>\r\n <span>{{ 'WALLET.REGISTER_ALIAS' | translate }}</span>\r\n </button>\r\n <div class=\"alias\" *ngIf=\"variablesService.currentWallet.alias.hasOwnProperty('name') && variablesService.currentWallet.loaded && variablesService.daemon_state === 2\">\r\n <span>{{variablesService.currentWallet.alias['name']}}</span>\r\n <ng-container *ngIf=\"variablesService.currentWallet.alias_available\">\r\n <i class=\"icon edit\" [routerLink]=\"['/edit-alias']\"></i>\r\n <i class=\"icon transfer\" [routerLink]=\"['/transfer-alias']\"></i>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div>\r\n <button [routerLink]=\"['/details']\" routerLinkActive=\"active\">\r\n <i class=\"icon details\"></i>\r\n <span>{{ 'WALLET.DETAILS' | translate }}</span>\r\n </button>\r\n <!--<button (click)=\"closeWallet()\">\r\n <i class=\"icon lock\"></i>\r\n <span>{{ 'WALLET.LOCK' | translate }}</span>\r\n </button>-->\r\n </div>\r\n</div>\r\n<div class=\"address\">\r\n <span>{{variablesService.currentWallet.address}}</span>\r\n <i class=\"icon\" [class.copy]=\"!copyAnimation\" [class.copied]=\"copyAnimation\" (click)=\"copyAddress()\"></i>\r\n</div>\r\n<div class=\"balance\">\r\n <span [tooltip]=\"getTooltip()\" [placement]=\"'bottom'\" [tooltipClass]=\"'balance-tooltip'\" [delay]=\"300\" [timeout]=\"0\">{{variablesService.currentWallet.balance | intToMoney : '3'}} {{variablesService.defaultCurrency}}</span>\r\n <span>$ {{variablesService.currentWallet.getMoneyEquivalent(variablesService.moneyEquivalent) | intToMoney | number : '1.2-2'}}</span>\r\n</div>\r\n<div class=\"tabs\">\r\n <div class=\"tabs-header\">\r\n <ng-container *ngFor=\"let tab of tabs; let index = index\">\r\n <div class=\"tab\" [class.active]=\"tab.active\" [class.disabled]=\"(tab.link === '/send' || tab.link === '/contracts' || tab.link === '/staking') && variablesService.daemon_state !== 2\" (click)=\"changeTab(index)\">\r\n <i class=\"icon\" [ngClass]=\"tab.icon\"></i>\r\n <span>{{ tab.title | translate }}</span>\r\n <span class=\"indicator\" *ngIf=\"tab.indicator\">{{variablesService.currentWallet.new_contracts}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div #scrolledContent class=\"tabs-content scrolled-content\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n</div>\r\n\r\n"
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/wallet/wallet.component.scss" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / wallet / wallet . component . scss * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports ) {
2019-03-14 16:26:29 +02:00
module . exports = " : host { \ n position : relative ; \ n display : flex ; \ n flex - direction : column ; \ n padding : 0 3 rem 3 rem ; \ n min - width : 95 rem ; \ n width : 100 % ; \ n height : 100 % ; } \ n \ n . header { \ n display : flex ; \ n align - items : center ; \ n justify - content : space - between ; \ n flex : 0 0 auto ; \ n height : 8 rem ; } \ n \ n . header > div { \ n display : flex ; \ n align - items : center ; } \ n \ n . header > div : not ( : last - child ) { \ n margin - right : 3.2 rem ; } \ n \ n . header h3 { \ n font - size : 1.7 rem ; \ n font - weight : 600 ; } \ n \ n . header button { \ n display : flex ; \ n align - items : center ; \ n background : transparent ; \ n border : none ; \ n cursor : pointer ; \ n font - weight : 400 ; \ n outline : none ; \ n padding : 0 ; } \ n \ n . header button . icon { \ n margin - right : 1.2 rem ; \ n width : 1.7 rem ; \ n height : 1.7 rem ; } \ n \ n . header button . icon . account { \ n - webkit - mask : url ( 'account.svg' ) no - repeat center ; \ n mask : url ( 'account.svg' ) no - repeat center ; } \ n \ n . header button . icon . details { \ n - webkit - mask : url ( 'details.svg' ) no - repeat center ; \ n mask : url ( 'details.svg' ) no - repeat center ; } \ n \ n . header button . icon . lock { \ n - webkit - mask : url ( 'lock.svg' ) no - repeat center ; \ n mask : url ( 'lock.svg' ) no - repeat center ; } \ n \ n . header . alias { \ n display : flex ; \ n align - items : center ; \ n font - size : 1.3 rem ; } \ n \ n . header . alias . icon { \ n cursor : pointer ; \ n margin - right : 1.2 rem ; \ n width : 1.7 rem ; \ n height : 1.7 rem ; } \ n \ n . header . alias . icon . edit { \ n - webkit - mask : url ( 'details.svg' ) no - repeat center ; \ n mask : url ( 'details.svg' ) no - repeat center ; } \ n \ n . header . alias . icon . transfer { \ n - webkit - mask : url ( 'send.svg' ) no - repeat center ; \ n mask : url ( 'send.svg' ) no - repeat center ; } \ n \ n . address { \ n display : flex ; \ n align - items : center ; \ n flex : 0 0 auto ; \ n font - size : 1.4 rem ; \ n line - height : 1.7 rem ; } \ n \ n . address . icon { \ n cursor : pointer ; \ n margin - left : 1.2 rem ; \ n width : 1.7 rem ; \ n height : 1.7 rem ; } \ n \ n . address . icon . copy { \ n - webkit - mask : url ( 'copy.svg' ) no - repeat center ; \ n mask : url ( 'copy.svg' ) no - repeat center ; } \ n \ n . address . icon . copy : hover { \ n opacity : 0.75 ; } \ n \ n . address . icon . copied { \ n - webkit - mask : url ( 'complete-testwallet.svg' ) no - repeat center ; \ n mask : url ( 'complete-testwallet.svg' ) no - repeat center ; } \ n \ n . balance { \ n display : flex ; \ n align - items : flex - end ; \ n justify - content : flex - start ; \ n flex : 0 0 auto ; \ n margin : 2.6 rem 0 ; } \ n \ n . balance : first - child { \ n font - size : 3.3 rem ; \ n font - weight : 600 ; \ n line - height : 2.4 rem ; \ n margin - right : 3.5 rem ; } \ n \ n . balance : last - child { \ n font - size : 1.8 rem ; \ n font - weight : 600 ; \ n line - height : 1.3 rem ; } \ n \ n . tabs { \ n display : flex ; \ n flex - direction : column ; \ n flex : 1 1 auto ; } \ n \ n . tabs . tabs - header { \ n display : flex ; \ n justify - content : space - between ; \ n flex : 0 0 auto ; } \ n \ n . tabs . tabs - header . tab { \ n display : flex ; \ n align - items : center ; \ n justify - content : center ; \ n flex : 1 0 auto ; \ n cursor : pointer ; \ n padding : 0 1 rem ; \ n height : 5 rem ; } \ n \ n . tabs . tabs - header . tab . icon { \ n margin - right : 1.3 rem ; \ n width : 1.7 rem ; \ n height : 1.7 rem ; } \ n \ n . tabs . tabs - header . tab . icon . send { \ n - webkit - mask : url ( 'send.svg' ) no - repeat center ; \ n mask : url ( 'send.svg' ) no - repeat center ; } \ n \ n . tabs . tabs - header . tab . icon . receive { \ n - webkit - mask : url ( 'receive.svg' ) no - repeat center ; \ n mask : url ( 'receive.svg' ) no - repeat center ; } \ n \ n . tabs . tabs - header . tab . icon . history { \ n - webkit - mask : url ( 'history.svg' ) no - repeat center ; \ n mask : url ( 'history.svg' ) no - repeat center ; } \ n \ n . tabs . tabs - header . tab . icon . contracts { \ n - webkit - mask : url ( 'contracts.svg' ) no - repeat center ; \ n mask : url ( 'contracts.svg' ) no - repeat center ; } \ n \ n . tabs . tabs - header . tab . icon . messages { \ n - webkit - mask : url ( 'message.svg' ) no - repeat center ; \ n mask : url ( 'message.svg' ) no - repeat center ; } \ n \ n . t
2018-12-27 18:50:45 +03:00
/***/ } ) ,
/***/ "./src/app/wallet/wallet.component.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / app / wallet / wallet . component . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: WalletComponent */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "WalletComponent" , function ( ) { return WalletComponent ; } ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js" ) ;
/* harmony import */ var _helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/variables.service */ "./src/app/_helpers/services/variables.service.ts" ) ;
/* harmony import */ var _helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/services/backend.service */ "./src/app/_helpers/services/backend.service.ts" ) ;
2019-01-17 16:48:37 +02:00
/* harmony import */ var _ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( /*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js" ) ;
/* harmony import */ var _helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( /*! ../_helpers/pipes/int-to-money.pipe */ "./src/app/_helpers/pipes/int-to-money.pipe.ts" ) ;
2018-12-27 18:50:45 +03:00
var _ _decorate = ( undefined && undefined . _ _decorate ) || function ( decorators , target , key , desc ) {
var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
} ;
var _ _metadata = ( undefined && undefined . _ _metadata ) || function ( k , v ) {
if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
} ;
2019-01-17 16:48:37 +02:00
2018-12-27 18:50:45 +03:00
var WalletComponent = /** @class */ ( function ( ) {
2019-02-19 17:33:37 +02:00
function WalletComponent ( route , router , backend , variablesService , ngZone , translate , intToMoneyPipe ) {
2018-12-27 18:50:45 +03:00
this . route = route ;
this . router = router ;
this . backend = backend ;
this . variablesService = variablesService ;
this . ngZone = ngZone ;
2019-01-17 16:48:37 +02:00
this . translate = translate ;
this . intToMoneyPipe = intToMoneyPipe ;
2019-02-19 17:33:37 +02:00
this . copyAnimation = false ;
2018-12-27 18:50:45 +03:00
this . tabs = [
2019-01-09 15:25:03 +02:00
{
title : 'WALLET.TABS.HISTORY' ,
icon : 'history' ,
link : '/history' ,
indicator : false ,
active : true
} ,
2018-12-27 18:50:45 +03:00
{
title : 'WALLET.TABS.SEND' ,
icon : 'send' ,
link : '/send' ,
indicator : false ,
2019-01-09 15:25:03 +02:00
active : false
2018-12-27 18:50:45 +03:00
} ,
{
title : 'WALLET.TABS.RECEIVE' ,
icon : 'receive' ,
link : '/receive' ,
indicator : false ,
active : false
} ,
{
title : 'WALLET.TABS.CONTRACTS' ,
icon : 'contracts' ,
link : '/contracts' ,
indicator : 1 ,
active : false
} ,
2019-01-09 15:25:03 +02:00
/ * {
title : 'WALLET.TABS.MESSAGES' ,
icon : 'messages' ,
link : '/messages' ,
indicator : 32 ,
active : false
} , * /
2018-12-27 18:50:45 +03:00
{
title : 'WALLET.TABS.STAKING' ,
icon : 'staking' ,
link : '/staking' ,
indicator : false ,
active : false
}
] ;
}
WalletComponent . prototype . ngOnInit = function ( ) {
var _this = this ;
this . subRouting = this . route . params . subscribe ( function ( params ) {
_this . walletID = + params [ 'id' ] ;
_this . variablesService . setCurrentWallet ( _this . walletID ) ;
for ( var i = 0 ; i < _this . tabs . length ; i ++ ) {
_this . tabs [ i ] . active = ( _this . tabs [ i ] . link === '/' + _this . route . snapshot . firstChild . url [ 0 ] . path ) ;
}
2019-02-19 17:33:37 +02:00
_this . scrolledContent . nativeElement . scrollTop = 0 ;
clearTimeout ( _this . copyAnimationTimeout ) ;
_this . copyAnimation = false ;
2018-12-27 18:50:45 +03:00
} ) ;
2019-02-19 16:15:00 +02:00
if ( this . variablesService . currentWallet . alias . hasOwnProperty ( 'name' ) ) {
this . variablesService . currentWallet . wakeAlias = false ;
}
this . aliasSubscription = this . variablesService . getAliasChangedEvent . subscribe ( function ( ) {
if ( _this . variablesService . currentWallet . alias . hasOwnProperty ( 'name' ) ) {
_this . variablesService . currentWallet . wakeAlias = false ;
}
} ) ;
2018-12-27 18:50:45 +03:00
} ;
WalletComponent . prototype . changeTab = function ( index ) {
2019-02-19 09:51:20 +02:00
var _this = this ;
2019-01-29 16:46:36 +02:00
if ( ( this . tabs [ index ] . link === '/send' || this . tabs [ index ] . link === '/contracts' || this . tabs [ index ] . link === '/staking' ) && this . variablesService . daemon _state !== 2 ) {
2018-12-27 18:50:45 +03:00
return ;
}
this . tabs . forEach ( function ( tab ) {
tab . active = false ;
} ) ;
this . tabs [ index ] . active = true ;
2019-02-19 09:51:20 +02:00
this . ngZone . run ( function ( ) {
2019-02-19 17:33:37 +02:00
_this . scrolledContent . nativeElement . scrollTop = 0 ;
2019-02-19 09:51:20 +02:00
_this . router . navigate ( [ 'wallet/' + _this . walletID + _this . tabs [ index ] . link ] ) ;
} ) ;
2018-12-27 18:50:45 +03:00
} ;
WalletComponent . prototype . copyAddress = function ( ) {
2019-01-31 13:10:46 +02:00
var _this = this ;
2018-12-27 18:50:45 +03:00
this . backend . setClipboard ( this . variablesService . currentWallet . address ) ;
2019-02-19 17:33:37 +02:00
this . copyAnimation = true ;
this . copyAnimationTimeout = window . setTimeout ( function ( ) {
_this . copyAnimation = false ;
2019-01-31 13:10:46 +02:00
} , 2000 ) ;
2018-12-27 18:50:45 +03:00
} ;
2019-01-17 16:48:37 +02:00
WalletComponent . prototype . getTooltip = function ( ) {
var _this = this ;
var tooltip = document . createElement ( 'div' ) ;
var available = document . createElement ( 'span' ) ;
available . setAttribute ( 'class' , 'available' ) ;
available . innerHTML = this . translate . instant ( 'WALLET.AVAILABLE_BALANCE' , { available : this . intToMoneyPipe . transform ( this . variablesService . currentWallet . unlocked _balance ) , currency : this . variablesService . defaultCurrency } ) ;
tooltip . appendChild ( available ) ;
var locked = document . createElement ( 'span' ) ;
locked . setAttribute ( 'class' , 'locked' ) ;
2019-01-19 15:11:40 +02:00
locked . innerHTML = this . translate . instant ( 'WALLET.LOCKED_BALANCE' , { locked : this . intToMoneyPipe . transform ( this . variablesService . currentWallet . balance . minus ( this . variablesService . currentWallet . unlocked _balance ) ) , currency : this . variablesService . defaultCurrency } ) ;
2019-01-17 16:48:37 +02:00
tooltip . appendChild ( locked ) ;
var link = document . createElement ( 'span' ) ;
link . setAttribute ( 'class' , 'link' ) ;
link . innerHTML = this . translate . instant ( 'WALLET.LOCKED_BALANCE_LINK' ) ;
link . addEventListener ( 'click' , function ( ) {
_this . openInBrowser ( 'docs.zano.org/docs/locked-balance' ) ;
} ) ;
tooltip . appendChild ( link ) ;
return tooltip ;
} ;
WalletComponent . prototype . openInBrowser = function ( link ) {
this . backend . openUrlInBrowser ( link ) ;
2019-01-09 15:25:03 +02:00
} ;
2018-12-27 18:50:45 +03:00
WalletComponent . prototype . ngOnDestroy = function ( ) {
this . subRouting . unsubscribe ( ) ;
2019-02-19 16:15:00 +02:00
this . aliasSubscription . unsubscribe ( ) ;
2019-02-19 17:33:37 +02:00
clearTimeout ( this . copyAnimationTimeout ) ;
2018-12-27 18:50:45 +03:00
} ;
2019-01-31 13:10:46 +02:00
_ _decorate ( [
2019-02-19 17:33:37 +02:00
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ViewChild" ] ) ( 'scrolledContent' ) ,
2019-01-31 13:10:46 +02:00
_ _metadata ( "design:type" , _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ElementRef" ] )
2019-02-19 17:33:37 +02:00
] , WalletComponent . prototype , "scrolledContent" , void 0 ) ;
2018-12-27 18:50:45 +03:00
WalletComponent = _ _decorate ( [
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Component" ] ) ( {
selector : 'app-wallet' ,
template : _ _webpack _require _ _ ( /*! ./wallet.component.html */ "./src/app/wallet/wallet.component.html" ) ,
styles : [ _ _webpack _require _ _ ( /*! ./wallet.component.scss */ "./src/app/wallet/wallet.component.scss" ) ]
} ) ,
_ _metadata ( "design:paramtypes" , [ _angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ActivatedRoute" ] ,
_angular _router _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Router" ] ,
_helpers _services _backend _service _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "BackendService" ] ,
_helpers _services _variables _service _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "VariablesService" ] ,
2019-01-17 16:48:37 +02:00
_angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "NgZone" ] ,
_ngx _translate _core _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "TranslateService" ] ,
_helpers _pipes _int _to _money _pipe _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "IntToMoneyPipe" ] ] )
2018-12-27 18:50:45 +03:00
] , WalletComponent ) ;
return WalletComponent ;
} ( ) ) ;
/***/ } ) ,
/***/ "./src/environments/environment.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / environments / environment . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! exports provided: environment */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "environment" , function ( ) { return environment ; } ) ;
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
var environment = {
production : false
} ;
/ *
* For easier debugging in development mode , you can import the following file
* to ignore zone related error stack frames such as ` zone.run ` , ` zoneDelegate.invokeTask ` .
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown .
* /
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
/***/ } ) ,
/***/ "./src/main.ts" :
/ * ! * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * . / src / main . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * /
/*! no exports provided */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony import */ var _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( /*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js" ) ;
/* harmony import */ var _angular _platform _browser _dynamic _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( /*! @angular/platform-browser-dynamic */ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js" ) ;
/* harmony import */ var _app _app _module _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( /*! ./app/app.module */ "./src/app/app.module.ts" ) ;
/* harmony import */ var _environments _environment _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( /*! ./environments/environment */ "./src/environments/environment.ts" ) ;
if ( _environments _environment _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "environment" ] . production ) {
Object ( _angular _core _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "enableProdMode" ] ) ( ) ;
}
Object ( _angular _platform _browser _dynamic _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "platformBrowserDynamic" ] ) ( ) . bootstrapModule ( _app _app _module _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "AppModule" ] )
. catch ( function ( err ) { return console . error ( err ) ; } ) ;
/***/ } ) ,
/***/ 0 :
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * ! * \
! * * * multi . / src / main . ts * * * !
\ * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/*! no static exports found */
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
2019-03-14 16:26:29 +02:00
module . exports = _ _webpack _require _ _ ( /*! D:\Projects\Zano\src\gui\qt-daemon\html_source\src\main.ts */ "./src/main.ts" ) ;
2018-12-27 18:50:45 +03:00
/***/ } )
} , [ [ 0 , "runtime" , "vendor" ] ] ] ) ;
//# sourceMappingURL=main.js.map