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

farrah/80906/feat: automate daily limit increase #7142

Merged

Conversation

farrah-deriv
Copy link
Contributor

Changes:

Please include a summary of the change and which issue is fixed below:

  • Upgrade daily buy and sell limit

When you need to add unit test

  • If this change disrupt current flow
  • If this change is adding new flow

When you need to add integration test

  • If components from external libraries are being used to define the flow, e.g. @deriv/components
  • If it relies on a very specific set of props with no default behavior for the current component.

Test coverage checklist (for reviewer)

  • Ensure utility / function has a test case
  • Ensure all the tests are passing

Type of change

  • Bug fix
  • New feature
  • Update feature
  • Refactor code
  • Translation to code
  • Translation to crowdin
  • Script configuration
  • Improve performance
  • Style only
  • Dependency update
  • Documentation update
  • Release

@boring-cyborg boring-cyborg bot added the P2P label Dec 9, 2022
@vercel
Copy link

vercel bot commented Dec 9, 2022

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

Name Status Preview Comments Updated
deriv-app ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 9, 2023 at 0:11AM (UTC)

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2022

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

Click here to copy & paste above information.
- **PR**: [https://github.com/binary-com/deriv-app/pull/7142](https://github.com/binary-com/deriv-app/pull/7142)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-farrah-deriv-80906-automate-limit-increase.binary.sx?qa_server=frontend.binaryws.com&app_id=31227
    - **Original**: https://deriv-app-git-fork-farrah-deriv-80906-automate-limit-increase.binary.sx
- **App ID**: `31227`

@sonarcloud
Copy link

sonarcloud bot commented Dec 9, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
3.1% 3.1% Duplication

@codecov-commenter
Copy link

codecov-commenter commented Dec 9, 2022

Codecov Report

❗ No coverage uploaded for pull request base (master@4b959a6). Click here to learn what that means.
The diff coverage is 1.13%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff            @@
##             master    #7142   +/-   ##
=========================================
  Coverage          ?   19.89%           
=========================================
  Files             ?     1498           
  Lines             ?    35277           
  Branches          ?     6460           
=========================================
  Hits              ?     7018           
  Misses            ?    27691           
  Partials          ?      568           
Impacted Files Coverage Δ
packages/core/src/App/Constants/routes-config.js 22.35% <0.00%> (ø)
...iners/NotificationsDialog/notifications-dialog.jsx 0.00% <0.00%> (ø)
...e/src/App/Containers/app-notification-messages.jsx 0.00% <0.00%> (ø)
packages/core/src/Stores/client-store.js 0.00% <0.00%> (ø)
packages/core/src/Stores/notification-store.js 0.00% <0.00%> (ø)
packages/p2p/src/components/app.jsx 0.00% <0.00%> (ø)
...components/daily-limit-modal/daily-limit-modal.jsx 0.00% <0.00%> (ø)
...profile-details-table/my-profile-details-table.jsx 0.00% <0.00%> (ø)
...s/my-profile/my-profile-stats/my-profile-stats.jsx 0.00% <ø> (ø)
...kages/p2p/src/components/my-profile/my-profile.jsx 0.00% <ø> (ø)
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 24, 2023

🚨 Lighthouse report for the changes in this PR:

Category Score
🔺 Performance 16
🟧 Accessibility 73
🟢 Best practices 92
🟧 SEO 85
🟢 PWA 90

Lighthouse ran with https://deriv-app-git-fork-farrah-deriv-80906-automate-limit-increase.binary.sx/

this.setP2pAdvertiserError(getPropertyValue(advertiser_info, ['error', 'code']));
}

setAdvertiserInfo(advertiser_info) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this here in cashier? I have a PR to remove all P2P calls in cashier and adding this will affect that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay let me check. This is for showing the daily limit notification.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@carol-deriv @farzin-deriv we can leave this for now since there's no other way to show the notification but by calling p2p_advertiser_info from cashier

Copy link
Contributor

Choose a reason for hiding this comment

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

@farrah-deriv Can we fetch the p2p_advertiser_info somewhere in core instead? In the notification store maybe, As a temporary solution.

Currently, we are trying to remove all the usage of the cashier store outside of the cashier itself in this card and by the end, we will also remove the cashier store instantiation in the core package, So by adding the current implementation in this PR we will just create more work for refactoring.

If really there isn’t a way to move it to somewhere else then we can leave it as it is 🙇🏻

