Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronfigueiredo committed Dec 11, 2024
1 parent dcc4d4c commit 286dd74
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Text } from '../../../../../components/component-library';
import { ButtonLink, Text } from '../../../../../components/component-library';
import {
TextColor,
TextVariant,
Expand All @@ -17,16 +17,15 @@ export const PendingTransactionAlertMessage = () => {
data-testid="alert-modal__selected-alert"
>
{t('pendingTransactionAlertMessage', [
<Text color={TextColor.primaryDefault}>
<a
href={ZENDESK_URLS.SPEEDUP_CANCEL}
key="link"
target="_blank"
rel="noreferrer noopener"
>
{t('pendingTransactionAlertMessageHyperlink')}
</a>
</Text>,
<ButtonLink
href={ZENDESK_URLS.SPEEDUP_CANCEL}
key="link"
target="_blank"
rel="noreferrer noopener"
color={TextColor.primaryDefault}
>
{t('pendingTransactionAlertMessageHyperlink')}
</ButtonLink>,
])}
</Text>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ describe('usePendingTransactionAlerts', () => {
jest.resetAllMocks();

(useParams as jest.Mock).mockReturnValue({ id: 'mock-transaction-id' });

useSelectorMock.mockImplementation((selector) => {
if (selector.toString().includes('pendingApprovalsSortedSelector')) {
return [];
}
return undefined;
});
});

it('returns no alerts if no confirmation', () => {
Expand Down Expand Up @@ -155,6 +162,10 @@ describe('usePendingTransactionAlerts', () => {
return true;
} else if (selector.toString().includes('getUnapprovedTransaction')) {
return { type: TransactionType.contractInteraction };
} else if (
selector.toString().includes('pendingApprovalsSortedSelector')
) {
return [];
}
return undefined;
});
Expand Down

0 comments on commit 286dd74

Please sign in to comment.