Fix tradingmode filter

This commit is contained in:
Matthias 2022-04-09 08:56:41 +02:00
parent cce3c11d1e
commit 47e314d922
2 changed files with 6 additions and 6 deletions

View File

@ -10,7 +10,7 @@
<ValuePair v-if="trade.buy_tag" description="Entry tag">{{ trade.buy_tag }}</ValuePair>
<ValuePair description="Stake"
>{{ formatPriceCurrency(trade.stake_amount, stakeCurrency) }}
{{ trade.leverage ? `(${trade.leverage}x)` : '' }}</ValuePair
{{ trade.leverage && trade.leverage !== 1 ? `(${trade.leverage}x)` : '' }}</ValuePair
>
<ValuePair description="Amount">{{ trade.amount }}</ValuePair>
<ValuePair description="Open Rate">{{ formatPrice(trade.open_rate) }}</ValuePair>
@ -70,7 +70,7 @@
<ValuePair v-if="trade.stoploss_last_update_timestamp" description="Stoploss last updated">
{{ timestampms(trade.stoploss_last_update_timestamp) }}
</ValuePair>
<div v-if="trade.trading_mode !== undefined && trade.trading_mode !== 'SPOT'">
<div v-if="trade.trading_mode !== undefined && trade.trading_mode !== 'spot'">
<h5 class="detail-header">Futures/Margin</h5>
<ValuePair description="Direction">
{{ trade.is_short ? 'short' : 'long' }} - {{ trade.leverage }}x

View File

@ -1,7 +1,7 @@
export enum TradingMode {
SPOT = 'SPOT',
MARGIN = 'MARGIN',
FUTURES = 'FUTURES',
SPOT = 'spot',
MARGIN = 'margin',
FUTURES = 'futures',
}
export interface Order {
@ -96,7 +96,7 @@ export interface Trade {
leverage?: number;
interest_rate?: number;
funding_fees?: number;
trading_mode?: string;
trading_mode?: TradingMode;
orders?: Order[];
}