Update pair init logic for candlecharts

This commit is contained in:
Matthias 2021-06-23 18:55:17 +02:00
parent ccfe3e0e97
commit 4ed0bb46e4
2 changed files with 11 additions and 5 deletions

View File

@ -143,7 +143,11 @@ export default class CandleChartContainer extends Vue {
}
mounted() {
this.pair = this.selectedPair;
if (this.selectedPair) {
this.pair = this.selectedPair;
} else if (this.availablePairs.length > 0) {
[this.pair] = this.availablePairs;
}
this.plotConfigName = getPlotConfigName();
this.plotConfig = getCustomPlotConfig(this.plotConfigName);
}

View File

@ -78,10 +78,12 @@ export default class Graphs extends Vue {
if (!this.whitelist || this.whitelist.length === 0) {
this.getWhitelist();
}
// this.refresh();
this.getAvailablePairs({ timeframe: this.timeframe }).then((val) => {
// console.log(val);
});
if (this.historicView) {
// this.refresh();
this.getAvailablePairs({ timeframe: this.timeframe }).then((val) => {
// console.log(val);
});
}
}
}
</script>