Skip to content

feat(ui): Whitelabelling of terms of use and privacy policy #1193

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

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
17 changes: 16 additions & 1 deletion src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { initReactI18next } from "react-i18next";
import Languagedetector from "i18next-browser-languagedetector";
import en from "./locales/en/en.json";
import common from "./locales/en/custom.json";
import termsofuse from "./locales/en/termsofuse.json";
import privacypolicy from "./locales/en/privacypolicy.json";
import aboutssiagentcreate from "./locales/en/aboutssiagentcreate.json";
import aboutssiagentrecovery from "./locales/en/aboutssiagentrecovery.json";

i18n
.use(initReactI18next)
Expand All @@ -12,11 +16,22 @@ i18n
en: {
translation: en,
common: common,
termsofuse: termsofuse,
privacypolicy: privacypolicy,
aboutssiagentcreate: aboutssiagentcreate,
aboutssiagentrecovery: aboutssiagentrecovery,
},
},
lng: "en",
fallbackLng: "en",
ns: ["translation, common"],
ns: [
"translation",
"common",
"termsofuse",
"privacypolicy",
"aboutssiagentcreate",
"aboutssiagentrecovery",
],
defaultNS: "translation",
interpolation: {
escapeValue: false,
Expand Down
24 changes: 24 additions & 0 deletions src/locales/en/aboutssiagentcreate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"aboutssiagentcreate": {
"done": "Done",
"intro": {
"title": "About SSI agent",
"text": ""
},
"sections": [
{
"title": "",
"content": [
{
"subtitle": "",
"text": "The Veridian Wallet requires connecting to a Cloud Agent, securely controlled by the keys on your mobile device."
},
{
"subtitle": "",
"text": "As part of the Veridian Wallet onboarding process a Boot URL and a Connect URL must be provided to establish the secure connection between the edge and the cloud."
}
]
}
]
}
}
24 changes: 24 additions & 0 deletions src/locales/en/aboutssiagentrecovery.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"aboutssiagentrecovery": {
"done": "Done",
"intro": {
"title": "About SSI agent",
"text": ""
},
"sections": [
{
"title": "",
"content": [
{
"subtitle": "",
"text": "Recovering your Veridian Wallet requires re-establishing an existing connection to your Cloud Agent using the Connect URL."
},
{
"subtitle": "",
"text": "Upon successful reconnecting the Veridian Wallet will begin re-syncing with the cloud agent to complete recovery of identifiers and credentials."
}
]
}
]
}
}
420 changes: 0 additions & 420 deletions src/locales/en/en.json

Large diffs are not rendered by default.

204 changes: 204 additions & 0 deletions src/locales/en/privacypolicy.json

Large diffs are not rendered by default.

