Skip to content

Commit

Permalink
Fix currency issue on real accounts with no currency (#6329)
Browse files Browse the repository at this point in the history
  • Loading branch information
matin-deriv committed Aug 30, 2022
1 parent a1f8ed0 commit 4219ef5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ const AccountSwitcher = props => {
.reduce(
(total, account) => {
const real_account_loginid = props.account_list?.find(acc => !acc.is_virtual)?.loginid;
if (!is_demo && props.accounts[real_account_loginid].currency !== account.currency) {
if (!is_demo && props.accounts[real_account_loginid]?.currency !== account.currency) {
total.balance += account.balance * exchanged_rate;
} else {
total.balance += account.balance;
Expand Down

1 comment on commit 4219ef5

@vercel
Copy link

@vercel vercel bot commented on 4219ef5 Aug 30, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

deriv-app – ./

binary.sx
deriv-app.vercel.app
deriv-app.binary.sx
deriv-app-git-master.binary.sx

Please sign in to comment.