This repository was archived by the owner on Feb 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed
src/botPage/bot/Interface Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export default class Interface extends ToolsInterface(TicksInterface(class {}))
37
37
} ;
38
38
}
39
39
getBotInterface ( ) {
40
- const getDetail = ( i , pipSize ) => createDetails ( this . get ( ' contract' ) , pipSize ) [ i ] ;
40
+ const getDetail = ( i , pipSize ) => createDetails ( this . data . contract , pipSize ) [ i ] ;
41
41
42
42
return {
43
43
init : ( ...args ) => this . tradeEngine . init ( ...args ) ,
@@ -65,22 +65,12 @@ export default class Interface extends ToolsInterface(TicksInterface(class {}))
65
65
) ;
66
66
}
67
67
getProposal ( contractType ) {
68
- const proposals = this . get ( 'proposals' ) ;
69
-
70
- let proposal ;
71
-
72
- proposals . forEach ( p => {
73
- if ( p . contractType === contractType ) {
74
- proposal = p ;
75
- }
76
- } ) ;
77
-
78
- return proposal ;
68
+ return this . data . proposals . find (
69
+ proposal =>
70
+ proposal . contractType === contractType && proposal . purchaseReference === this . getPurchaseReference ( )
71
+ ) ;
79
72
}
80
73
getSellPrice ( ) {
81
74
return this . tradeEngine . getSellPrice ( ) ;
82
75
}
83
- get ( key ) {
84
- return this . tradeEngine . getData ( ) [ key ] ;
85
- }
86
76
}
You can’t perform that action at this time.
0 commit comments