mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
Fix "default" bug in pairlists
This commit is contained in:
parent
c3a4f1def6
commit
a2614d09bf
|
@ -14,6 +14,7 @@ import {
|
||||||
} from '@/types';
|
} from '@/types';
|
||||||
import { computed, ref, toRaw, watch } from 'vue';
|
import { computed, ref, toRaw, watch } from 'vue';
|
||||||
import { showAlert } from './alerts';
|
import { showAlert } from './alerts';
|
||||||
|
import { isNotUndefined } from '@/shared/formatters';
|
||||||
|
|
||||||
export const usePairlistConfigStore = defineStore(
|
export const usePairlistConfigStore = defineStore(
|
||||||
'pairlistConfig',
|
'pairlistConfig',
|
||||||
|
@ -62,8 +63,8 @@ export const usePairlistConfigStore = defineStore(
|
||||||
function addToConfig(pairlist: Pairlist, index: number) {
|
function addToConfig(pairlist: Pairlist, index: number) {
|
||||||
pairlist = structuredClone(toRaw(pairlist));
|
pairlist = structuredClone(toRaw(pairlist));
|
||||||
for (const param in pairlist.params) {
|
for (const param in pairlist.params) {
|
||||||
pairlist.params[param].value = pairlist.params[param].default
|
pairlist.params[param].value = isNotUndefined(pairlist.params[param].default)
|
||||||
? pairlist.params[param].default.toString()
|
? pairlist.params[param].default
|
||||||
: '';
|
: '';
|
||||||
}
|
}
|
||||||
config.value.pairlists.splice(index, 0, pairlist);
|
config.value.pairlists.splice(index, 0, pairlist);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user