Skip to content

Commit

Permalink
thisyahlen/fix for reset balance (#6630)
Browse files Browse the repository at this point in the history
* fix for reset balance

* code refactor

* code refactor

* console rates fix
  • Loading branch information
thisyahlen-deriv committed Sep 29, 2022
1 parent 6cd7b9d commit 4ea43a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ const AccountSwitcher = props => {

const canResetBalance = account => {
const account_init_balance = 10000;
return account.is_virtual && account.balance < account_init_balance;
return account.is_virtual && account.balance !== account_init_balance;
};

const checkMultipleSvgAcc = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import BinarySocket from '_common/base/socket_base';
export const getExchangeRate = async (from_currency, to_currency) => {
const { exchange_rates } = await BinarySocket.exchange_rates(from_currency);

return exchange_rates.rates[to_currency];
return exchange_rates?.rates?.[to_currency];
};

1 comment on commit 4ea43a3

@vercel
Copy link

@vercel vercel bot commented on 4ea43a3 Sep 29, 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 – ./

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

Please sign in to comment.