Skip to content

Commit

Permalink
fix: copy changes in re-designed SIWE signature pages (#25381)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpuri committed Jun 19, 2024
1 parent b0f57cf commit 2115516
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
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')}
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

0 comments on commit 2115516

Please sign in to comment.