mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 10:21:55 +00:00
Rename Getters enum to be correct
This commit is contained in:
parent
db99ab0879
commit
6ebdb33b72
|
@ -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);
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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[];
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user