File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,11 +66,7 @@ export class BotApi {
6666 retry ( this . RETRIES ) ,
6767 tap ( trade => this . log ( `fetched trade ${ id } info` ) ) ,
6868 map ( data => {
69- const trade = new TradeDetails ( false , data ) ;
70- // if (data.entry) {
71- // trade.entry = new Entry(data.entry); // restore nested class Entry
72- // }
73- return trade ;
69+ return new TradeDetails ( false , data ) ;
7470 } ) ,
7571 catchError ( this . handleError ( 'getActiveTradeInfo' , null ) )
7672 ) ;
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ export class ExitInfo {
3737
3838 init ?. targets . forEach ( x => this . targets . push ( new Target ( x ) ) ) ;
3939 }
40- this . threshold = 0.4 . toLocaleString ( ) + '%' ;
40+ if ( ! init ?. threshold ) {
41+ this . threshold = 0.4 . toLocaleString ( ) + '%' ;
42+ }
4143 }
4244
4345}
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export class TradeDetailsComponent implements OnInit {
7575 }
7676
7777 ngOnInit ( ) {
78- setTimeout ( this . init . bind ( this ) , 0 ) ;
78+ this . init ( )
7979 }
8080
8181 private init ( ) {
You can’t perform that action at this time.
0 commit comments