mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-23 03:25:15 +00:00
Improve handling of empty pair-data responses
This commit is contained in:
parent
c3c21f5a36
commit
a03f1bb917
|
@ -132,7 +132,7 @@ const dataset = computed((): PairHistory => {
|
|||
});
|
||||
const strategyName = computed(() => props.strategy || dataset.value?.strategy || '');
|
||||
const datasetColumns = computed(() => (dataset.value ? dataset.value.columns : []));
|
||||
const hasDataset = computed(() => !!dataset.value);
|
||||
const hasDataset = computed(() => dataset.value && dataset.value.data.length > 0);
|
||||
const isLoadingDataset = computed((): boolean => {
|
||||
if (props.historicView) {
|
||||
return botStore.activeBot.historyStatus === LoadingStatus.loading;
|
||||
|
|
|
@ -340,7 +340,7 @@ export function createBotSubStore(botId: string, botName: string) {
|
|||
},
|
||||
getPairCandles(payload: PairCandlePayload) {
|
||||
if (payload.pair && payload.timeframe) {
|
||||
this.historyStatus = LoadingStatus.loading;
|
||||
this.candleDataStatus = LoadingStatus.loading;
|
||||
return api
|
||||
.get('/pair_candles', {
|
||||
params: { ...payload },
|
||||
|
@ -354,11 +354,11 @@ export function createBotSubStore(botId: string, botName: string) {
|
|||
data: result.data,
|
||||
},
|
||||
};
|
||||
this.historyStatus = LoadingStatus.success;
|
||||
this.candleDataStatus = LoadingStatus.success;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
this.historyStatus = LoadingStatus.error;
|
||||
this.candleDataStatus = LoadingStatus.error;
|
||||
});
|
||||
}
|
||||
// Error branchs
|
||||
|
|
Loading…
Reference in New Issue
Block a user