diff --git a/src/store/modules/ftbot.ts b/src/store/modules/ftbot.ts index 36fd51fc..8426d4d0 100644 --- a/src/store/modules/ftbot.ts +++ b/src/store/modules/ftbot.ts @@ -1,5 +1,5 @@ import { api } from '@/shared/apiService'; -import { BotState, BlacklistPayload, ForcebuyPayload, Logs } from '@/store/types'; +import { BotState, BlacklistPayload, ForcebuyPayload, Logs, DailyPayload } from '@/store/types'; export default { namespaced: true, @@ -123,7 +123,7 @@ export default { .then((result) => commit('updateBalance', result.data)) .catch(console.error); }, - getDaily({ commit }, payload = {}) { + getDaily({ commit }, payload: DailyPayload) { const { timescale = 20 } = payload; return api .get('/daily', { params: { timescale } }) diff --git a/src/store/types.ts b/src/store/types.ts index 7c6ada60..3b19cbc6 100644 --- a/src/store/types.ts +++ b/src/store/types.ts @@ -8,8 +8,8 @@ export interface BlacklistPayload { blacklist: Array; } -export interface DailyInterface { - timescale: number; +export interface DailyPayload { + timescale?: number; } export interface ForcebuyPayload {