diff --git a/CHANGELOG.md b/CHANGELOG.md
index 78968f9de..a0727cde1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
+### Fixed
+- Added displaying the primaryType during Typed data signing ([#17077](https://github.com/MetaMask/metamask-extension/pull/17077))
## [10.23.3]
### Removed
diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json
index 98daf2850..d97c6a2d6 100644
--- a/app/_locales/de/messages.json
+++ b/app/_locales/de/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "Unterschriftsanfrage"
},
- "signatureRequest1": {
- "message": "Nachricht"
- },
"signatureRequestGuidance": {
"message": "Unterschreiben Sie diese Nachricht nur, wenn Sie den Inhalt vollständig verstehen und der anfragenden Seite vertrauen."
},
diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json
index e5efa239f..fb9ba203e 100644
--- a/app/_locales/el/messages.json
+++ b/app/_locales/el/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "Αίτημα Υπογραφής"
},
- "signatureRequest1": {
- "message": "Μήνυμα"
- },
"signatureRequestGuidance": {
"message": "Υπογράψτε αυτό το μήνυμα μόνο εάν κατανοείτε πλήρως το περιεχόμενο και εμπιστεύεστε τον ιστότοπο που το ζητάει."
},
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index eca87bc0a..6ba73447a 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -3358,9 +3358,6 @@
"signatureRequest": {
"message": "Signature request"
},
- "signatureRequest1": {
- "message": "Message"
- },
"signatureRequestGuidance": {
"message": "Only sign this message if you fully understand the content and trust the requesting site."
},
diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json
index 0afeac78c..972b64857 100644
--- a/app/_locales/es/messages.json
+++ b/app/_locales/es/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "Solicitud de firma"
},
- "signatureRequest1": {
- "message": "Mensaje"
- },
"signatureRequestGuidance": {
"message": "Solo firme este mensaje si comprende completamente el contenido y confía en el sitio solicitante."
},
diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json
index ac098591f..9f0e24bdb 100644
--- a/app/_locales/es_419/messages.json
+++ b/app/_locales/es_419/messages.json
@@ -2328,9 +2328,6 @@
"signatureRequest": {
"message": "Solicitud de firma"
},
- "signatureRequest1": {
- "message": "Mensaje"
- },
"signed": {
"message": "Firmado"
},
diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json
index af8872b38..d93151b56 100644
--- a/app/_locales/fr/messages.json
+++ b/app/_locales/fr/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "Demande de Signature"
},
- "signatureRequest1": {
- "message": "Message"
- },
"signatureRequestGuidance": {
"message": "Ne signez ce message que si vous comprenez parfaitement son contenu et si le site demandeur vous inspire confiance."
},
diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json
index e34353e56..e4fb1ef06 100644
--- a/app/_locales/hi/messages.json
+++ b/app/_locales/hi/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "हस्ताक्षर का अनुरोध"
},
- "signatureRequest1": {
- "message": "संदेश"
- },
"signatureRequestGuidance": {
"message": "यदि आप सामग्री को पूरी तरह से समझते हैं और अनुरोध करने वाली साइट पर भरोसा करते हैं तो ही इस संदेश पर हस्ताक्षर करें।"
},
diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json
index af91598fa..23843a9d0 100644
--- a/app/_locales/id/messages.json
+++ b/app/_locales/id/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "Permintaan tanda tangan"
},
- "signatureRequest1": {
- "message": "Pesan"
- },
"signatureRequestGuidance": {
"message": "Tandatangani pesan ini hanya jika Anda benar-benar memahami isinya dan memercayai situs yang memintanya."
},
diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json
index b948236cd..718241c63 100644
--- a/app/_locales/ja/messages.json
+++ b/app/_locales/ja/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "署名の要求"
},
- "signatureRequest1": {
- "message": "メッセージ"
- },
"signatureRequestGuidance": {
"message": "このメッセージの内容を完全に理解し、リクエストしているサイトを信頼する場合にのみ署名してください。"
},
diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json
index a5e714396..4b1ef13c0 100644
--- a/app/_locales/ko/messages.json
+++ b/app/_locales/ko/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "서명 요청"
},
- "signatureRequest1": {
- "message": "메시지"
- },
"signatureRequestGuidance": {
"message": "요청하는 사이트를 신뢰하고 그 내용을 완전히 이해하는 경우에만 이 메시지에 서명하세요."
},
diff --git a/app/_locales/ph/messages.json b/app/_locales/ph/messages.json
index ecc3ddb44..249835b44 100644
--- a/app/_locales/ph/messages.json
+++ b/app/_locales/ph/messages.json
@@ -1544,9 +1544,6 @@
"signatureRequest": {
"message": "Request ng Signature"
},
- "signatureRequest1": {
- "message": "Mensahe"
- },
"signed": {
"message": "Nilagdaan"
},
diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json
index f6183833c..0b81d1ba3 100644
--- a/app/_locales/pt/messages.json
+++ b/app/_locales/pt/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "Pedido de assinatura"
},
- "signatureRequest1": {
- "message": "Mensagem"
- },
"signatureRequestGuidance": {
"message": "Assine essa mensagem apenas se entende integralmente o conteúdo e confia no site solicitante."
},
diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json
index 0aad26bce..7bb632e69 100644
--- a/app/_locales/pt_BR/messages.json
+++ b/app/_locales/pt_BR/messages.json
@@ -2328,9 +2328,6 @@
"signatureRequest": {
"message": "Solicitação de assinatura"
},
- "signatureRequest1": {
- "message": "Mensagem"
- },
"signed": {
"message": "Assinado"
},
diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json
index a177506c9..3a735d4c9 100644
--- a/app/_locales/ru/messages.json
+++ b/app/_locales/ru/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "Запрос подписи"
},
- "signatureRequest1": {
- "message": "Сообщение"
- },
"signatureRequestGuidance": {
"message": "Подписывайте это сообщение только в том случае, если вы полностью понимаете его содержание и доверяете запрашивающему сайту."
},
diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json
index 3a26d0190..9dd80a047 100644
--- a/app/_locales/tl/messages.json
+++ b/app/_locales/tl/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "Request na Paglagda"
},
- "signatureRequest1": {
- "message": "Mensahe"
- },
"signatureRequestGuidance": {
"message": "Pirmahan lamang ang mensaheng ito kung ganap mong nauunawaan ang nilalaman at nagtitiwala sa site na humihiling."
},
diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json
index 8ac0343d2..ff0d517d0 100644
--- a/app/_locales/tr/messages.json
+++ b/app/_locales/tr/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "İmza talebi"
},
- "signatureRequest1": {
- "message": "Mesaj"
- },
"signatureRequestGuidance": {
"message": "Bumesajı sadece içeriği tam olarak anlıyorsanız ve talepte bulunan siteye güveniyorsanız imzalayın."
},
diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json
index 6e075b267..e0e145822 100644
--- a/app/_locales/vi/messages.json
+++ b/app/_locales/vi/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "Yêu cầu chữ ký"
},
- "signatureRequest1": {
- "message": "Thông báo"
- },
"signatureRequestGuidance": {
"message": "Chỉ ký vào thông báo này nếu bạn hoàn toàn hiểu nội dung và tin tưởng trang web yêu cầu."
},
diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json
index 5b66f23ba..4d005135e 100644
--- a/app/_locales/zh_CN/messages.json
+++ b/app/_locales/zh_CN/messages.json
@@ -3349,9 +3349,6 @@
"signatureRequest": {
"message": "签名请求"
},
- "signatureRequest1": {
- "message": "消息"
- },
"signatureRequestGuidance": {
"message": "只有在您完全理解内容并信任请求网站的情况下,才能签署此消息。"
},
diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json
index 9fbf335b1..68d64b56d 100644
--- a/app/_locales/zh_TW/messages.json
+++ b/app/_locales/zh_TW/messages.json
@@ -1436,9 +1436,6 @@
"signatureRequest": {
"message": "請求簽署"
},
- "signatureRequest1": {
- "message": "訊息"
- },
"signed": {
"message": "已簽署"
},
diff --git a/ui/components/app/signature-request/signature-request-message/signature-request-message.js b/ui/components/app/signature-request/signature-request-message/signature-request-message.js
index e86dfba3d..11d7f841a 100644
--- a/ui/components/app/signature-request/signature-request-message/signature-request-message.js
+++ b/ui/components/app/signature-request/signature-request-message/signature-request-message.js
@@ -21,6 +21,7 @@ export default function SignatureRequestMessage({
setMessageRootRef,
messageRootRef,
messageIsScrollable,
+ primaryType,
}) {
const t = useContext(I18nContext);
const [messageIsScrolled, setMessageIsScrolled] = useState(false);
@@ -81,7 +82,7 @@ export default function SignatureRequestMessage({
marginLeft={4}
className="signature-request-message__title"
>
- {t('signatureRequest1')}
+ {primaryType}
@@ -95,4 +96,5 @@ SignatureRequestMessage.propTypes = {
setMessageRootRef: PropTypes.func,
messageRootRef: PropTypes.object,
messageIsScrollable: PropTypes.bool,
+ primaryType: PropTypes.string,
};
diff --git a/ui/components/app/signature-request/signature-request.component.js b/ui/components/app/signature-request/signature-request.component.js
index a55e595ba..4fb357625 100644
--- a/ui/components/app/signature-request/signature-request.component.js
+++ b/ui/components/app/signature-request/signature-request.component.js
@@ -111,7 +111,7 @@ export default class SignatureRequest extends PureComponent {
memoizedParseMessage = memoize((data) => {
const { message, domain = {}, primaryType, types } = JSON.parse(data);
const sanitizedMessage = sanitizeMessage(message, primaryType, types);
- return { sanitizedMessage, domain };
+ return { sanitizedMessage, domain, primaryType };
});
render() {
@@ -134,7 +134,8 @@ export default class SignatureRequest extends PureComponent {
nativeCurrency,
} = this.props;
const { trackEvent } = this.context;
- const { sanitizedMessage, domain } = this.memoizedParseMessage(data);
+ const { sanitizedMessage, domain, primaryType } =
+ this.memoizedParseMessage(data);
const currentNetwork = this.getNetworkName();
@@ -248,6 +249,7 @@ export default class SignatureRequest extends PureComponent {
setMessageRootRef={this.setMessageRootRef.bind(this)}
messageRootRef={this.messageRootRef}
messageIsScrollable={messageIsScrollable}
+ primaryType={primaryType}
/>