Skip to content

Commit

Permalink
Revert "[WALL] Lubega / WALL-5064 / MT5PasswordModal unit test (deriv…
Browse files Browse the repository at this point in the history
…-com#17320)" (deriv-com#17366)

This reverts commit 071e190.
  • Loading branch information
nijil-deriv authored Oct 30, 2024
1 parent 082db10 commit d8cd112
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 697 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { platformPasswordResetRedirectLink } from '../../../../utils/cfd';
import { validPassword, validPasswordMT5 } from '../../../../utils/password-validation';
import { CFD_PLATFORMS, JURISDICTION, MARKET_TYPE, PlatformDetails, PRODUCT } from '../../constants';
import { CreatePassword, CreatePasswordMT5, EnterPassword, MT5ResetPasswordModal } from '../../screens';
import { MT5AccountAdded } from '../MT5AccountAdded';
import MT5AccountAdded from '../MT5AccountAdded/MT5AccountAdded';
import { PasswordLimitExceededModal } from '../PasswordLimitExceededModal';
import { MT5PasswordModalFooter, SuccessModalFooter } from './MT5PasswordModalFooters';
import './MT5PasswordModal.scss';
Expand Down Expand Up @@ -63,16 +63,7 @@ const MT5PasswordModal: React.FC<TProps> = ({ isVirtual, marketType, platform, p
const { data: settingsData } = useSettings();
const { localize } = useTranslations();

const {
address_city: addressCity,
address_line_1: addressLine1,
address_postcode: addressPostcode,
address_state: addressState,
country_code: countryCode,
email,
first_name: firstName,
phone,
} = settingsData;
const { email } = settingsData;

const [password, setPassword] = useState('');

Expand Down Expand Up @@ -107,10 +98,10 @@ const MT5PasswordModal: React.FC<TProps> = ({ isVirtual, marketType, platform, p
createMT5AccountMutate({
payload: {
account_type: categoryAccountType,
address: addressLine1 ?? '',
city: addressCity ?? '',
country: countryCode ?? '',
email: email ?? '',
address: settingsData?.address_line_1 ?? '',
city: settingsData?.address_city ?? '',
country: settingsData?.country_code ?? '',
email: settingsData?.email ?? '',
leverage: availableMT5AccountsData?.find(acc => acc.market_type === marketType)?.leverage ?? 500,
mainPassword: password,
...(selectedJurisdiction && !isDemo ? { company: selectedJurisdiction } : {}),
Expand All @@ -128,10 +119,10 @@ const MT5PasswordModal: React.FC<TProps> = ({ isVirtual, marketType, platform, p
mt5_account_type: 'financial_stp',
})),
...(marketType === MARKET_TYPE.ALL && { product }),
name: firstName ?? '',
phone: phone ?? '',
state: addressState ?? '',
zipCode: addressPostcode ?? '',
name: settingsData?.first_name ?? '',
phone: settingsData?.phone ?? '',
state: settingsData?.address_state ?? '',
zipCode: settingsData?.address_postcode ?? '',
},
});
}, [
Expand All @@ -142,14 +133,14 @@ const MT5PasswordModal: React.FC<TProps> = ({ isVirtual, marketType, platform, p
marketType,
mt5Platform,
password,
addressCity,
addressLine1,
addressPostcode,
addressState,
countryCode,
email,
firstName,
phone,
settingsData?.address_city,
settingsData?.address_line_1,
settingsData?.address_postcode,
settingsData?.address_state,
settingsData?.country_code,
settingsData?.email,
settingsData?.first_name,
settingsData?.phone,
tradingPasswordChangeMutateAsync,
selectedJurisdiction,
product,
Expand Down
Loading

0 comments on commit d8cd112

Please sign in to comment.