Skip to content

Commit

Permalink
thisyahlen/fix for reset balance (deriv-com#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 authored 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];
};

0 comments on commit 4ea43a3

Please sign in to comment.