From 845ce97d42adf5588c2b776068516332e336cc04 Mon Sep 17 00:00:00 2001 From: Aaron Imming Date: Thu, 30 May 2019 10:17:21 +0800 Subject: [PATCH] Remove sellExpired() --- src/botPage/bot/TradeEngine/OpenContract.js | 9 +-------- src/botPage/bot/TradeEngine/Sell.js | 5 ----- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/botPage/bot/TradeEngine/OpenContract.js b/src/botPage/bot/TradeEngine/OpenContract.js index 424aebe810..a5d34ff6ab 100644 --- a/src/botPage/bot/TradeEngine/OpenContract.js +++ b/src/botPage/bot/TradeEngine/OpenContract.js @@ -17,8 +17,6 @@ export default Engine => this.setContractFlags(contract); - this.sellExpired(); - this.data = this.data.set('contract', contract); broadcastContract({ accountID: this.accountInfo.loginid, ...contract }); @@ -45,11 +43,7 @@ export default Engine => this.store.dispatch(openContractReceived()); if (!this.isExpired) { this.resetSubscriptionTimeout(); - return; - } - if (!this.retriedUnsuccessfullSellExpired) { - this.retriedUnsuccessfullSellExpired = true; - this.resetSubscriptionTimeout(AFTER_FINISH_TIMEOUT); + } } }); @@ -61,7 +55,6 @@ export default Engine => } subscribeToOpenContract(contractId = this.contractId) { if (this.contractId !== contractId) { - this.retriedUnsuccessfullSellExpired = false; this.resetSubscriptionTimeout(); } this.contractId = contractId; diff --git a/src/botPage/bot/TradeEngine/Sell.js b/src/botPage/bot/TradeEngine/Sell.js index 568fa6a15a..d099463fda 100644 --- a/src/botPage/bot/TradeEngine/Sell.js +++ b/src/botPage/bot/TradeEngine/Sell.js @@ -46,9 +46,4 @@ export default Engine => delayIndex++ ).then(onSuccess); } - sellExpired() { - if (this.isSellAvailable && this.isExpired) { - doUntilDone(() => this.api.sellExpiredContracts()); - } - } };