176 changes: 176 additions & 0 deletions src/locales/en/termsofuse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
{
"termsofuse": {
"done": "Done",
"intro": {
"title": "Terms of Use",
"text": "These Terms of Use set forth the legally binding terms and conditions for your use of the Veridian wallet (“Veridian”). Veridian is a decentralized identity management application developed by the Cardano Foundation (Cardano Stiftung) (the “Foundation”), which enables you to generate, manage, and control your digital identity through cryptographic keys and verifiable credentials using the Key Event Receipt Infrastructure (KERI) protocol.\n\nPlease read these Terms carefully. By accessing or using Veridian, you agree to be bound by these Terms, including any additional guidelines or rules referenced herein. If you do not agree to these Terms, please do not use Veridian."
},
"sections": [
{
"content": [
{
"subtitle": "1. Eligibility",
"text": "By using Veridian, you represent and warrant that you are of legal age to form a binding contract in your jurisdiction, and have not previously been suspended or removed from using Veridian. If you are using Veridian on behalf of a legal entity, you further represent and warrant that (i) the entity is duly organized under applicable laws, and (ii) you are duly authorized to act on its behalf."
}
]
},
{
"content": [
{
"subtitle": "2. Licence and Use",
"text": ""
},
{
"subtitle": "2.1. Licence Grant",
"text": "The Cardano Foundation grants you a limited, non-exclusive, non-transferable licence to access and use Veridian for your digital identity management purposes, subject to these terms."
},
{
"subtitle": "2.2. Restrictions on Use",
"text": "You agree not to:",
"nested": [
"Modify, distribute, or create derivative works based on Veridian.",
"Compromise the security or integrity of the Wallet or its underlying systems.",
"Use Veridian for any unlawful or unauthorised purpose."
]
}
]
},
{
"content": [
{
"subtitle": "3. User Responsibilities",
"text": "You are responsible for:"
},
{
"subtitle": "3.1. Security of Digital Identity",
"text": "Maintaining the security and confidentiality of your passwords, cryptographic keys, digital identity (AID), and any credentials generated or stored in Veridian. Loss or compromise of this information may result in irrecoverable loss of access to your digital identity."
},
{
"subtitle": "3.2. Associated information, Credentials",
"text": "The accuracy and maintenance of any optional information you choose to bind or associate with your digital identity."
},
{
"subtitle": "3.3. Compliance with Laws",
"text": "Compliance with all applicable laws and regulations when using Veridian."
}
]
},
{
"content": [
{
"subtitle": "4. Intellectual property",
"text": "All intellectual property rights in and to Veridian, including its design, features, and underlying technology, are owned by the Cardano Foundation or its licensors. Nothing in these Terms grants you any right or license to use any trademark, logo, or service mark displayed in Veridian without the prior written consent of the Cardano Foundation."
}
]
},
{
"content": [
{
"subtitle": "5. Third Party Services",
"text": "Veridian may interface with third-party services (such as cloud agents or blockchain networks) to provide its functionality. The Cardano Foundation is not responsible for the performance or reliability of these third-party services, and your use of such services is governed by their respective terms and policies."
}
]
},
{
"content": [
{
"subtitle": "6. Disclaimers and Limitation of Liability",
"text": ""
},
{
"subtitle": "6.1. Disclaimer of Warranties",
"text": "Veridian is provided on an “as is” and “as available” basis without warranties of any kind, either express or implied. The Foundation makes no representations and expressly disclaims all warranties about the suitability, merchantability, fitness for purpose, reliability, availability, timeliness, security, title and non-infringement, accuracy or completeness, data synched to or made available from the products, product content, or any consulting services we provide for any associated purpose."
},
{
"subtitle": "6.2. No Indirect Damages",
"text": "To the fullest extent permitted by law, the Foundation shall not be liable for any indirect, incidental, consequential, punitive, or special damages (including loss of profits, revenue, or data) arising out of your use of Veridian."
},
{
"subtitle": "6.3. Limitation of Liability",
"text": "The aggregate liability of the Foundation, whether in contract, tort, or otherwise, is limited to the maximum extent permitted by applicable law. In any event, if fees have been paid for use of Veridian, our total liability shall not exceed the total amounts paid in the twelve months preceding the claim. If no fees are payable, our liability will be limited to one hundred US Dollars."
}
]
},
{
"content": [
{
"subtitle": "7. Indemnification",
"text": "You agree to fully indemnify, defend and hold the Foundation Entities, including their directors, officers, employees, consultants, and other representatives, harmless from and against any claims, damages, losses, costs (including reasonable legal fees), and other expenses resulting directly or indirectly from: (a) any breach or noncompliance of these Terms of Use by you or your affiliates, inclusive of policies mentioned herein; (b) allegations that materials you provide or convey to the Products violate the intellectual property rights of a third party; (c) your or your affiliates' use of Third-Party Products; and/or (d) any negligent or intentional misconduct by you. You shall not agree to any settlement that (i) obligates Us in any manner; (ii) demands an admission from Us; or (iii) assigns liability beyond these indemnifications or restricts Us, without obtaining Our prior written approval."
}
]
},
{
"content": [
{
"subtitle": "8. General Provisions",
"text": ""
},
{
"subtitle": "8.1. Service Changes",
"text": "We reserve the right to modify, update, limit, or revoke your access to Veridian at any time, for any reason, without prior notice, at our sole discretion."
},
{
"subtitle": "8.2. Privacy Policy",
"text": "By using Veridian, you acknowledge that our <0>{{PrivacyPolicy}}</0> applies to you, and your continued use constitutes acceptance of the <0>{{PrivacyPolicy}}</0>."
},
{
"subtitle": "8.3. Feedback",
"text": "We welcome your feedback and suggestions regarding Veridian, and you can provide your thoughts at <1>{{VeridianSupport}}</1>. By providing feedback, you grant us permission to use, share, and build upon your input without any obligation or compensation to you."
},
{
"subtitle": "8.4. Amendments",
"text": "We may modify these Terms at any time. The revised version will become effective on the next business day after posting. Your continued use of Veridian constitutes your acceptance of the modified Terms. If you do not agree with any changes, you must notify us in writing within thirty (30) days of notice."
},
{
"subtitle": "8.5. Assignment",
"text": "You may not assign, transfer, or sublicense your rights or obligations under these Terms without our prior written consent. We may assign or transfer our rights at our discretion."
},
{
"subtitle": "8.6. Waiver and Severability",
"text": "Our failure to enforce any provision of these Terms shall not constitute a waiver of that provision. If any provision is found to be invalid or unenforceable, the remaining provisions shall continue in full force and effect."
},
{
"subtitle": "8.7. Application Provider Terms",
"text": "These Terms of Use are between you and the Foundation only, and not with an application service or application platform provider (such as Apple, Inc., or Google Inc.), which may provide you the Veridian wallet application subject to their own terms of use."
},
{
"subtitle": "8.8. Entire Agreement",
"text": "These Terms constitute the entire agreement between you and the Cardano Foundation regarding your use of Veridian and supersede all prior communications, agreements, and understandings."
},
{
"subtitle": "8.9. Disputes",
"text": "If you have a dispute with the Foundation or a claim to raise in relation to Veridian, you agree to contact us using the form at <1>{{VeridianSupport}}</1> to attempt to resolve the issue informally first."
},
{
"subtitle": "8.10. Survival",
"text": "The provisions relating to disclaimers, limitations of liability, indemnification, governing law, and any other provisions intended to survive termination shall continue to apply after termination of your use of Veridian."
}
]
},
{
"content": [
{
"subtitle": "9. Governing Law and Jurisdiction",
"text": ""
},
{
"subtitle": "9.1. Governing Law",
"text": "These Terms shall be governed by and construed in accordance with the laws of Switzerland."
},
{
"subtitle": "9.2. Jurisdiction",
"text": "Any disputes arising out of or in connection with these Terms that are not resolved through informal dispute resolution set forth in section 8.9 shall be subject to the exclusive jurisdiction of the courts located in Zug, Switzerland."
}
]
},
{
"content": [
{
"subtitle": "10. Contact us",
"text": "If you have any questions, concerns, or feedback regarding these Terms, please contact us at:\n\nCardano Foundation,\nDammstrasse 16,\n6300, Zug,\nSwitzerland\nAttn: Legal"
}
]
}
]
}
}
15 changes: 10 additions & 5 deletions src/ui/components/TermsModal/TermsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ const Section = ({ title, content, componentId, altIsOpen }: TermsSection) => {
data-testid="support-link-handler"
onClick={() => openBrowserLink(FEDERAL_DATA_PROTECTION_LINK)}
>
{i18n.t("privacypolicy.link.federaldataprotection")}
{i18n.t("privacypolicy.link.federaldataprotection", {
ns: "privacypolicy",
})}
</u>
);
};
Expand All @@ -60,7 +62,7 @@ const Section = ({ title, content, componentId, altIsOpen }: TermsSection) => {
data-testid="support-link-handler"
onClick={() => openBrowserLink(DATA_PROTECTION_AUTHORITIES_LINK)}
>
{i18n.t("privacypolicy.link.link")}
{i18n.t("privacypolicy.link.link", { ns: "privacypolicy" })}
</u>
);
};
Expand Down Expand Up @@ -151,9 +153,10 @@ const TermsModal = ({
const nameNoDash = name.replace(/-/g, "");
const componentId = name + "-modal";
const termsObject: TermsObject = t(nameNoDash, {
ns: nameNoDash,
returnObjects: true,
});
const introText = `${i18n.t(`${nameNoDash}.intro.text`)}`;
const introText = `${i18n.t(`${nameNoDash}.intro.text`, { ns: nameNoDash })}`;
const sections = termsObject.sections;

const closeModal = () => setIsOpen(false);
Expand All @@ -170,9 +173,11 @@ const TermsModal = ({
header={
<PageHeader
closeButton={true}
closeButtonLabel={`${i18n.t(`${nameNoDash}.done`)}`}
closeButtonLabel={`${i18n.t(`${nameNoDash}.done`, {
ns: nameNoDash,
})}`}
closeButtonAction={closeModal}
title={`${i18n.t(`${nameNoDash}.intro.title`)}`}
title={`${i18n.t(`${nameNoDash}.intro.title`, { ns: nameNoDash })}`}
/>
}
>
Expand Down
20 changes: 8 additions & 12 deletions src/ui/pages/CreateSSIAgent/CreateSSIAgent.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import configureStore from "redux-mock-store";
import { Agent } from "../../../core/agent/agent";
import { MiscRecordId } from "../../../core/agent/agent.types";
import EN_TRANSLATIONS from "../../../locales/en/en.json";
import SSI_CREATE from "../../../locales/en/aboutssiagentcreate.json";
import SSI_RECOVERY from "../../../locales/en/aboutssiagentrecovery.json";
import { RoutePath } from "../../../routes";
import { setBootUrl, setConnectUrl } from "../../../store/reducers/ssiAgent";
import { setCurrentOperation } from "../../../store/reducers/stateCache";
Expand Down Expand Up @@ -444,14 +446,12 @@ describe("SSI agent page", () => {
</Provider>
);

expect(getByText(SSI_CREATE.aboutssiagentcreate.intro.title)).toBeVisible();
expect(
getByText(EN_TRANSLATIONS.aboutssiagentcreate.intro.title)
getByText(SSI_CREATE.aboutssiagentcreate.sections[0].content[0].text)
).toBeVisible();
expect(
getByText(EN_TRANSLATIONS.aboutssiagentcreate.sections[0].content[0].text)
).toBeVisible();
expect(
getByText(EN_TRANSLATIONS.aboutssiagentcreate.sections[0].content[1].text)
getByText(SSI_CREATE.aboutssiagentcreate.sections[0].content[1].text)
).toBeVisible();
expect(
getByText(EN_TRANSLATIONS.ssiagent.button.onboardingdocumentation)
Expand Down Expand Up @@ -591,17 +591,13 @@ describe("SSI agent page: recovery mode", () => {
);

expect(
getByText(EN_TRANSLATIONS.aboutssiagentrecovery.intro.title)
getByText(SSI_RECOVERY.aboutssiagentrecovery.intro.title)
).toBeVisible();
expect(
getByText(
EN_TRANSLATIONS.aboutssiagentrecovery.sections[0].content[0].text
)
getByText(SSI_RECOVERY.aboutssiagentrecovery.sections[0].content[0].text)
).toBeVisible();
expect(
getByText(
EN_TRANSLATIONS.aboutssiagentrecovery.sections[0].content[1].text
)
getByText(SSI_RECOVERY.aboutssiagentrecovery.sections[0].content[1].text)
).toBeVisible();
expect(
getByText(EN_TRANSLATIONS.ssiagent.button.recoverydocumentation)
Expand Down
Loading