Skip to content

Commit

Permalink
feat(ui-ux): add evm faq screen (#4013)
Browse files Browse the repository at this point in the history
* feat(ui-ux): add evm faq screen

* feat(ui-ux): update test snapshot

* add metachain faq translations

* add evm faq english translation for es and it

---------

Co-authored-by: Pierre Gee <[email protected]>
  • Loading branch information
lykalabrada and Pierre Gee authored Sep 27, 2023
1 parent eb119ad commit 41d1a6a
Show file tree
Hide file tree
Showing 10 changed files with 268 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import { ThemedScrollViewV2, ThemedTextV2 } from "@components/themed";
import {
AccordionContent,
WalletAccordionV2,
} from "@components/WalletAccordionV2";
import { tailwind } from "@tailwind";
import { translate } from "@translations";

export function EvmFeatureFaq(): JSX.Element {
const faqContent: AccordionContent[] = [
{
title: translate(
"components/EvmFeatureFaq",
"What tokens are supported between DVM and EVM bidirectionally?"
),
content: [
{
text: translate(
"components/EvmFeatureFaq",
"All dTokens are accepted. dTokens consist of:\ndStocks (dTSLA, dGOOG.) + DFI\n\nFor the full list, you may refer to https://defiscan.live/tokens on any tokens under DAT category."
),
type: "paragraph",
},
],
},
{
title: translate(
"components/EvmFeatureFaq",
"How can I access the MetaChain layer from the Light Wallet?"
),
content: [
{
text: translate(
"components/EvmFeatureFaq",
"Move your dTokens between native DeFiChain's native layer (DVM) and the MetaChain layer (EVM) bidirectionally.\n\nFor instance, transfer DFI/DUSD/dBTC or any other dToken from DVM to EVM and back, all directly within the Light Wallet."
),
type: "paragraph",
},
],
},
{
title: translate(
"components/EvmFeatureFaq",
"Why would I need to move dTokens from DVM to EVM?"
),
content: [
{
text: translate(
"components/EvmFeatureFaq",
"Using the gateway allows you to move your dTokens from the Light Wallet to any EVM compatible wallet on the MetaChain layer (ex: MetaMask). This would allow you to interact with the constantly growing EVM ecosystem on MetaChain and the various projects on it."
),
type: "paragraph",
},
],
},
{
title: translate(
"components/EvmFeatureFaq",
"How can I move dTokens from DVM to EVM?"
),
content: [
{
text: translate(
"components/EvmFeatureFaq",
'You can do it through either the "Convert" or "Send" functions on Light Wallet. The "Convert" option allows you to convert any dTokens on DVM to your own EVM address within the Light Wallet (and vice versa).\n\nYour seed phrase can also be used to import your Light Wallet EVM address into any external wallets which support a 24 words recovery phrase like MetaMask.\n\nThe "Send" option allows you to send dTokens from your DVM address to any EVM address on the MetaChain layer and vice versa. Note that you do not need to convert your dTokens before sending, this process does it automatically for you.'
),
type: "paragraph",
},
],
},
];

return (
<ThemedScrollViewV2
contentContainerStyle={tailwind("pt-8 px-5 pb-16")}
style={tailwind("flex-1")}
testID="evm_feature_faq"
>
<ThemedTextV2 style={tailwind("text-base font-normal-v2 px-5")}>
{translate(
"components/EvmFeatureFaq",
"The MetaChain layer provides an EVM-compatible environment that allows developers familiar with Ethereum to seamlessly build next generation applications inside the native DeFiChain ecosystem.\n\nThe MetaChain layer provides an EVM-compatible environment that allows developers familiar with Ethereum to build applications inside the DeFiChain ecosystem."
)}
</ThemedTextV2>

<WalletAccordionV2
testID="evm_faq_accordion"
activeSections={[0]}
title={translate(
"components/EvmFeatureFaq",
"FREQUENTLY ASKED QUESTIONS"
)}
content={faqContent}
/>
</ThemedScrollViewV2>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
ButtonGroupTabKey,
} from "../Portfolio/screens/AddressBookScreen";
import { AddOrEditAddressBookScreen } from "../Portfolio/screens/AddOrEditAddressBookScreen";
import { EvmFeatureFaq } from "../Portfolio/screens/EvmFeatureFaq";

export interface SettingsParamList {
SettingsScreen: undefined;
Expand Down Expand Up @@ -276,6 +277,17 @@ export function SettingsNavigator(): JSX.Element {
),
}}
/>

<SettingsStack.Screen
component={EvmFeatureFaq}
name="EvmFeatureFaq"
options={{
headerTitle: translate(
"components/EvmFeatureFaq",
"About MetaChain (EVM)"
),
}}
/>
</SettingsStack.Navigator>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export function KnowledgeBaseScreen({ navigation }: Props): JSX.Element {
},
]
: []),
{
// TODO (Lyka): Check if we need to check for feature flag
label: "MetaChain (EVM)",
testID: "evm_feature_faq",
onPress: () => navigation.navigate("EvmFeatureFaq"),
},
];

