From c45dab5a9ae5ac3d322ac065c9fc4eb96cf56fa2 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 16 Sep 2024 07:07:56 +0200 Subject: [PATCH] fix: use exchange.classname when available. closes #2071 --- src/components/ftbot/ExchangeSelect.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/ftbot/ExchangeSelect.vue b/src/components/ftbot/ExchangeSelect.vue index 378d278c..3b6061ae 100644 --- a/src/components/ftbot/ExchangeSelect.vue +++ b/src/components/ftbot/ExchangeSelect.vue @@ -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 ?? []; });