Skip to content

Commit

Permalink
Amina/fix: set citizen on account (#8102)
Browse files Browse the repository at this point in the history
* fix: set citizen on account

* chore: trigger circleci

* fix: set citizen on account
  • Loading branch information
amina-deriv committed Mar 31, 2023
1 parent 8ced40e commit 60ae15c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/core/src/Stores/client-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ export default class ClientStore extends BaseStore {
currency = form_values.currency;
}
const { document_number, document_type, document_additional, ...required_form_values } = form_values;
required_form_values.citizen = this.account_settings.citizen || this.residence;
required_form_values.citizen = form_values?.citizen || this.account_settings.citizen || this.residence;

const response = is_maltainvest_account
? await WS.newAccountRealMaltaInvest(required_form_values)
Expand Down Expand Up @@ -1591,7 +1591,9 @@ export default class ClientStore extends BaseStore {
if (language !== 'EN' && language !== LocalStore.get(LANGUAGE_KEY)) {
window.history.replaceState({}, document.title, urlForLanguage(language));
}
if (this.citizen) this.onSetCitizen(this.citizen);
if (this.citizen) {
await this.onSetCitizen(this.citizen);
}
if (!this.is_virtual) {
this.setPrevRealAccountLoginid(this.loginid);
}
Expand Down Expand Up @@ -2248,7 +2250,7 @@ export default class ClientStore extends BaseStore {
});
}

onSetCitizen(citizen) {
async onSetCitizen(citizen) {
if (!citizen) return;
WS.setSettings({
set_settings: 1,
Expand Down

1 comment on commit 60ae15c

@vercel
Copy link

@vercel vercel bot commented on 60ae15c Mar 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-app – ./

deriv-app.vercel.app
binary.sx
deriv-app.binary.sx
deriv-app-git-master.binary.sx

Please sign in to comment.