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

[P2PS] / Ameerul / P2PS-2084 Improvise Deriv P2P Available Balance Information #12924

Merged
Show file tree
Hide file tree
Changes from all 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 @@ -29,7 +29,15 @@ describe('<MyProfileBalanceModal />', () => {
it('should render MyProfileBalanceModal', () => {
render(<MyProfileBalanceModal />);

expect(screen.getByText('Deriv P2P Balance')).toBeInTheDocument();
expect(screen.getByText('Available Deriv P2P Balance')).toBeInTheDocument();
expect(
screen.getByText('Your Deriv P2P balance only includes deposits that can’t be reversed.')
).toBeInTheDocument();
expect(
screen.getByText(
'Deposits via cards and the following payment methods aren’t included: Maestro, Diners Club, ZingPay, Skrill, Neteller, Ozow, and UPI QR.'
)
).toBeInTheDocument();
});

it('should call hideModal when clicking on the OK button', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
@include mobile {
padding: 0 1.6rem;
}

&-text {
margin-bottom: 1.6rem;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Button, Modal } from '@deriv/components';
import { Button, Modal, Text } from '@deriv/components';
import { useModalManagerContext } from 'Components/modal-manager/modal-manager-context';
import { Localize, localize } from 'Components/i18next';

Expand All @@ -12,10 +12,15 @@ const MyProfileBalanceModal = () => {
has_close_icon={false}
is_open={is_modal_open}
small
title={localize('Deriv P2P Balance')}
title={localize('Available Deriv P2P Balance')}
>
<Modal.Body className='my-profile-balance-modal__body'>
<Localize i18n_default_text='Deriv P2P balance = deposits that can’t be reversed' />
<Text as='div' className='my-profile-balance-modal__body-text' size='xs'>
<Localize i18n_default_text='Your Deriv P2P balance only includes deposits that can’t be reversed.' />
</Text>
<Text size='xs'>
<Localize i18n_default_text='Deposits via cards and the following payment methods aren’t included: Maestro, Diners Club, ZingPay, Skrill, Neteller, Ozow, and UPI QR.' />
</Text>
</Modal.Body>
<Modal.Footer>
<Button has_effect text={localize('OK')} onClick={hideModal} primary large />
Expand Down