diff --git a/src/components/charts/CandleChartContainer.vue b/src/components/charts/CandleChartContainer.vue index d0fe42fc..e1f501ab 100644 --- a/src/components/charts/CandleChartContainer.vue +++ b/src/components/charts/CandleChartContainer.vue @@ -76,7 +76,7 @@ export default class CandleChartContainer extends Vue { @Prop({ required: true }) readonly timeframe!: string; - @Prop({ required: false, default: [] }) readonly trades!: Array; + @Prop({ required: false, default: () => [] }) readonly trades!: Array; @Prop({ required: false, default: false }) historicView!: boolean; diff --git a/src/components/ftbot/PairSummary.vue b/src/components/ftbot/PairSummary.vue index 09a418eb..ae28ae4f 100644 --- a/src/components/ftbot/PairSummary.vue +++ b/src/components/ftbot/PairSummary.vue @@ -13,14 +13,9 @@ {{ comb.pair }} 🔒 - {{ - comb.trade && comb.trade.profit_ratio ? formatPercent(comb.trade.profit_ratio) : '' - }} + {{ + comb.profit ? formatPercent(comb.profit) : '' + }} @@ -39,6 +34,7 @@ interface CombinedPairList { profitString: string; trade?: Trade; locks?: Lock; + profit: number; } @Component({}) @@ -84,7 +80,7 @@ export default class PairSummary extends Vue { if (trade) { profitString += `\nOpen since: ${timestampms(trade.open_timestamp)}`; } - comb.push({ pair, trade, locks, lockReason, profitString }); + comb.push({ pair, trade, locks, lockReason, profitString, profit }); }); // sort Pairs: "with open trade" -> available -> locked comb.sort((a, b) => {