forked from deriv-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shontzu/93860/add-derivez-to-tradershub (deriv-com#8352)
* feat: added derivez demo/real/static to tradershub/onboarding * fix: call success modal instead of logging out * fix: roundup patch #1 based on reviews * fix: move consts to Helpers/constants file * fix: roundup patch #2 based on reviews * Revert "fix: roundup patch #2 based on reviews" This reverts commit f0cf7f5. * fix: round up patch#2 based on review * fix: clean up * fix: outdated icons after merging * fix: fixed derivx testcase error * fix: update derivx icon * fix: fixed conflicts * fix: roundup patch #3 based on code reviews * fix: round up patch#3 based on code reviews * chore: unit test for derivez static * fix: asdf * feat: token implementation for derivez (todo: pandats error) * fix: qrcode, download links, and download options * fix: round-up-patch 1 * fix: round-up-patch 2 - Description Text below the Deriv EZ header on Onboarding page is different from Design - Text format is incorrect in DerivEZ Account creation success modal - Multiple discrepancies in Trade modal (fixed in round-up-patch 1) * fix: round-up-patch 3 - use <React.Fragment> instead ov <> - remove unintentional {' '} whitespaces * fix: code smells * fix: asdf * feat: disable derivez real flow * fix: added top up for DerivEz * fix: qr code for derivez and derivx * fix: hide qr box if isMobile * fix: derivez fund topup text * fix: derivx fund topup text * fix: onboarding demo title * fix: Deriv Ez -> Deriv EZ * fix: Go -> GO * fix: Description Text below the Deriv EZ header on Onboarding page * fix: revert changes on tradershub * fix: updated to latest description (derivez onboarding/tradershub) * fix: hide derivez and dxtrade in cfd_restricted countries (japan, norway) * fix: corrected the time in server maintenance notice on derivez trade modal * fix: Server maintenance notice time * fix: DerivEZ icon redirect to https://deriv.com/derivez/ * fix: derivez topupVirtual * revert: undo changes in cfd-dashboard.tsx (deprecated file) * remove unnecesary parameter * fix: fixed derivX top up and trade button in onboarding page * fix: disable button while getting account creating * fix: disable GET button while account is being created * fix: disable GET button while account is being created * fix: setIsAccountBeingCreated(false) after account creation to reenable get buttons * fix: remove redundant use of await * fix: server maintenance time TEXT (not time) for derivez * fix: reenable button when error is triggered too * fix: blur derivez icon on onboarding 5th page * fix: remove function call that trigger token error * Update cfd-store.js * fix: pull upstream * fix: hide derivez from oboarding page * fix: show derivez on onboarding and remove "Demo" from appname * fix: empty commit * fix: total asset included derivez balance * fix: updated mockstore * fix: separate dxtrade and derivez token loader into two reactions * fix: rerunning all of our tests * chore: empty commit * fix: capitalization on module import * chore: empty commit --------- Co-authored-by: hirad-deriv <hirad@re-work.dev> Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@deriv.com>
- Loading branch information
1 parent
6c0eb46
commit f3990bb
Showing
51 changed files
with
1,111 additions
and
108 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...ore/src/assets/svgs/trading-platform/branding/ic-branding-derivez-dashboard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
packages/appstore/src/components/onboarding-new/__tests__/static-dashboard.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import StaticDashboard from '../static-dashboard'; | ||
import { StoreProvider, mockStore } from '@deriv/stores'; | ||
|
||
describe('<StaticDashboard />', () => { | ||
const is_blurry = { | ||
icon: true, | ||
item: false, | ||
text: false, | ||
get: false, | ||
topup: false, | ||
trade: false, | ||
cfd_item: false, | ||
cfd_text: false, | ||
options_item: false, | ||
options_text: false, | ||
cfd_description: false, | ||
options_description: false, | ||
platformlauncher: false, | ||
}; | ||
|
||
const is_onboarding_animated = { | ||
text: false, | ||
trade: false, | ||
topup: false, | ||
button: false, | ||
get: false, | ||
}; | ||
|
||
test('should render derivez in page if !CFDs_restricted_countries (non-eu countries)', () => { | ||
const mock = mockStore({}); | ||
|
||
render( | ||
<StoreProvider store={mock}> | ||
<StaticDashboard is_blurry={is_blurry} is_onboarding_animated={is_onboarding_animated} /> | ||
</StoreProvider> | ||
); | ||
expect(screen.queryByText('Deriv EZ')).toBeInTheDocument(); | ||
}); | ||
|
||
test('should not render derivez if CFDs_restricted_countries: true (eu countries)', () => { | ||
const mock = mockStore({ | ||
traders_hub: { | ||
CFDs_restricted_countries: true, | ||
}, | ||
}); | ||
|
||
render( | ||
<StoreProvider store={mock}> | ||
<StaticDashboard is_blurry={is_blurry} is_onboarding_animated={is_onboarding_animated} /> | ||
</StoreProvider> | ||
); | ||
expect(screen.queryByText('Deriv Ez')).not.toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.