Skip to content

Commit

Permalink
fix non localized logic relying on localize
Browse files Browse the repository at this point in the history
  • Loading branch information
oskar-binary committed Dec 17, 2019
1 parent 95debc8 commit 6a04067
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/Stores/client-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export default class ClientStore extends BaseStore {
if (Object.keys(this.currencies_list).length > 0) {
const keys = Object.keys(this.currencies_list);
// Fix for edge case when logging out from crypto accounts causes Fiat list to be empty
if (this.currencies_list.Fiat.length < 1) return 'USD';
if (this.currencies_list[localize('Fiat')].length < 1) return 'USD';
return Object.values(this.currencies_list[`${keys[0]}`])[0].text;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { localize } from 'deriv-translations';
import ObjectUtils from 'deriv-shared/utils/object';
import ContractType from './contract-type';

export const hasCallPutEqual = (contract_type_list) => {
if (!contract_type_list) return false;

return ObjectUtils.getPropertyValue(contract_type_list, 'Up/Down')
return ObjectUtils.getPropertyValue(contract_type_list, localize('Up/Down'))
.some(contract => contract.value === 'rise_fall_equal');
};

Expand Down

0 comments on commit 6a04067

Please sign in to comment.