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 and adrienne-deriv committed Oct 20, 2022
1 parent 17676e9 commit 8a7f608
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 8a7f608

Please sign in to comment.