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

WEBREL-602 - Invalid success message for swap-free account #9112

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
3e7ee6c
feat: added derivez demo/real/static to tradershub/onboarding
shontzu-deriv Apr 26, 2023
750c147
fix: call success modal instead of logging out
shontzu-deriv Apr 26, 2023
0de6365
fix: roundup patch #1 based on reviews
shontzu-deriv Apr 27, 2023
0244cf7
fix: move consts to Helpers/constants file
shontzu-deriv Apr 28, 2023
f0cf7f5
fix: roundup patch #2 based on reviews
shontzu-deriv Apr 28, 2023
ccf2acb
Revert "fix: roundup patch #2 based on reviews"
shontzu-deriv Apr 28, 2023
3e33c1a
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Apr 28, 2023
b739484
fix: round up patch#2 based on review
shontzu-deriv Apr 28, 2023
98f0d13
fix: clean up
shontzu-deriv Apr 28, 2023
ad0b212
Merge branch 'master' of github.com:binary-com/deriv-app into shontzu…
shontzu-deriv May 2, 2023
7723a9d
fix: outdated icons after merging
shontzu-deriv May 2, 2023
8180f5d
fix: fixed derivx testcase error
shontzu-deriv May 2, 2023
f7b8b69
fix: update derivx icon
shontzu-deriv May 2, 2023
f678bdb
fix: fixed conflicts
shontzu-deriv May 2, 2023
70e7db7
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv May 2, 2023
a543b67
fix: roundup patch #3 based on code reviews
shontzu-deriv May 8, 2023
c8dfd0c
fix: round up patch#3 based on code reviews
shontzu-deriv May 8, 2023
6e65f2d
Merge branch 'shontzu/93860/add-derivez-to-tradershub' of github.com:…
shontzu-deriv May 8, 2023
0fd3d67
chore: unit test for derivez static
shontzu-deriv May 9, 2023
cc91d47
fix: asdf
shontzu-deriv May 9, 2023
bb6d746
feat: token implementation for derivez (todo: pandats error)
shontzu-deriv May 10, 2023
27438c3
fix: qrcode, download links, and download options
shontzu-deriv May 16, 2023
a147515
fix: round-up-patch 1
shontzu-deriv May 17, 2023
51bd1e6
fix: round-up-patch 2
shontzu-deriv May 17, 2023
b984742
fix: round-up-patch 3
shontzu-deriv May 17, 2023
6e6ce57
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv May 17, 2023
e8eaeff
fix: code smells
shontzu-deriv May 17, 2023
363c3df
fix: asdf
shontzu-deriv May 17, 2023
b6520f9
feat: disable derivez real flow
shontzu-deriv May 18, 2023
6499817
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
hirad-deriv May 19, 2023
3b498df
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv May 23, 2023
770a01d
fix: added top up for DerivEz
shontzu-deriv May 23, 2023
0e511fa
fix: qr code for derivez and derivx
shontzu-deriv May 25, 2023
3728f10
fix: hide qr box if isMobile
shontzu-deriv May 25, 2023
576465c
feat: merge master
shontzu-deriv May 26, 2023
5533392
fix: derivez fund topup text
shontzu-deriv May 29, 2023
563f198
fix: derivx fund topup text
shontzu-deriv May 29, 2023
097d950
fix: onboarding demo title
shontzu-deriv May 30, 2023
f1c7ef1
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv May 30, 2023
5b1e7f8
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv May 31, 2023
73793bb
fix: Deriv Ez -> Deriv EZ
shontzu-deriv May 31, 2023
4b17f67
Merge branch 'shontzu/93860/add-derivez-to-tradershub' of github.com:…
shontzu-deriv May 31, 2023
095b4f7
fix: Go -> GO
shontzu-deriv May 31, 2023
385d3fc
fix: Description Text below the Deriv EZ header on Onboarding page
shontzu-deriv May 31, 2023
0307805
fix: revert changes on tradershub
shontzu-deriv May 31, 2023
878d438
fix: updated to latest description (derivez onboarding/tradershub)
shontzu-deriv Jun 1, 2023
d2313d3
fix: hide derivez and dxtrade in cfd_restricted countries (japan, nor…
shontzu-deriv Jun 1, 2023
7a16079
fix: corrected the time in server maintenance notice on derivez trade…
shontzu-deriv Jun 2, 2023
2dd33d8
fix: merge master
shontzu-deriv Jun 6, 2023
ada99c4
fix: Server maintenance notice time
shontzu-deriv Jun 6, 2023
5a11fd0
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 6, 2023
ba53e10
Merge branch 'master' of github.com:binary-com/deriv-app into shontzu…
shontzu-deriv Jun 6, 2023
8118a2e
fix: DerivEZ icon redirect to https://deriv.com/derivez/
shontzu-deriv Jun 6, 2023
8ad1e62
Merge branch 'shontzu/93860/add-derivez-to-tradershub' of github.com:…
shontzu-deriv Jun 6, 2023
95be54b
fix: derivez topupVirtual
shontzu-deriv Jun 6, 2023
22f86f3
revert: undo changes in cfd-dashboard.tsx (deprecated file)
shontzu-deriv Jun 6, 2023
66e5cc0
remove unnecesary parameter
shontzu-deriv Jun 6, 2023
18344ce
fix: fixed derivX top up and trade button in onboarding page
shontzu-deriv Jun 6, 2023
18c414a
fix: disable button while getting account creating
shontzu-deriv Jun 6, 2023
bbc4b97
fix: disable GET button while account is being created
shontzu-deriv Jun 6, 2023
b6b5fe6
fix: disable GET button while account is being created
shontzu-deriv Jun 6, 2023
428bfa6
fix: setIsAccountBeingCreated(false) after account creation to reenab…
shontzu-deriv Jun 7, 2023
20f57a6
fix: remove redundant use of await
shontzu-deriv Jun 7, 2023
ac5d143
fix: server maintenance time TEXT (not time) for derivez
shontzu-deriv Jun 7, 2023
6ea8a26
fix: reenable button when error is triggered too
shontzu-deriv Jun 7, 2023
632d8ee
fix: blur derivez icon on onboarding 5th page
shontzu-deriv Jun 7, 2023
b8bcdba
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 7, 2023
01fb0a3
Merge branch 'binary-com:master' into shontzu/93860/add-derivez-to-tr…
shontzu-deriv Jun 8, 2023
123c929
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 8, 2023
004f80b
fix: remove function call that trigger token error
shontzu-deriv Jun 8, 2023
9f53e62
Update cfd-store.js
shontzu-deriv Jun 8, 2023
e53714d
Merge pull request #10 from shontzu-deriv/shontzu/WALL-980/Getting-co…
shontzu-deriv Jun 8, 2023
23f9cfe
Merge branch 'master' of github.com:binary-com/deriv-app into shontzu…
shontzu-deriv Jun 8, 2023
0f89b49
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
hirad-deriv Jun 8, 2023
70ad19f
fix: pull upstream
shontzu-deriv Jun 8, 2023
5e84d86
Merge branch 'shontzu/93860/add-derivez-to-tradershub' of github.com:…
shontzu-deriv Jun 8, 2023
3960d21
fix: hide derivez from oboarding page
shontzu-deriv Jun 8, 2023
da2ba1e
Merge pull request #11 from shontzu-deriv/shontzu/WALL-993/Onboarding…
shontzu-deriv Jun 9, 2023
bdee465
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 9, 2023
53a6a33
fix: show derivez on onboarding and remove "Demo" from appname
shontzu-deriv Jun 12, 2023
e64c92d
Merge branch master into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 12, 2023
443fc22
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 12, 2023
f434514
fix: empty commit
shontzu-deriv Jun 12, 2023
7bc4b8c
Merge branch 'shontzu/93860/add-derivez-to-tradershub' of github.com:…
shontzu-deriv Jun 12, 2023
03f03ae
fix: total asset included derivez balance
shontzu-deriv Jun 12, 2023
8f7196c
fix: updated mockstore
shontzu-deriv Jun 12, 2023
f695aff
Merge pull request #12 from shontzu-deriv/shontzu/WALL-1060/Total-ass…
shontzu-deriv Jun 12, 2023
f286c2a
fix: separate dxtrade and derivez token loader into two reactions
shontzu-deriv Jun 13, 2023
5ae59b7
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 15, 2023
04f404f
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 15, 2023
0d524d1
Merge branch 'shontzu/93860/add-derivez-to-tradershub' of github.com:…
shontzu-deriv Jun 15, 2023
fb2b398
fix: rerunning all of our tests
shontzu-deriv Jun 15, 2023
e877f7f
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 16, 2023
ea5b528
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
ali-hosseini-deriv Jun 18, 2023
64efad2
chore: empty commit
shontzu-deriv Jun 19, 2023
f911cd2
chore: merge latest change
shontzu-deriv Jun 19, 2023
3f30fab
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 20, 2023
c92f613
fix: capitalization on module import
shontzu-deriv Jun 20, 2023
e05b4d0
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 20, 2023
cb029d1
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
hirad-deriv Jun 20, 2023
4f840b0
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 21, 2023
94f6593
Merge branch 'master' into shontzu/93860/add-derivez-to-tradershub
shontzu-deriv Jun 22, 2023
e5aacb6
chore: empty commit
shontzu-deriv Jun 22, 2023
3599586
Merge branch 'shontzu/93860/add-derivez-to-tradershub' of github.com:…
shontzu-deriv Jun 22, 2023
97524b2
fix: hotfix
shontzu-deriv Jun 23, 2023
005617d
Merge branch 'master' into shontzu/WEBREL-602/Invalid-success-message…
shontzu-deriv Jun 23, 2023
64cebaa
refactor: use switch-case instead of if-else for type_label
shontzu-deriv Jun 23, 2023
015578c
fix: use short_title instead of title for type_label
shontzu-deriv Jun 23, 2023
83d1c47
Merge branch 'master' into shontzu/WEBREL-602/Invalid-success-message…
shontzu-deriv Jun 23, 2023
799e128
chore: empty commit
shontzu-deriv Jun 23, 2023
34e4e13
fix: circle ci failing
shontzu-deriv Jun 23, 2023
3ca92f3
Merge branch 'master' into shontzu/WEBREL-602/Invalid-success-message…
shontzu-deriv Jun 23, 2023
3098a62
chore: update branch
shontzu-deriv Jun 26, 2023
2c96dcb
fix: font
shontzu-deriv Jun 26, 2023
b88721c
Update index.tsx
shontzu-deriv Jun 26, 2023
4719e32
fix: text
shontzu-deriv Jun 26, 2023
d033993
fix: asdf
shontzu-deriv Jun 26, 2023
9b2ae9c
chore: merge with parent
shontzu-deriv Jun 26, 2023
fb1be33
Merge pull request #13 from shontzu-deriv/shontzu/WEBREL-613/Minor-di…
shontzu-deriv Jun 26, 2023
72fdd00
chore: empty commit
shontzu-deriv Jun 26, 2023
5b48bfd
Merge branch 'master' into shontzu/WEBREL-602/Invalid-success-message…
shontzu-deriv Jun 26, 2023
5a4dd68
chore: update branch
shontzu-deriv Jun 26, 2023
30b8f14
Update cfd-password-modal.tsx
shontzu-deriv Jun 26, 2023
d7fecdd
Merge branch 'master' into shontzu/WEBREL-602/Invalid-success-message…
shontzu-deriv Jun 26, 2023
9b005aa
Merge branch 'master' into shontzu/WEBREL-602/Invalid-success-message…
shontzu-deriv Jun 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ const PoiConfirmWithExampleFormContainer = ({
setFieldTouched={setFieldTouched}
editable_fields={rest_state.changeable_fields}
is_rendered_for_onfido
warning_items={undefined}
/>
<button
type='submit'
Expand Down
57 changes: 33 additions & 24 deletions packages/cfd/src/Containers/cfd-password-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import RootStore from '../Stores/index';
import {
getDxCompanies,
getMtCompanies,
getDerivezCompanies,
getFormattedJurisdictionCode,
TMtCompanies,
TDxCompanies,
TDerivezCompanies,
} from '../Stores/Modules/CFD/Helpers/cfd-config';
import {
FormSubmitButton,
Expand Down Expand Up @@ -839,15 +841,33 @@ const CFDPasswordModal = ({
if (!category && !type) return '';

const category_label = category === 'real' ? localize('real') : localize('demo');
const type_label =
getMtCompanies(show_eu_related_content)[category as keyof TMtCompanies][
type as keyof TMtCompanies['demo' | 'real']
].short_title;
const deriv_x_type_label =
getDxCompanies()[category as keyof TDxCompanies][type as keyof TDxCompanies['demo' | 'real']].short_title;
let type_label = '';
switch (platform) {
case CFD_PLATFORMS.MT5:
type_label =
getMtCompanies(show_eu_related_content)[category as keyof TMtCompanies][
type as keyof TMtCompanies['demo' | 'real']
].short_title;
break;
case CFD_PLATFORMS.DXTRADE:
type_label =
getDxCompanies()[category as keyof TDxCompanies][type as keyof TDxCompanies['demo' | 'real']]
.short_title;
break;
case CFD_PLATFORMS.DERIVEZ:
type_label =
getDerivezCompanies()[category as keyof TDerivezCompanies][
type as keyof TDerivezCompanies['demo' | 'real']
].short_title;
break;
default:
type_label = '';
break;
}

const jurisdiction_label =
jurisdiction_selected_shortcode && getFormattedJurisdictionCode(jurisdiction_selected_shortcode);
const mt5_platform_label = jurisdiction_selected_shortcode !== Jurisdiction.MALTA_INVEST ? 'MT5' : '';
const mt5_platform_label = jurisdiction_selected_shortcode !== Jurisdiction.MALTA_INVEST ? 'Deriv MT5' : '';
mahdiyeh-deriv marked this conversation as resolved.
Show resolved Hide resolved

if (category === 'real') {
let platformName = '';
Expand All @@ -868,19 +888,14 @@ const CFDPasswordModal = ({
<Localize
i18n_default_text='Congratulations, you have successfully created your {{category}} <0>{{platform}}</0> <1>{{type}} {{jurisdiction_selected_shortcode}}</1> account. '
values={{
type:
platform === CFD_PLATFORMS.DERIVEZ
? 'CFDs'
: platform === CFD_PLATFORMS.DXTRADE
? deriv_x_type_label
: type_label,
type: type_label,
platform:
platform === CFD_PLATFORMS.MT5 ? mt5_platform_label : getCFDPlatformLabel(platform),
category: category_label,
jurisdiction_selected_shortcode:
platform === CFD_PLATFORMS.MT5 && !show_eu_related_content ? jurisdiction_label : '',
}}
components={[<span key={0} />, <strong key={1} className='cfd-account__platform' />]}
components={[<span key={0} className='cfd-account__platform' />, <strong key={1} />]}
/>
{platform === CFD_PLATFORMS.DXTRADE ? (
<Localize i18n_default_text='To start trading, transfer funds from your Deriv account into this account.' />
Expand All @@ -897,19 +912,13 @@ const CFDPasswordModal = ({

return (
<Localize
i18n_default_text='Congratulations, you have successfully created your {{category}} {{deriv_keyword}} <0>{{platform}}</0> <1>{{type}}</1> account.'
i18n_default_text='Congratulations, you have successfully created your {{category}} <0>{{platform}}</0> <1>{{type}}</1> account. '
values={{
deriv_keyword: platform === CFD_PLATFORMS.MT5 ? 'Deriv' : '',
type:
platform === CFD_PLATFORMS.DERIVEZ
? 'CFDs'
: platform === CFD_PLATFORMS.DXTRADE
? deriv_x_type_label
: type_label,
platform: platform === CFD_PLATFORMS.MT5 ? 'MT5' : getCFDPlatformLabel(platform),
type: type_label,
platform: getCFDPlatformLabel(platform),
category: category_label,
}}
components={[<span key={0} />, <strong key={1} className='cfd-account__platform' />]}
components={[<span key={0} className='cfd-account__platform' />, <strong key={1} />]}
/>
);
};
Expand Down
7 changes: 3 additions & 4 deletions packages/cfd/src/Stores/Modules/CFD/Helpers/cfd-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const getMtCompanies = (is_eu: boolean) => {
const all_config = {
account_type: '',
leverage: 100,
short_title: localize('Demo'),
short_title: localize('Swap-Free'),
Copy link
Contributor

Choose a reason for hiding this comment

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

This configurations needs to change. it will affect all of our accounts with all type.
Your fix is temporary and needs to be changes later.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, but these changes look like it affects many other places.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

acked on this, will look into other solutions

};
const synthetic_config = {
account_type: '',
Expand All @@ -93,7 +93,6 @@ export const getMtCompanies = (is_eu: boolean) => {
leverage: 100,
short_title: localize('Financial STP'),
};

return {
demo: {
all: {
Expand All @@ -106,7 +105,7 @@ export const getMtCompanies = (is_eu: boolean) => {
mt5_account_type: all_config.account_type,
leverage: all_config.leverage,
title: localize('Demo Swap-Free SVG'),
short_title: all_config.short_title,
short_title: localize('Swap-Free SVG'),
},
derivez: {
mt5_account_type: all_config.account_type,
Expand Down Expand Up @@ -137,7 +136,7 @@ export const getMtCompanies = (is_eu: boolean) => {
mt5_account_type: financial_config.account_type,
leverage: financial_config.leverage,
title: is_eu ? localize('Demo CFDs') : localize('Demo Financial SVG'),
short_title: financial_config.short_title,
short_title: is_eu ? localize('CFDs') : localize('Financial SVG'),
},
financial_stp: {
mt5_account_type: financial_stp_config.account_type,
Expand Down