Skip to content

Commit

Permalink
Revert "fix: 🐛 fetches latest personal details every time intead of c…
Browse files Browse the repository at this point in the history
…ached value (#8002)" (#8022)

This reverts commit ff497c1.
  • Loading branch information
vinu-deriv committed Mar 24, 2023
1 parent 8f55ecb commit 6073091
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ export const PersonalDetailsForm = ({
updateAccountStatus,
has_poa_address_mismatch,
is_language_changing,
fetchAccountSettings,
}) => {
const [is_loading, setIsLoading] = React.useState(true);

Expand Down Expand Up @@ -172,7 +171,6 @@ export const PersonalDetailsForm = ({
getSettings();
}
initializeFormValues();
return () => fetchAccountSettings();
}, [account_settings, is_eu, is_mf, is_social_signup]);

React.useEffect(() => {
Expand Down Expand Up @@ -1359,7 +1357,6 @@ PersonalDetailsForm.propTypes = {
updateAccountStatus: PropTypes.func,
has_poa_address_mismatch: PropTypes.bool,
is_language_changing: PropTypes.bool,
fetchAccountSettings: PropTypes.func,
};

export default connect(({ client, notifications, ui, common }) => ({
Expand All @@ -1385,5 +1382,4 @@ export default connect(({ client, notifications, ui, common }) => ({
updateAccountStatus: client.updateAccountStatus,
has_poa_address_mismatch: client.account_status.status?.includes('poa_address_mismatch'),
is_language_changing: common.is_language_changing,
fetchAccountSettings: client.fetchAccountSettings,
}))(withRouter(PersonalDetailsForm));
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 @@ -2327,7 +2327,7 @@ export default class ClientStore extends BaseStore {

fetchAccountSettings() {
return new Promise(resolve => {
WS.authorized.getSettings().then(response => {
WS.authorized.storage.getSettings().then(response => {
this.setAccountSettings(response.get_settings);
resolve(response);
});
Expand Down

1 comment on commit 6073091

@vercel
Copy link

@vercel vercel bot commented on 6073091 Mar 24, 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.