Skip to content

Commit

Permalink
fix: limit currency
Browse files Browse the repository at this point in the history
  • Loading branch information
farrah-deriv committed Feb 8, 2023
1 parent cf93869 commit f46dd06
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 7 additions & 3 deletions packages/core/src/Stores/notification-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,11 @@ export default class NotificationStore extends BaseStore {

if (upgradable_daily_limits)
this.addNotificationMessage(
this.client_notifications.p2p_daily_limit_increase(max_daily_buy, max_daily_sell)
this.client_notifications.p2p_daily_limit_increase(
client.currency,
max_daily_buy,
max_daily_sell
)
);
} else {
this.removeNotificationMessageByKey({ key: this.client_notifications.dp2p.key });
Expand Down Expand Up @@ -853,7 +857,7 @@ export default class NotificationStore extends BaseStore {
},
type: 'danger',
},
p2p_daily_limit_increase: (max_daily_buy, max_daily_sell) => {
p2p_daily_limit_increase: (currency, max_daily_buy, max_daily_sell) => {
return {
action:
routes.cashier_p2p === window.location.pathname
Expand All @@ -880,7 +884,7 @@ export default class NotificationStore extends BaseStore {
<Localize
i18n_default_text='Would you like to increase your daily limits to {{max_daily_buy}} {{currency}} (buy) and {{max_daily_sell}} {{currency}} (sell)?'
values={{
currency: client_data.currency,
currency,
max_daily_buy: formatMoney(client_data.currency, max_daily_buy, true),
max_daily_sell: formatMoney(client_data.currency, max_daily_sell, true),
}}
Expand Down
6 changes: 5 additions & 1 deletion packages/p2p/src/stores/general-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,11 @@ export default class GeneralStore extends BaseStore {
const { max_daily_buy, max_daily_sell } = upgradable_daily_limits;

this.props.addNotificationMessage(
this.props.client_notifications.p2p_daily_limit_increase(max_daily_buy, max_daily_sell)
this.props.client_notifications.p2p_daily_limit_increase(
this.client.currency,
max_daily_buy,
max_daily_sell
)
);
}

Expand Down

0 comments on commit f46dd06

Please sign in to comment.