diff --git a/src/components/charts/BalanceChart.vue b/src/components/charts/BalanceChart.vue
index 68c9b20e..c4e0df74 100644
--- a/src/components/charts/BalanceChart.vue
+++ b/src/components/charts/BalanceChart.vue
@@ -22,7 +22,7 @@ import {
TooltipComponent,
} from 'echarts/components';
-import { BalanceRecords } from '@/types';
+import { BalanceValues } from '@/types';
import { formatPriceCurrency } from '@/shared/formatters';
import { computed } from 'vue';
import { useSettingsStore } from '@/stores/settings';
@@ -38,7 +38,7 @@ use([
]);
const props = defineProps({
- currencies: { required: true, type: Array as () => BalanceRecords[] },
+ currencies: { required: true, type: Array as () => BalanceValues[] },
showTitle: { required: false, type: Boolean },
});
const settingsStore = useSettingsStore();
@@ -53,16 +53,7 @@ const balanceChartOptions = computed((): EChartsOption => {
backgroundColor: 'rgba(0, 0, 0, 0)',
dataset: {
dimensions: ['balance', 'currency', 'est_stake', 'free', 'used', 'stake'],
- source: props.currencies.map((currency) => {
- return {
- balance: currency.balance,
- currency: currency.currency,
- est_stake: currency.est_stake,
- free: currency.free,
- used: currency.used,
- stake: currency.stake,
- };
- }),
+ source: props.currencies,
},
tooltip: {
trigger: 'item',
diff --git a/src/components/ftbot/BotBalance.vue b/src/components/ftbot/BotBalance.vue
index 8c0c9924..f0e41622 100644
--- a/src/components/ftbot/BotBalance.vue
+++ b/src/components/ftbot/BotBalance.vue
@@ -26,7 +26,7 @@
>
-
{{ botStore.activeBot.balance.note }}
@@ -67,6 +67,7 @@ import { formatPercent, formatPrice } from '@/shared/formatters';
import { computed, ref } from 'vue';
import { useBotStore } from '@/stores/ftbotwrapper';
import { TableField } from 'bootstrap-vue-next';
+import { BalanceValues } from '@/types';
const botStore = useBotStore();
const hideSmallBalances = ref(true);
@@ -92,6 +93,20 @@ const formatCurrency = (value) => {
return value ? formatPrice(value, botStore.activeBot.stakeCurrencyDecimals) : '';
};
+const chartValues = computed