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

fix: copy changes in re-designed SIWE signature pages #25381

Merged
merged 5 commits into from
Jun 19, 2024
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
8 changes: 7 additions & 1 deletion app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const PersonalSignInfo: React.FC = () => {
alertKey="requestFrom"
ownerId={currentConfirmation.id}
label={t('requestFrom')}
tooltip={t('requestFromInfo')}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: we will want to include these nuances in our upcoming tests #24679

tooltip={isSIWE ? undefined : t('requestFromInfo')}
>
<ConfirmInfoRowUrl url={currentConfirmation.msgParams.origin} />
</AlertRow>
Expand Down
11 changes: 10 additions & 1 deletion ui/pages/confirmations/components/confirm/title/title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import useAlerts from '../../../../../hooks/useAlerts';
import { getHighestSeverity } from '../../../../../components/app/alert-system/utils';
import GeneralAlert from '../../../../../components/app/alert-system/general-alert/general-alert';
import { Confirmation, SignatureRequestType } from '../../../types/confirm';
import { isPermitSignatureRequest } from '../../../utils';
import {
isPermitSignatureRequest,
isSIWESignatureRequest,
} from '../../../utils';

function ConfirmBannerAlert({ ownerId }: { ownerId: string }) {
const t = useI18nContext();
Expand Down Expand Up @@ -57,6 +60,9 @@ const getTitle = (t: IntlFunction, confirmation?: Confirmation) => {
case TransactionType.contractInteraction:
return t('confirmTitleTransaction');
case TransactionType.personalSign:
if (isSIWESignatureRequest(confirmation as SignatureRequestType)) {
return t('confirmTitleSIWESignature');
}
return t('confirmTitleSignature');
case TransactionType.signTypedData:
return isPermitSignatureRequest(confirmation as SignatureRequestType)
Expand All @@ -72,6 +78,9 @@ const getDescription = (t: IntlFunction, confirmation?: Confirmation) => {
case TransactionType.contractInteraction:
return t('confirmTitleDescContractInteractionTransaction');
case TransactionType.personalSign:
if (isSIWESignatureRequest(confirmation as SignatureRequestType)) {
return t('confirmTitleDescSIWESignature');
}
return t('confirmTitleDescSignature');
case TransactionType.signTypedData:
return isPermitSignatureRequest(confirmation as SignatureRequestType)
Expand Down