Skip to content

Commit 2744f6e

Browse files
[BOT]maryia/BOT-2462/fix: Total Payout remains zero for multipliers and accumulator QS (deriv-com#17703)
* fix: Total Payout remains zero for multipliers and accumulator QS * refactor: fix the issue with simplier approach * chore: trigger vercel
1 parent bc3f886 commit 2744f6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/bot-web-ui/src/stores/transactions-store.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ export default class TransactionsStore {
6868
);
6969
const statistics = trxs.reduce(
7070
(stats, { data }) => {
71-
const { profit = 0, is_completed = false, payout = 0, buy_price = 0 } = data as TContractInfo;
71+
const { profit = 0, is_completed = false, payout, buy_price = 0, bid_price } = data as TContractInfo;
7272
if (is_completed) {
7373
if (profit > 0) {
7474
stats.won_contracts += 1;
75-
stats.total_payout += payout;
75+
stats.total_payout += payout ?? bid_price ?? 0;
7676
} else {
7777
stats.lost_contracts += 1;
7878
}

0 commit comments

Comments
 (0)