Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 7786e87

Browse files
author
Aaron Imming
committed
Test
1 parent 8831807 commit 7786e87

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/botPage/bot/TradeEngine/Sell.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ let delayIndex = 0;
88
export default Engine =>
99
class Sell extends Engine {
1010
isSellAtMarketAvailable() {
11+
console.log('Called isSellAtMarketAvailable');
1112
return this.contractId && !this.isSold && this.isSellAvailable && !this.isExpired;
1213
}
1314
sellAtMarket() {
15+
console.log('called sellAtMarket');
1416
// Prevent calling sell twice
1517
if (this.store.getState().scope !== DURING_PURCHASE) {
18+
console.log('Scope is not DURING_PURCHASE');
1619
return Promise.resolve();
1720
}
1821

src/botPage/bot/TradeEngine/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export default class TradeEngine extends Balance(Purchase(Sell(OpenContract(Prop
7474
this.store = createStore(rootReducer, applyMiddleware(thunk));
7575
}
7676
init(...args) {
77+
console.log('Init called', args);
7778
const [token, options] = expectInitArg(args);
7879

7980
const { symbol } = options;
@@ -91,6 +92,8 @@ export default class TradeEngine extends Balance(Purchase(Sell(OpenContract(Prop
9192
throw createError('NotInitialized', translate('Bot.init is not called'));
9293
}
9394

95+
console.log('Start called', tradeOptions);
96+
9497
globalObserver.emit('bot.running');
9598
globalObserver.setState({ isRunning: true });
9699

@@ -135,6 +138,7 @@ export default class TradeEngine extends Balance(Purchase(Sell(OpenContract(Prop
135138
this.observeProposals();
136139
}
137140
watch(watchName) {
141+
console.log('Watching', watchName);
138142
if (watchName === 'before') {
139143
return watchBefore(this.store);
140144
}

0 commit comments

Comments
 (0)