-
Notifications
You must be signed in to change notification settings - Fork 299
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
Sergei / 88771 / Australian VRTC accounts are not able to create real account #7633
Changes from 8 commits
0c49fc3
6760366
ed9ab88
b39fd6b
a96dfaa
d242bcb
e2f50e1
e676302
c6c6756
9536ba1
3ab1833
630bab1
1fad9c9
ad5e534
e0b1549
8c8256e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -457,12 +457,12 @@ const AccountSwitcher = props => { | |
const mt5_demo_total = getTotalBalanceCfd(props.mt5_login_list, true, exchanged_rate_cfd_demo); | ||
const dxtrade_demo_total = getTotalBalanceCfd(props.dxtrade_accounts_list, true, exchanged_rate_cfd_demo); | ||
|
||
const total = | ||
(vrtc_currency !== account_total_balance_currency ? vrtc_balance * exchanged_rate_demo : vrtc_balance) + | ||
mt5_demo_total.balance + | ||
dxtrade_demo_total.balance; | ||
const exchanged_balance = | ||
vrtc_currency !== account_total_balance_currency ? vrtc_balance * exchanged_rate_demo : vrtc_balance; | ||
|
||
return props.is_pre_appstore ? vrtc_balance : total; | ||
const total = exchanged_balance + mt5_demo_total.balance + dxtrade_demo_total.balance; | ||
|
||
return props.is_pre_appstore ? exchanged_balance : total; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sergei-deriv why do we need code change in balance calculation in this PR scope? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @amina-deriv QA team member created a note with some issues in my card and moved back it to 'in progress'. You can find it here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the clarification @sergei-deriv |
||
}; | ||
|
||
const getTotalRealAssets = () => { | ||
|
@@ -863,14 +863,17 @@ const AccountSwitcher = props => { | |
</Button> | ||
</div> | ||
))} | ||
{can_manage_account && ( | ||
{(can_manage_account || !props.has_active_real_account) && ( | ||
<Button | ||
className='acc-switcher__btn' | ||
secondary | ||
onClick={ | ||
props.has_any_real_account && !hasSetCurrency() | ||
? setAccountCurrency | ||
: () => props.openRealAccountSignup('manage') | ||
: () => | ||
props.has_active_real_account | ||
? props.openRealAccountSignup('manage') | ||
: props.openRealAccountSignup() | ||
} | ||
> | ||
{props.has_fiat && props.available_crypto_currencies?.length === 0 | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2505,8 +2505,13 @@ export default class ClientStore extends BaseStore { | |||||
get is_high_risk() { | ||||||
if (isEmptyObject(this.account_status)) return false; | ||||||
const { gaming_company, financial_company } = this.landing_companies; | ||||||
|
||||||
// This is a conditional check for countries like Australia/Norway which fulfil one of these following conditions. | ||||||
const restricted_countries = financial_company?.shortcode === 'svg' || gaming_company?.shortcode === 'svg'; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the first and second line should be removed
Suggested change
|
||||||
financial_company?.shortcode === 'svg' || | ||||||
(gaming_company?.shortcode === 'svg' && financial_company?.shortcode !== 'maltainvest'); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can u double check the syntax? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @amina-deriv changed, my fault with commit suggestions :) didn't recheck |
||||||
const high_risk_landing_company = financial_company?.shortcode === 'svg' && gaming_company?.shortcode === 'svg'; | ||||||
return high_risk_landing_company || this.account_status.risk_classification === 'high'; | ||||||
return high_risk_landing_company || this.account_status.risk_classification === 'high' || restricted_countries; | ||||||
} | ||||||
|
||||||
get is_low_risk() { | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you excluding mt5 and deriv X balance for trader's hub? isn't this wrong.
can you explain this code
cc: @mahdiyeh-deriv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matin-deriv we are just excluding that for the old_UI( !is_pre_appstore)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matin-deriv I didn't exclude mt5 and derivX, I've just created a new constant
const exchanged_balance = vrtc_currency !== account_total_balance_currency ? vrtc_balance * exchanged_rate_demo : vrtc_balance
, and after this just change(vrtc_currency !== account_total_balance_currency ? vrtc_balance * exchanged_rate_demo : vrtc_balance)
to theexchanged_balance
for the total. I did it because we needexchanged_balance
when return balance instead ofvrtc_balance