Reduce network traffic (don't call getState every 5s)

This commit is contained in:
Matthias 2023-02-28 18:05:44 +01:00
parent f76773be39
commit e1dae7c630

View File

@ -214,6 +214,7 @@ export function createBotSubStore(botId: string, botName: string) {
this.refreshing = true;
// TODO: Should be AxiosInstance
const updates: Promise<unknown>[] = [];
updates.push(this.getState());
updates.push(this.getPerformance());
updates.push(this.getProfit());
updates.push(this.getTrades());
@ -232,7 +233,6 @@ export function createBotSubStore(botId: string, botName: string) {
async refreshFrequent() {
// Refresh data that's needed in near realtime
await this.getOpenTrades();
await this.getState();
await this.getLocks();
},