Skip to content

Commit

Permalink
Adjust logic for setting default currency
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandrsKondratjevs committed Nov 1, 2022
1 parent f3667fc commit 1c78e92
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/scandipwa/src/util/Currency/Currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ export const getCurrency = (): string => {

const {
ConfigReducer: {
currency: {
base_currency_code = GQLCurrencyEnum.USD,
} = {},
default_display_currency_code = GQLCurrencyEnum.USD,
} = {},
} = store.getState() as RootState;

const currency = BrowserDatabase.getItem(CUR_CURRENCY);

return (typeof currency === 'string') ? currency : base_currency_code;
return (typeof currency === 'string') ? currency : default_display_currency_code;
};

/**
Expand Down

0 comments on commit 1c78e92

Please sign in to comment.