Skip to content

Commit

Permalink
Improve type compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Dec 27, 2022
1 parent 9b4d1e4 commit 748c24d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/charts/ProfitDistributionChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</template>

<script lang="ts">
import { defineComponent, ref, computed } from 'vue';
import { defineComponent, computed } from 'vue';
import ECharts from 'vue-echarts';
import { EChartsOption } from 'echarts';
Expand Down
4 changes: 2 additions & 2 deletions src/stores/ftbot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export function createBotSubStore(botId: string, botName: string) {
try {
this.refreshing = true;
// TODO: Should be AxiosInstance
const updates: Promise<any>[] = [];
const updates: Promise<unknown>[] = [];
updates.push(this.getPerformance());
updates.push(this.getProfit());
updates.push(this.getTrades());
Expand Down Expand Up @@ -862,7 +862,7 @@ export function createBotSubStore(botId: string, botName: string) {
) {
return;
}
const { status, data, send, open, close, ws } = useWebSocket(
const { send, close } = useWebSocket(
// 'ws://localhost:8080/api/v1/message/ws?token=testtoken',
`${userService.getBaseWsUrl()}/message/ws?token=${userService.getAccessToken()}`,
{
Expand Down
18 changes: 9 additions & 9 deletions src/stores/ftbotwrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const useBotStore = defineStore('wrapper', {
this.globalAutoRefresh = value;
},
async allRefreshFrequent(forceUpdate = false) {
const updates: Promise<any>[] = [];
const updates: Promise<unknown>[] = [];
this.allBotStores.forEach(async (e) => {
if (e.refreshNow && (this.globalAutoRefresh || forceUpdate)) {
updates.push(e.refreshFrequent());
Expand All @@ -242,14 +242,14 @@ export const useBotStore = defineStore('wrapper', {
await this.pingAll();

const botStoreUpdates: Promise<any>[] = [];
this.allBotStores.forEach((e) => {
if (e.isBotOnline && !e.botStatusAvailable) {
botStoreUpdates.push(e.getState());
this.allBotStores.forEach((bot) => {
if (bot.isBotOnline && !bot.botStatusAvailable) {
botStoreUpdates.push(bot.getState());
}
});
await Promise.all(botStoreUpdates);

const updates: Promise<any>[] = [];
const updates: Promise<void>[] = [];
updates.push(this.allRefreshFrequent(false));
updates.push(this.allRefreshSlow(true));
// updates.push(this.getDaily());
Expand Down Expand Up @@ -309,11 +309,11 @@ export const useBotStore = defineStore('wrapper', {
});
},
async allGetDaily(payload: DailyPayload) {
const updates: Promise<any>[] = [];
const updates: Promise<DailyReturnValue>[] = [];

this.allBotStores.forEach((e) => {
if (e.isBotOnline) {
updates.push(e.getDaily(payload));
this.allBotStores.forEach((bot) => {
if (bot.isBotOnline) {
updates.push(bot.getDaily(payload));
}
});
await Promise.all(updates);
Expand Down

0 comments on commit 748c24d

Please sign in to comment.