Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WALL] Aizad/WALL-3036/Create/Add MT5 account modal issues #12183

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,19 @@ const WalletPasswordField: React.FC<WalletPasswordFieldProps> = ({
const handleChange = useCallback(
(e: React.ChangeEvent<HTMLInputElement>) => {
onChange?.(e);
setIsTouched(true);
if (!isTouched) {
setIsTouched(true);
}
},
[onChange]
[isTouched, onChange]
);

const handleBlur = useCallback(() => {
if (!isTouched) {
setIsTouched(true);
}
}, [isTouched]);

return (
<div className='wallets-password'>
<WalletTextField
Expand All @@ -43,6 +51,7 @@ const WalletPasswordField: React.FC<WalletPasswordFieldProps> = ({
message={isTouched ? errorMessage : ''}
messageVariant='warning'
name={name}
onBlur={handleBlur}
onChange={handleChange}
renderRightIcon={() => (
<PasswordViewerIcon setViewPassword={setIsPasswordVisible} viewPassword={isPasswordVisible} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ const DxtradeEnterPasswordModal = () => {

const successDescription = useMemo(() => {
return accountType === 'demo'
? "Let's practise trading with 10,000 USD virtual funds."
? `Let's practise trading with ${activeWallet?.display_balance} virtual funds.`
aizad-deriv marked this conversation as resolved.
Show resolved Hide resolved
: `Transfer funds from your ${activeWallet?.currency} Wallet to your ${PlatformDetails.dxtrade.title} account to start trading.`;
}, [accountType, activeWallet?.currency]);
}, [accountType, activeWallet?.currency, activeWallet?.display_balance]);

const dxtradeBalance = useMemo(() => {
return dxtradeAccount?.find(account => account.market_type === 'all')?.display_balance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
border-radius: 0.8rem;
background: var(--system-light-8-primary-background, #fff);

&__text {
display: flex;
flex-direction: column;
justify-content: center;
gap: 0.8rem;

@include mobile {
gap: 2.4rem;
}
}

@include mobile {
width: 100%;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ const CreatePassword: React.FC<TProps> = ({
return (
<div className='wallets-create-password'>
{!isMobile && icon}
<WalletText lineHeight='xl' weight='bold'>
Create a {title} password
</WalletText>
<WalletText align='center' size='sm'>
You can use this password for all your {title} accounts.
</WalletText>
<div className='wallets-create-password__text'>
<WalletText align='center' lineHeight='xl' weight='bold'>
Create a {title} password
</WalletText>
<WalletText align='center' size='sm'>
You can use this password for all your {title} accounts.
</WalletText>
</div>

<WalletPasswordField label={`${title} password`} onChange={onPasswordChange} password={password} />
{!isMobile && (
Expand Down