Skip to content

Commit

Permalink
[WALL] Lubega / WALL-4162 / Account creation success message fix (der…
Browse files Browse the repository at this point in the history
…iv-com#15347)

* fix: account creation success message fix

* fix: applied comments
  • Loading branch information
lubega-deriv authored May 24, 2024
1 parent 89db9ec commit c446c6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.wallets-gradient {
position: relative;
display: inline-block;
border-radius: 0.8rem;

&__content {
position: relative;
Expand Down Expand Up @@ -28,9 +29,9 @@
}
}

&[class*='desktop-card'],
&[class*='mobile-card'] {
border-radius: 0.8rem;
&[class*='desktop-header'],
&[class*='mobile-header'] {
border-radius: unset;
}

&--USD {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
useTradingPlatformPasswordChange,
useVerifyEmail,
} from '@deriv/api-v2';
import { SentEmailContent, WalletError, WalletSuccessResetMT5Password } from '../../../../components';
import { SentEmailContent, WalletError } from '../../../../components';
import { ModalStepWrapper, ModalWrapper, WalletButton } from '../../../../components/Base';
import { useModal } from '../../../../components/ModalProvider';
import useDevice from '../../../../hooks/useDevice';
Expand Down Expand Up @@ -43,7 +43,6 @@ const MT5PasswordModal: React.FC<TProps> = ({ marketType, platform }) => {
const {
error: tradingPasswordChangeError,
isLoading: tradingPlatformPasswordChangeLoading,
isSuccess: tradingPasswordChangeSuccess,
mutateAsync: tradingPasswordChangeMutateAsync,
} = useTradingPlatformPasswordChange();
const { data: accountStatusData } = useAccountStatus();
Expand All @@ -56,7 +55,7 @@ const MT5PasswordModal: React.FC<TProps> = ({ marketType, platform }) => {
} = useVerifyEmail();
const { data: mt5AccountsData } = useMT5AccountsList();
const { isMobile } = useDevice();
const { getModalState, hide, show } = useModal();
const { getModalState, hide } = useModal();
const { data: settingsData } = useSettings();

const { email } = settingsData;
Expand Down Expand Up @@ -286,20 +285,6 @@ const MT5PasswordModal: React.FC<TProps> = ({ marketType, platform }) => {
);
}

if (tradingPasswordChangeSuccess) {
return (
<WalletSuccessResetMT5Password
onClickSuccess={async () => {
await onSubmit();
show(
<MT5AccountAdded account={createMT5AccountData} marketType={marketType} platform={platform} />
);
}}
title={mt5Title}
/>
);
}

if (createMT5AccountSuccess && !isMT5PasswordNotSet) {
return <MT5AccountAdded account={createMT5AccountData} marketType={marketType} platform={platform} />;
}
Expand Down

0 comments on commit c446c6c

Please sign in to comment.