diff --git a/src/store/modules/ftbot.ts b/src/store/modules/ftbot.ts index d7cbc716..e332c553 100644 --- a/src/store/modules/ftbot.ts +++ b/src/store/modules/ftbot.ts @@ -3,7 +3,7 @@ import { BotState, BlacklistPayload, ForcebuyPayload, Logs, DailyPayload, Trade import { showAlert } from './alerts'; -export enum UserStoreGetters { +export enum BotStoreGetters { openTrades = 'openTrades', tradeDetail = 'tradeDetail', closedTrades = 'closedTrades', @@ -28,17 +28,17 @@ export default { detailTradeId: null, }, getters: { - [UserStoreGetters.openTrades](state) { + [BotStoreGetters.openTrades](state) { return state.openTrades; }, - [UserStoreGetters.tradeDetail](state) { + [BotStoreGetters.tradeDetail](state) { let dTrade = state.openTrades.find((item) => item.trade_id === state.detailTradeId); if (!dTrade) { dTrade = state.trades.find((item) => item.trade_id === state.detailTradeId); } return dTrade; }, - [UserStoreGetters.closedTrades](state) { + [BotStoreGetters.closedTrades](state) { return state.trades.filter((item) => !item.is_open); }, }, diff --git a/src/views/Trading.vue b/src/views/Trading.vue index c78a5d09..8402810b 100644 --- a/src/views/Trading.vue +++ b/src/views/Trading.vue @@ -129,7 +129,7 @@ import LogViewer from '@/components/ftbot/LogViewer.vue'; import DraggableContainer from '@/components/layout/DraggableContainer.vue'; import { Trade } from '@/types'; -import { UserStoreGetters } from '@/store/modules/ftbot'; +import { BotStoreGetters } from '@/store/modules/ftbot'; import { TradeLayout, findGridLayout } from '@/store/modules/layout'; const ftbot = namespace('ftbot'); @@ -159,7 +159,7 @@ export default class Trading extends Vue { @ftbot.Getter closedTrades!: Trade[]; - @ftbot.Getter [UserStoreGetters.tradeDetail]!: Trade; + @ftbot.Getter [BotStoreGetters.tradeDetail]!: Trade; @layoutNs.Getter getTradingLayout!: GridItemData[];