mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
Validate if pairlist can be valid
This commit is contained in:
parent
70f9033306
commit
cf3d3001e5
|
@ -46,7 +46,7 @@
|
||||||
@remove="removeFromConfig"
|
@remove="removeFromConfig"
|
||||||
/>
|
/>
|
||||||
<b-button
|
<b-button
|
||||||
:disabled="evaluating || config.pairlists.length == 0"
|
:disabled="evaluating || !pairlistValid"
|
||||||
variant="primary"
|
variant="primary"
|
||||||
size="lg"
|
size="lg"
|
||||||
squared
|
squared
|
||||||
|
@ -90,6 +90,18 @@ const pairlistConfigsEl = ref<HTMLElement | null>(null);
|
||||||
const availablePairlistsEl = ref<HTMLElement | null>(null);
|
const availablePairlistsEl = ref<HTMLElement | null>(null);
|
||||||
const evaluating = ref(false);
|
const evaluating = ref(false);
|
||||||
|
|
||||||
|
const firstPairlistIsGenerator = computed<boolean>(() => {
|
||||||
|
// First pairlist must be a generator
|
||||||
|
if (config.value.pairlists[0]?.is_pairlist_generator) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
const pairlistValid = computed<boolean>(() => {
|
||||||
|
return firstPairlistIsGenerator.value && config.value.pairlists.length > 0;
|
||||||
|
});
|
||||||
|
|
||||||
// v-for updates with sorting, deleting and adding items seem to get wonky without unique keys for every item
|
// v-for updates with sorting, deleting and adding items seem to get wonky without unique keys for every item
|
||||||
const pairlistsComp = computed(() =>
|
const pairlistsComp = computed(() =>
|
||||||
config.value.pairlists.map((p) => {
|
config.value.pairlists.map((p) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user