mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 04:55:15 +00:00
Fix exception in detail_trade when selected trade closes
This commit is contained in:
parent
06a73c9485
commit
048da545d0
|
@ -121,13 +121,13 @@ export function createBotSubStore(botId: string, botName: string) {
|
||||||
: b.trade_id - a.trade_id,
|
: b.trade_id - a.trade_id,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
tradeDetail: (state) => {
|
tradeDetail: (state): Trade | undefined => {
|
||||||
// console.log('tradeDetail', state.openTrades.length, state.openTrades);
|
// console.log('tradeDetail', state.openTrades.length, state.openTrades);
|
||||||
let dTrade = state.openTrades.find((item) => item.trade_id === state.detailTradeId);
|
let dTrade = state.openTrades.find((item) => item.trade_id === state.detailTradeId);
|
||||||
if (!dTrade) {
|
if (!dTrade) {
|
||||||
dTrade = state.trades.find((item) => item.trade_id === state.detailTradeId);
|
dTrade = state.trades.find((item) => item.trade_id === state.detailTradeId);
|
||||||
}
|
}
|
||||||
return dTrade as Trade;
|
return dTrade;
|
||||||
},
|
},
|
||||||
refreshNow: (state) => {
|
refreshNow: (state) => {
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -22,7 +22,10 @@
|
||||||
:stake-currency-decimals="botStore.activeBot.stakeCurrencyDecimals"
|
:stake-currency-decimals="botStore.activeBot.stakeCurrencyDecimals"
|
||||||
empty-text="No closed trades so far."
|
empty-text="No closed trades so far."
|
||||||
/>
|
/>
|
||||||
<div v-if="botStore.activeBot.detailTradeId" class="d-flex flex-column">
|
<div
|
||||||
|
v-if="botStore.activeBot.detailTradeId && botStore.activeBot.tradeDetail"
|
||||||
|
class="d-flex flex-column"
|
||||||
|
>
|
||||||
<b-button
|
<b-button
|
||||||
size="sm"
|
size="sm"
|
||||||
class="align-self-start mt-1 ms-1"
|
class="align-self-start mt-1 ms-1"
|
||||||
|
|
|
@ -100,7 +100,11 @@
|
||||||
</DraggableContainer>
|
</DraggableContainer>
|
||||||
</grid-item>
|
</grid-item>
|
||||||
<grid-item
|
<grid-item
|
||||||
v-if="botStore.activeBot.detailTradeId && gridLayoutTradeDetail.h != 0"
|
v-if="
|
||||||
|
botStore.activeBot.detailTradeId &&
|
||||||
|
botStore.activeBot.tradeDetail &&
|
||||||
|
gridLayoutTradeDetail.h != 0
|
||||||
|
"
|
||||||
v-bind="gridItemProps"
|
v-bind="gridItemProps"
|
||||||
:i="gridLayoutTradeDetail.i"
|
:i="gridLayoutTradeDetail.i"
|
||||||
:x="gridLayoutTradeDetail.x"
|
:x="gridLayoutTradeDetail.x"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user