Skip to content

Commit

Permalink
Shaheer/wall 1469 hotfix (deriv-com#9617)
Browse files Browse the repository at this point in the history
* fix: 🔥 corrects useVerify hook usage, prevents click events from being passed as param

* refactor: 🎨 fixes caps in text
  • Loading branch information
shaheer-deriv authored Aug 8, 2023
1 parent 547a759 commit 7f8bd77
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const EmailVerificationEmptyState = ({ type }: TEmailVerificationEmptyStateProps

const action = {
label: localize("Didn't receive the email?"),
onClick: verify.send,
onClick: () => verify.send(),
tertiary: true,
};

Expand All @@ -30,7 +30,7 @@ const EmailVerificationEmptyState = ({ type }: TEmailVerificationEmptyStateProps
<EmailVerificationResendEmptyState
is_counter_running={verify.is_counter_running}
counter={verify.counter}
resend={verify.send}
resend={() => verify.send()}
/>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const WithdrawalVerificationEmail = observer(() => {
}
action={{
label: localize('Send email'),
onClick: verify.send,
onClick: () => verify.send(),
}}
/>
<MobileWrapper>{isCryptocurrency(client.currency) && <RecentTransaction />}</MobileWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('LinkExpiredModal', () => {
</APIProvider>
),
});
expect(screen.queryByText('Link Expired')).toBeInTheDocument();
expect(screen.queryByText('Link expired')).toBeInTheDocument();
});

it('should not render the component when is_link_expired_modal_visible is false', () => {
Expand All @@ -39,7 +39,7 @@ describe('LinkExpiredModal', () => {
</APIProvider>
),
});
expect(screen.queryByText('Link Expired')).not.toBeInTheDocument();
expect(screen.queryByText('Link expired')).not.toBeInTheDocument();
});

it('should not render the component close and resend email buttons', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const LinkExpiredModal = observer(() => {
is_visible={is_visible}
disableApp={disableApp}
enableApp={enableApp}
title={is_email_sent ? '' : localize('Link Expired')}
title={is_email_sent ? '' : localize('Link expired')}
has_close_icon
onConfirm={() => toggleLinkExpiredModal(false)}
>
Expand Down

0 comments on commit 7f8bd77

Please sign in to comment.