Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3406042
D11634.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11634.diff
View Options
diff --git a/lib/utils/siwe-utils.js b/lib/utils/siwe-utils.js
--- a/lib/utils/siwe-utils.js
+++ b/lib/utils/siwe-utils.js
@@ -115,6 +115,33 @@
`This signature will attest that your Ethereum ` +
`identity is represented by your new Comm identity.`;
+const siweMessageSigningButtonStatement = 'Sign in using this wallet';
+
+const siweBackupMessageSigningExplanationStatements: string =
+ `Your signature on this message will be used to derive ` +
+ `a secret key that will encrypt your Comm backup.`;
+
+const siweBackupMessageSigningButtonStatement = 'Create a backup key';
+
+const userTextsForSIWEMessageTypes: {
+ +[signatureRequestType: string]: {
+ +explanationStatement: string,
+ +showTermsAgreement: boolean,
+ +buttonStatement: string,
+ },
+} = {
+ [SIWEMessageTypes.MSG_AUTH]: {
+ explanationStatement: siweMessageSigningExplanationStatements,
+ showTermsAgreement: true,
+ buttonStatement: siweMessageSigningButtonStatement,
+ },
+ [SIWEMessageTypes.MSG_BACKUP]: {
+ explanationStatement: siweBackupMessageSigningExplanationStatements,
+ showTermsAgreement: false,
+ buttonStatement: siweBackupMessageSigningButtonStatement,
+ },
+};
+
export {
isValidSIWENonce,
isValidEthereumAddress,
@@ -127,4 +154,8 @@
isValidSIWEStatementWithPublicKey,
getPublicKeyFromSIWEStatement,
siweMessageSigningExplanationStatements,
+ siweBackupMessageSigningExplanationStatements,
+ siweBackupMessageSigningButtonStatement,
+ siweMessageSigningButtonStatement,
+ userTextsForSIWEMessageTypes,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 5, 12:24 AM (13 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2615262
Default Alt Text
D11634.diff (1 KB)
Attached To
Mode
D11634: Introduce user texts for siwe backup message creation
Attached
Detach File
Event Timeline
Log In to Comment