fix: use exchange.classname when available.

closes #2071
This commit is contained in:
Matthias 2024-09-16 07:07:56 +02:00
parent 769bb47a0f
commit c45dab5a9a

View File

@ -17,14 +17,21 @@ const exchangeList = computed(() => {
.sort((a, b) => a.name.localeCompare(b.name));
return [
{ label: 'Supported', options: supported.map((e) => e.name) },
{ label: 'Unsupported', options: unsupported.map((e) => e.name) },
{
label: 'Supported',
options: supported.map((e) => ({ value: e.classname ?? e.name, text: e.name })),
},
{
label: 'Unsupported',
options: unsupported.map((e) => ({ value: e.classname ?? e.name, text: e.name })),
},
];
});
const tradeModesTyped = computed(() => {
const val = botStore.activeBot.exchangeList.find(
(ex) => ex.name === exchangeModel.value.exchange,
(ex) =>
ex.name === exchangeModel.value.exchange || ex.classname === exchangeModel.value.exchange,
)?.trade_modes;
return val ?? [];
});