Skip to content

Commit

Permalink
carol/ P2P: Remove confirm modal (binary-com#6430)
Browse files Browse the repository at this point in the history
* remove extra modal from 2FA flow

* hide reasons
  • Loading branch information
carolsachdeva authored and adrienne-deriv committed Oct 7, 2022
1 parent c61e43b commit 7ca2748
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ const EmailVerificationModal = ({
</Modal.Body>
{should_show_resend_email_button && should_show_reasons_if_no_email && (
<Modal.Footer className='email-verification-modal--footer'>
<Button large primary onClick={onClickResendEmailButton}>
<Button
large
primary
onClick={() => {
onClickResendEmailButton();
setShouldShowReasonsIfNoEmail(false);
}}
>
<Localize i18n_default_text='Resend email' />
{/* TODO: Uncomment when time is available in BE response
<Localize i18n_default_text='Resend email {{remaining_time}}' values={{ remaining_time }} /> */}
Expand Down
18 changes: 8 additions & 10 deletions packages/p2p/src/components/order-details/order-details-footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import OrderDetailsConfirmModal from './order-details-confirm-modal.jsx';
const OrderDetailsFooter = observer(() => {
const { order_store } = useStores();
const {
// id,
id,
is_buy_order_for_user,
should_show_cancel_and_paid_button,
should_show_complain_and_received_button,
Expand Down Expand Up @@ -42,15 +42,13 @@ const OrderDetailsFooter = observer(() => {
const showComplainOrderModal = () => setShouldShowComplainModal(true);

const hideConfirmOrderModal = () => setShouldShowConfirmModal(false);
const showConfirmOrderModal = () => setShouldShowConfirmModal(true);
// TODO: Uncomment this when we're ready to remove the modal
// const showConfirmOrderModal = () => {
// if (is_buy_order_for_user) {
// setShouldShowConfirmModal(true);
// } else {
// order_store.confirmOrderRequest(id);
// }
// };
const showConfirmOrderModal = () => {
if (is_buy_order_for_user) {
setShouldShowConfirmModal(true);
} else {
order_store.confirmOrderRequest(id);
}
};

if (should_show_cancel_and_paid_button) {
return (
Expand Down

0 comments on commit 7ca2748

Please sign in to comment.