return (
Expand Down

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

13 changes: 13 additions & 0 deletions shared/translations/languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,19 @@
"Are there other ways to submit proposals?": "Gibt es noch andere Möglichkeiten, Proposals einzureichen?",
"If you own a full node wallet, you may also choose to submit using commands via CLI. Commands can be generated on DeFiScan, under Governance tab > Submit proposal.": "Wenn du eine Full-Node-Wallet besitzt, kannst du die Proposals auch über Befehle per Befehlszeile einreichen. Befehle können auf DeFiScan unter dem Reiter Governance > Submit proposal erstellt werden."
},
"components/EvmFeatureFaq": {
"FREQUENTLY ASKED QUESTIONS": "HÄUFIG GESTELLTE FRAGEN",
"About MetaChain (EVM)": "MetaChain (EVM)",
"The MetaChain layer provides an EVM-compatible environment that allows developers familiar with Ethereum to seamlessly build next generation applications inside the native DeFiChain ecosystem.\n\nThe MetaChain layer provides an EVM-compatible environment that allows developers familiar with Ethereum to build applications inside the DeFiChain ecosystem.": "Der MetaChain-Layer bietet eine EVM-kompatible Umgebung, die es Entwicklern, die mit Ethereum vertraut sind, ermöglicht, nahtlos Anwendungen der nächsten Generation innerhalb des nativen DeFiChain-Ökosystems zu entwickeln.\n\nDer MetaChain-Layer bietet eine EVM-kompatible Umgebung, die es Entwicklern, die mit Ethereum vertraut sind, ermöglicht, Anwendungen innerhalb des DeFiChain-Ökosystems zu entwickeln.",
"What tokens are supported between DVM and EVM bidirectionally?": "Welche Token werden zwischen DVM und EVM bidirektional unterstützt?",
"All dTokens are accepted. dTokens consist of:\ndStocks (dTSLA, dGOOG.) + DFI\n\nFor the full list, you may refer to https://defiscan.live/tokens on any tokens under DAT category.": "Alle dToken werden akzeptiert. dToken bestehen aus:\ndStocks (dTSLA, dGOOG.) + DFI\n\nDie vollständige Liste findest du unter https://defiscan.live/tokens unter der Kategorie DAT.",
"How can I access the MetaChain layer from the Light Wallet?": "Wie kann ich von der Lightwallet aus auf den MetaChain-Layer zugreifen?",
"Move your dTokens between native DeFiChain's native layer (DVM) and the MetaChain layer (EVM) bidirectionally.\n\nFor instance, transfer DFI/DUSD/dBTC or any other dToken from DVM to EVM and back, all directly within the Light Wallet.": "Bewege deine dToken zwischen dem nativen Layer von DeFiChain (DVM) und dem MetaChain-Layer (EVM) bidirektional.\n\nÜbertrage z.B. DFI/DUSD/dBTC oder jeden anderen dToken von DVM zu EVM und zurück, alles direkt in der Lightwallet.",
"Why would I need to move dTokens from DVM to EVM?": "Warum sollte ich dToken von DVM zu EVM verschieben?",
"Using the gateway allows you to move your dTokens from the Light Wallet to any EVM compatible wallet on the MetaChain layer (ex: MetaMask). This would allow you to interact with the constantly growing EVM ecosystem on MetaChain and the various projects on it.": "Mit dem Gateway kannst du deine dToken von der Lightwallet zu jeder EVM-kompatiblen Wallet auf dem MetaChain-Layer (z. B. MetaMask) verschieben. So kannst du mit dem ständig wachsenden EVM-Ökosystem auf MetaChain und den verschiedenen Projekten interagieren.",
"How can I move dTokens from DVM to EVM?": "Wie kann ich dToken von DVM zu EVM verschieben?",
"You can do it through either the \"Convert\" or \"Send\" functions on Light Wallet. The \"Convert\" option allows you to convert any dTokens on DVM to your own EVM address within the Light Wallet (and vice versa).\n\nYour seed phrase can also be used to import your Light Wallet EVM address into any external wallets which support a 24 words recovery phrase like MetaMask.\n\nThe \"Send\" option allows you to send dTokens from your DVM address to any EVM address on the MetaChain layer and vice versa. Note that you do not need to convert your dTokens before sending, this process does it automatically for you.": "Du kannst dies entweder über die Funktionen \"Umwandeln\" oder \"Senden\" in der Lightwallet tun. Mit der Option \"Konvertieren\" kannst du alle DVM-dToken in deine eigene EVM-Adresse in der Lightwallet umwandeln (und umgekehrt).\n\nDeine Seed-Phrase kann auch verwendet werden, um deine Lightwallet-EVM-Adresse in externe Wallets zu importieren, die eine 24-Wörter-Wiederherstellungsphrase wie MetaMask unterstützen.\n\nMit der Option \"Senden\" kannst du dToken von deiner DVM-Adresse an eine beliebige EVM-Adresse auf dem MetaChain-Layer senden und umgekehrt. Beachte, dass du deine dToken vor dem Senden nicht umwandeln musst, das geschieht automatisch für dich."
},
"screens/NetworkSelectionScreen": {
"NETWORK": "NETZWERK",
"Select network": "Netzwerkauswahl",
Expand Down
13 changes: 13 additions & 0 deletions shared/translations/languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,19 @@
"Are there other ways to submit proposals?": "Are there other ways to submit proposals?",
"If you own a full node wallet, you may also choose to submit using commands via CLI. Commands can be generated on DeFiScan, under Governance tab > Submit proposal.": "If you own a full node wallet, you may also choose to submit using commands via CLI. Commands can be generated on DeFiScan, under Governance tab > Submit proposal."
},
"components/EvmFeatureFaq": {
"FREQUENTLY ASKED QUESTIONS": "PREGUNTAS FRECUENTES",
"About MetaChain (EVM)": "About MetaChain (EVM)",
"The MetaChain layer provides an EVM-compatible environment that allows developers familiar with Ethereum to seamlessly build next generation applications inside the native DeFiChain ecosystem.\n\nThe MetaChain layer provides an EVM-compatible environment that allows developers familiar with Ethereum to build applications inside the DeFiChain ecosystem.": "The MetaChain layer provides an EVM-compatible environment that allows developers familiar with Ethereum to seamlessly build next generation applications inside the native DeFiChain ecosystem.\n\nThe MetaChain layer provides an EVM-compatible environment that allows developers familiar with Ethereum to build applications inside the DeFiChain ecosystem.",
"What tokens are supported between DVM and EVM bidirectionally?": "What tokens are supported between DVM and EVM bidirectionally?",
"All dTokens are accepted. dTokens consist of:\ndStocks (dTSLA, dGOOG.) + DFI\n\nFor the full list, you may refer to https://defiscan.live/tokens on any tokens under DAT category.": "All dTokens are accepted. dTokens consist of:\ndStocks (dTSLA, dGOOG.) + DFI\n\nFor the full list, you may refer to https://defiscan.live/tokens on any tokens under DAT category.",
"How can I access the MetaChain layer from the Light Wallet?": "How can I access the MetaChain layer from the Light Wallet?",
"Move your dTokens between native DeFiChain's native layer (DVM) and the MetaChain layer (EVM) bidirectionally.\n\nFor instance, transfer DFI/DUSD/dBTC or any other dToken from DVM to EVM and back, all directly within the Light Wallet.": "Move your dTokens between native DeFiChain's native layer (DVM) and the MetaChain layer (EVM) bidirectionally.\n\nFor instance, transfer DFI/DUSD/dBTC or any other dToken from DVM to EVM and back, all directly within the Light Wallet.",
"Why would I need to move dTokens from DVM to EVM?": "Why would I need to move dTokens from DVM to EVM?",
"Using the gateway allows you to move your dTokens from the Light Wallet to any EVM compatible wallet on the MetaChain layer (ex: MetaMask). This would allow you to interact with the constantly growing EVM ecosystem on MetaChain and the various projects on it.": "Using the gateway allows you to move your dTokens from the Light Wallet to any EVM compatible wallet on the MetaChain layer (ex: MetaMask). This would allow you to interact with the constantly growing EVM ecosystem on MetaChain and the various projects on it.",
"How can I move dTokens from DVM to EVM?": "How can I move dTokens from DVM to EVM?",
"You can do it through either the \"Convert\" or \"Send\" functions on Light Wallet. The \"Convert\" option allows you to convert any dTokens on DVM to your own EVM address within the Light Wallet (and vice versa).\n\nYour seed phrase can also be used to import your Light Wallet EVM address into any external wallets which support a 24 words recovery phrase like MetaMask.\n\nThe \"Send\" option allows you to send dTokens from your DVM address to any EVM address on the MetaChain layer and vice versa. Note that you do not need to convert your dTokens before sending, this process does it automatically for you.": "You can do it through either the \"Convert\" or \"Send\" functions on Light Wallet. The \"Convert\" option allows you to convert any dTokens on DVM to your own EVM address within the Light Wallet (and vice versa).\n\nYour seed phrase can also be used to import your Light Wallet EVM address into any external wallets which support a 24 words recovery phrase like MetaMask.\n\nThe \"Send\" option allows you to send dTokens from your DVM address to any EVM address on the MetaChain layer and vice versa. Note that you do not need to convert your dTokens before sending, this process does it automatically for you."
},
"screens/NetworkSelectionScreen": {
"NETWORK": "RED",
"Select network": "Seleccionar red",
Expand Down
Loading

0 comments on commit 41d1a6a

Please sign in to comment.