This repository was archived by the owner on Feb 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
src/botPage/bot/TradeEngine Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,14 @@ let delayIndex = 0;
8
8
export default Engine =>
9
9
class Sell extends Engine {
10
10
isSellAtMarketAvailable ( ) {
11
+ console . log ( 'Called isSellAtMarketAvailable' ) ;
11
12
return this . contractId && ! this . isSold && this . isSellAvailable && ! this . isExpired ;
12
13
}
13
14
sellAtMarket ( ) {
15
+ console . log ( 'called sellAtMarket' ) ;
14
16
// Prevent calling sell twice
15
17
if ( this . store . getState ( ) . scope !== DURING_PURCHASE ) {
18
+ console . log ( 'Scope is not DURING_PURCHASE' ) ;
16
19
return Promise . resolve ( ) ;
17
20
}
18
21
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ export default class TradeEngine extends Balance(Purchase(Sell(OpenContract(Prop
74
74
this . store = createStore ( rootReducer , applyMiddleware ( thunk ) ) ;
75
75
}
76
76
init ( ...args ) {
77
+ console . log ( 'Init called' , args ) ;
77
78
const [ token , options ] = expectInitArg ( args ) ;
78
79
79
80
const { symbol } = options ;
@@ -91,6 +92,8 @@ export default class TradeEngine extends Balance(Purchase(Sell(OpenContract(Prop
91
92
throw createError ( 'NotInitialized' , translate ( 'Bot.init is not called' ) ) ;
92
93
}
93
94
95
+ console . log ( 'Start called' , tradeOptions ) ;
96
+
94
97
globalObserver . emit ( 'bot.running' ) ;
95
98
globalObserver . setState ( { isRunning : true } ) ;
96
99
@@ -135,6 +138,7 @@ export default class TradeEngine extends Balance(Purchase(Sell(OpenContract(Prop
135
138
this . observeProposals ( ) ;
136
139
}
137
140
watch ( watchName ) {
141
+ console . log ( 'Watching' , watchName ) ;
138
142
if ( watchName === 'before' ) {
139
143
return watchBefore ( this . store ) ;
140
144
}
You can’t perform that action at this time.
0 commit comments