-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WALL] aum / WALL-4029 / fix-CFDs-password-flows (#15122)
* fix: fix issues with CFDs password flows - Fix height of success modal in mobile - Fix the title of the modal screens based on selected account - Added WalletErrorMT5Password screen for investor password error - Tried to fix most errors for MT5, MT5Investor, DerivX password issues * fix: fix more issues with footer * fix: sonar issues * chore: add header back for success popup MT5 * fix: header for mt5 investor password reset error and success
- Loading branch information
Showing
8 changed files
with
107 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/wallets/src/components/WalletsResetMT5Password/WalletsErrorMT5InvestorPassword.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.wallets-error-mt5-investor-password { | ||
padding: 2.4rem 0; | ||
|
||
@include desktop { | ||
max-width: 44rem; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
packages/wallets/src/components/WalletsResetMT5Password/WalletsErrorMT5InvestorPassword.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
import { DerivLightIcDxtradePasswordIcon } from '@deriv/quill-icons'; | ||
import useDevice from '../../hooks/useDevice'; | ||
import { ModalStepWrapper } from '../Base'; | ||
import { WalletsActionScreen } from '../WalletsActionScreen'; | ||
import './WalletsErrorMT5InvestorPassword.scss'; | ||
|
||
type TProps = { | ||
errorMessage: string; | ||
renderButtons?: React.ComponentProps<typeof WalletsActionScreen>['renderButtons']; | ||
title: string; | ||
}; | ||
|
||
const WalletsErrorMT5InvestorPassword: React.FC<TProps> = ({ errorMessage, renderButtons, title }) => { | ||
const { isMobile } = useDevice(); | ||
|
||
return ( | ||
<ModalStepWrapper | ||
renderFooter={isMobile ? renderButtons : undefined} | ||
shouldHideFooter={!isMobile} | ||
title={`Reset ${title} password`} | ||
> | ||
<div className='wallets-error-mt5-investor-password'> | ||
<WalletsActionScreen | ||
description={errorMessage} | ||
icon={<DerivLightIcDxtradePasswordIcon height={100} width={100} />} | ||
renderButtons={!isMobile ? renderButtons : undefined} | ||
/> | ||
</div> | ||
</ModalStepWrapper> | ||
); | ||
}; | ||
|
||
export default WalletsErrorMT5InvestorPassword; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/wallets/src/components/WalletsResetMT5Password/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import WalletsErrorMT5InvestorPassword from './WalletsErrorMT5InvestorPassword'; | ||
import WalletsResetMT5Password from './WalletsResetMT5Password'; | ||
import WalletSuccessResetMT5Password from './WalletSuccessResetMT5Password'; | ||
|
||
export { WalletsResetMT5Password, WalletSuccessResetMT5Password }; | ||
export { WalletsErrorMT5InvestorPassword, WalletsResetMT5Password, WalletSuccessResetMT5Password }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters