Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BOT]maryia/BOT-2462/fix: Total Payout remains zero for multipliers and accumulator QS #17703

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

maryia-matskevich-deriv
Copy link
Contributor

Changes:

fix: Total Payout remains zero for multipliers and accumulator QS

Screenshots:

Screenshot 2024-12-02 at 17 16 42

Copy link

vercel bot commented Dec 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
deriv-app ✅ Ready (Inspect) Visit Preview Dec 3, 2024 10:45am

@coveralls
Copy link

coveralls commented Dec 2, 2024

Pull Request Test Coverage Report for Build 12137602786

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 12 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.003%) to 53.903%

Files with Coverage Reduction New Missed Lines %
packages/bot-web-ui/src/stores/dashboard-store.ts 12 79.6%
Totals Coverage Status
Change from base Build 12118489569: 0.003%
Covered Lines: 32851
Relevant Lines: 56842

💛 - Coveralls

Copy link
Contributor

github-actions bot commented Dec 2, 2024

A production App ID was automatically generated for this PR. (log)

Click here to copy & paste above information.
- **PR**: [https://github.com/deriv-com/deriv-app/pull/17703](https://github.com/deriv-com/deriv-app/pull/17703)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-maryia-matskevich-deriv-maryia-bot-2462.binary.sx?qa_server=red.derivws.com&app_id=32878
    - **Original**: https://deriv-app-git-fork-maryia-matskevich-deriv-maryia-bot-2462.binary.sx
- **App ID**: `32878`

Copy link
Contributor

github-actions bot commented Dec 2, 2024

🚨 Lighthouse report for the changes in this PR:

Category Score
🔺 Performance 32
🟧 Accessibility 70
🟢 Best practices 92
🟧 SEO 77
🟧 PWA 78

Lighthouse ran with https://deriv-app-git-fork-maryia-matskevich-deriv-maryia-bot-2462.binary.sx/

Comment on lines 85 to 101
const trade_options_blocks = window.Blockly.derivWorkspace
.getAllBlocks()
.filter(
b =>
b.type === 'trade_definition_multiplier' ||
b.type === 'trade_definition_accumulator'
);
trade_options_blocks.forEach((trade_options_block: { selected_trade_type: string }) => {
if (
trade_options_block.selected_trade_type === 'accumulator' ||
trade_options_block.selected_trade_type === 'multiplier'
) {
if (stats.total_payout !== bid_price && profit >= 0 && payout !== bid_price) {
stats.total_payout += bid_price;
}
}
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maryia-matskevich-deriv we don't need to make all these changes. Let's get on a huddle with @rupato-deriv . We just need to take the bid_price out from the API response and use it like this: stats.total_payout += payout ?? bid_price ?? 0

We do not need to make all these changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we've checked, make sense, we can make the solution much shorter, thank you guys🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants