Add botstatusAvailable as getter

This commit is contained in:
Matthias 2022-04-13 07:24:36 +02:00
parent f26507f97c
commit 7cb070975d

View File

@ -59,6 +59,7 @@ export enum BotStoreGetters {
autoRefresh = 'autoRefresh',
refreshNow = 'refreshNow',
refreshing = 'refreshing',
botStatusAvailable = 'botStatusAvailable',
openTrades = 'openTrades',
openTradeCount = 'openTradeCount',
@ -185,14 +186,16 @@ export function createBotSubStore(botId: string, botName: string) {
(selectedBot === botId || bgRefresh) &&
getters.autoRefresh &&
getters.isBotOnline &&
state.botStatusAvailable &&
getters.botStatusAvailable &&
!getters.isWebserverMode
) {
return true;
}
return false;
},
[BotStoreGetters.botStatusAvailable](state: FtbotStateType) {
return state.botStatusAvailable;
},
[BotStoreGetters.plotConfig](state: FtbotStateType) {
return state.customPlotConfig[state.plotConfigName] || { ...EMPTY_PLOTCONFIG };
},