@@ -11,6 +11,7 @@ export default class GeneralStore extends BaseStore {
super({ root_store });

makeObservable(this, {
advertiser_info: observable,
Copy link
Contributor

Choose a reason for hiding this comment

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

@farrah-deriv Is it possible to move this into P2P stores?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will check @farzin-deriv

const wait = setTimeout(() => this.setIsErrorModalOpen(true), 250);
} else {
clearTimeout(wait);
const wait = setTimeout(() => this.setIsDailyLimitSuccessModalOpen(true), 250);
Copy link
Contributor

Choose a reason for hiding this comment

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

is the setTimeout used to prevent any overlapping of modals here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -386,6 +387,15 @@ export default class GeneralStore extends BaseStore {
});
}

showDailyLimitIncreaseNotification() {
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: shouldn't showDailyLimitIncreaseNotification be added above as showDailyLimitIncreaseNotification: action.bound? because I didn't see it...

ameerul-deriv
ameerul-deriv previously approved these changes Jan 31, 2023
Copy link
Contributor

@ameerul-deriv ameerul-deriv left a comment

Choose a reason for hiding this comment

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

LGTM

amina-deriv
amina-deriv previously approved these changes Feb 7, 2023
amina-deriv
amina-deriv previously approved these changes Feb 8, 2023
vinu-deriv
vinu-deriv previously approved these changes Feb 13, 2023
nada-deriv
nada-deriv previously approved these changes Feb 15, 2023
@sonarcloud
Copy link

sonarcloud bot commented Mar 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
5.0% 5.0% Duplication

@bahar-sadeghzadeh bahar-sadeghzadeh merged commit 22a4e3c into binary-com:master Mar 10, 2023
hirad-deriv added a commit that referenced this pull request Mar 15, 2023
* thisyahlen/fix: remove unused files from appstore package (#7582)

* fix: remove unused files from appstore package

* fix: circle ci errors

---------

Co-authored-by: Yashim Wong <yashim@deriv.com>

* refactor: update i18next to latest version and migrate i18next.js to … (#7231)

* refactor: update i18next to latest version and migrate i18next.js to i18nnext.ts

* refactor: update i18next to latest version and migrate i18next.js to i18nnext.ts

* bugfix: degrading i18next from v22.4.6 to 21.0.0

* bugfix: translation issue regarding  crc32 because of the return type mismatch

* fix: conflict fix on package-lock file

* refactor: remove unwanted type coercion

* refactor: remove unwanted comment

* refactor: remove unwanted imports

* refactor: remove unwanted comments

* refactor: update on type handling

* fix: eslint disable , should revert 1

* revert: revert eslint

* fix: conflict fix

* fix: conflict fix package-lock file update

---------

Co-authored-by: Jim Daniels Wasswa <104334373+jim-deriv@users.noreply.github.com>
Co-authored-by: Ashraf Ali <ashrafali@Ashraf-Alis-MacBook-Pro-QNVV9HH5LX.local>

* Ameerul /Bug 88237 Counterparty list not updating when there is more than 50 trade partner (#7702)

* chore: added pagination for trade partners

* chore: removed values from dropdown for my counterparties

* chore: fixed subtask issue for list no blocked users

* Aizad/90216/cool down warning popup (#7838)

* chore: update packages

* chore: updated Risk tolerance Warning modal

* fix: made changes based on comments

* chore: updated Risk tolerance Warning modal

* fix: made changes based on comments

* chore: updated Risk tolerance Warning modal

* fix: made changes based on comments

* fix: added close icon to modal

* fix: modal sizing for mobile and remove unnecessary stuff

* fix: made changes based on comments

* fix: risk modal not closing properly

---------

Co-authored-by: Bahar <bahar@regentmarkets.com>

* Sergei / 83280 / Trader's hub text overflows in Espanol Language (#7706)

* fix: fit traders hub text and arrows for different languages

* chore: empty commit to run build

* refactor: add separate classes for expore and exit traders hub

* farrah/80906/feat: automate daily limit increase (#7142)

* feat: automate daily limit increase

* fix: success message

* fix: API integration

* fix: notification

* fix: notification redirection

* fix: notification call in core

* fix: missing p2p_advertiser_info

* fix: showDailyLimitIncreaseNotification binding

* fix: notification subscription

* fix: notification in mobile

* fix: limit currency

* fix: success and loading modals

* fix: modals

* fix: daily limit modal

* fix: notification messages

* fix: modal width

* fix: loader style

* Suisin/chore: idv data zoo integration (#7450)

* chore: idv data zoo integration

* chore: edit test case

* chore: updated logic to solve test case problem

* chore: add React.Fragment

* chore: design issue in data zoo integration

* chore: real-account sign up india idv account should have 2 text field for Aadhar and Passport

* chore: update code based on commits

* chore: move reusable function to utils

* chore: updated onKeyUp into function, rearrange alphabatic order and rename variables

* chore: update logic for onKeyUp

* translations: 📚 sync translations with crowdin (#7870)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* Likhith/89495/translation issue fix (#7756)

* feat: 💄 added subsection indicator for FormStepper

* feat: 💄 incorporated form-progress for mobile and Desktop

* feat: ✨ integrated changes to exisiting user TA questions

* feat: 🎨 update type of uistore

* feat: added changes to mock store

* feat: ♻️ incorporated review comments

* feat: ♻️ incorporated review comments

* feat: ♻️ incorporated review comments

* feat: ✨ incorporated form wobbling

* feat: 🐛 incorporated designs as specified in Figma

* fix: 🐛 content not translated to selected languages

* feat: reverted text changes

* feat: modified content as per figma

* feat: 🎨 content change

* feat: added missing fullstop

* feat: content mismatch fix

* feat: CSS fix

* feat: CSS fix

* feat: tested for languages

---------

Co-authored-by: Matin shafiei <matin@deriv.com>

* translations: 📚 sync translations with crowdin (#7873)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* chore: added checks for loginid (#7877)

* Mahdiyeh/fix: not showing trading assesment modal when switching between account (#7880)

* fix: not showing trading assessment popup when cfd_score iis not set

* chore: add types to types.ts

* Ameerul /Bug 90562 Unable to click on Increase My Limits button (#7884)

* fix: passed redirectTo function from p2p to notification store

* chore: fixed tests

* fix: popup empty for error thrown when activating ad from table (#7888)

* translations: 📚 sync translations with crowdin (#7892)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* Likhith | Akmal / Vanilla options feature (#7033)

* Initial commit

* added mobile view

* feat: ✨ added info hints and mobile view

* feat: ➕ displays vanilla options under trade types

* feat: 🚧 incorporated mobile view

* feat: 💄 added icons

* feat: 💄 incorporated new UI changes

* feat: 💄 added required styling

* feat: 🎨 incorporated the changes for report section (#34)

* feat: ✨ description changes

* feat: ✨ incorporated strike field changes

* feat: 🎨 fixed the title for mobile view stake field

* feat: ✨ incorporated mobile view

* feat: 🔥 removed master changes

* feat: 🎨 incorporated payout button change

* feat: purchase button text css

* feat: ✨ disabled barrier drag for vanilla

* fix: 🐛 strike field design fix

* feat: 💄 incorporated info hint message for Payout button

* fix: 🐛 title change

* fix: 🐛 payout per point value fix

* feat: ✨ incorporated barrier validation condition for vanilla

* feat: ✨ computing min-max stake values

* refactor: ♻️ incorporated review comments

* feat: add vanilla contract card for desktop

* feat: add vanilla contract card for contract details

* feat: change label to strike for vanilla contracts in contract details

* feat: use bid price for contract value

* feat: add vanilla option card for recent positions

* feat: ✨ incorporated condition to show contract audit

* feat: ✨ incorporated strike and Payout per point values in open position

* feat: ✨ incorporated chart floating message change for vanilla trade

* fix: enable collapsible button for vanilla contracts

* feat: 🎨 incorporated chart long code message for vanilla

* feat: ⚡ incorporated contract card for mobile

* feat: ✨ incorporated chart markers for mobile and desktop

* feat: ✨ incorporated currency unit for Payout per point

* feat: 🎨 color refactor

* feat: add responsive vanilla options card

* fix: strike formatting

* feat: add vanilla trade types component

* feat: implement new design for vanilla trade types

* fix: sort ui store

* fix: sort trade store

* fix: UI changes for vanilla option trade params

* feat: new design for trade parameters on mobile

* fix: remove unused variable

* fix: strike spot area

* feat: change design for vanilla option open positions for mobile

* fix: refactor code

* fix: merge issue

* feat: ♻️ incorporated review comments

* fix: review comments

* refactor: ♻️ incorporated review comments

* refactor: ♻️ incorporated view port sizes

* fix: remove comments

* fix: unlocalized strings

* fix: populate barrier options on error response

* fix: 🐛 report title fix

* fix: daily VO contracts to show in recent positions

* fix: update to latest content

* fix: content issues

* feat: add sorting logic for trade types

* fix: 🐛 resolved input validation failed error

* fix: incorrect label for vanilla calls

* fix: the icon is incorrect for some of the trades

* fix: 🐛 strike price is empty when there is duration change

* fix: 🐛 strike price dropdown is empty for day duration change

* fix: 🐛 modified stake boundary calculation for vanilla opts

* fix: callout not showing in contract details

* fix: 🐛 removed unused code snip

* fix: 🐛 capture stake boundary on error

* fix: merge conflicts

* fix: 🐛 ensuring correct boundary is set based on type of Vanilla contract

* fix: 🐛 set strike vlaue and list on error response

* fix: remove currency based rounding for usd amounts

* fix: payout rounding value

* fix: format numbers based on currency in p&l callout

* fix: change colors for vanilla closed contracts

* fix: 🐛 call proposal API on strike change

* feat: changed vanilla trade description

* feat: content change

* fix: 🐛 added missing label

* fix: align profit label only when it appears on the screen

* fix: 🐛 corrected field name

* fix: 🐛 refactored code to support additional configs

* fix: change icon colors in dark mode

* fix: 🐛 incorporated + sign in reports

* fix: 🐛 resolved issue with double error message

* fix: exit spot placement on y-axis

* feat: modified the content as per figma

* fix: tooltip alignment for strike description

* fix: size units

* feat: change content everywhere according to latest design

* feat: 🎨 added tooltip for stake

* feat: incorporated styles to stake tooltip

* fix: 🐛 fixed the type issue

* chore: ♻️ incorporated naming conventions

* feat: change paddings and profit/loss label positioning in mobile

* feat: content update as per figma

* fix: incorrect profit logic for prematurely sold contracts

* feat: change mobile modal to tooltip

* feat: 💄 set the layout for vanilla trade

---------

Co-authored-by: Likhith Kolayari <likhith@regentmarkets.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>

* Farabi/89169/fix implement new google api process ⚡  (#7807)

* fix: implement google identity services

* fix: change state for signout

* fix: google drive connection on reload and error handling"

* fix: 401 error handling when loading from GDrive

* fix: added scope and discovery_docs on config

* fix: updated config for testing

* revert: reverted the testing configuration for google account

---------

Co-authored-by: Farabi <farabi@Farabi-Chowdhurys-MacBook-Pro-LT2G9C9X0P.local>
Co-authored-by: Sandeep Rajput <90243468+sandeep-deriv@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: vinu-deriv <vinu@deriv.com>

* Hamza/90331/icon title name update of stock indices (#7863)

* refactor: sync the icons with deriv.com

* refactor: name changed for Japan index v1.2

---------

Co-authored-by: thisyahlen <104053934+thisyahlen-deriv@users.noreply.github.com>
Co-authored-by: Yashim Wong <yashim@deriv.com>
Co-authored-by: ashraf-deriv <97999159+ashraf-deriv@users.noreply.github.com>
Co-authored-by: Jim Daniels Wasswa <104334373+jim-deriv@users.noreply.github.com>
Co-authored-by: Ashraf Ali <ashrafali@Ashraf-Alis-MacBook-Pro-QNVV9HH5LX.local>
Co-authored-by: ameerul-deriv <103412909+ameerul-deriv@users.noreply.github.com>
Co-authored-by: Aizad Ridzo <103104395+aizad-deriv@users.noreply.github.com>
Co-authored-by: Bahar <bahar@regentmarkets.com>
Co-authored-by: Sergei Baranovski <120570511+sergei-deriv@users.noreply.github.com>
Co-authored-by: Farrah Mae Ochoa <82315152+farrah-deriv@users.noreply.github.com>
Co-authored-by: Sui Sin <103026762+suisin-deriv@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: Matin shafiei <matin@deriv.com>
Co-authored-by: adrienne-deriv <103016120+adrienne-deriv@users.noreply.github.com>
Co-authored-by: mahdiyeh-deriv <82078941+mahdiyeh-deriv@users.noreply.github.com>
Co-authored-by: nada-deriv <122768621+nada-deriv@users.noreply.github.com>
Co-authored-by: Akmal Djumakhodjaev <akmal@binary.com>
Co-authored-by: Likhith Kolayari <likhith@regentmarkets.com>
Co-authored-by: Farabi <102643568+farabi-deriv@users.noreply.github.com>
Co-authored-by: Farabi <farabi@Farabi-Chowdhurys-MacBook-Pro-LT2G9C9X0P.local>
Co-authored-by: Sandeep Rajput <90243468+sandeep-deriv@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: vinu-deriv <vinu@deriv.com>
Co-authored-by: Muhammad Hamza <120543468+hamza-deriv@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants