Skip to content
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

feat(ui-ux): add evm faq screen #4013

Merged
merged 6 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
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",
"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 (such as MetaMask).\n\nThis 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."
)}
</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.

3 changes: 3 additions & 0 deletions shared/translations/languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,9 @@
"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"
},
"screens/NetworkSelectionScreen": {
"NETWORK": "NETZWERK",
"Select network": "Netzwerkauswahl",
Expand Down
3 changes: 3 additions & 0 deletions shared/translations/languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,9 @@
"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"
},
"screens/NetworkSelectionScreen": {
"NETWORK": "RED",
"Select network": "Seleccionar red",
Expand Down
3 changes: 3 additions & 0 deletions shared/translations/languages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,9 @@
"Are there other ways to submit proposals?": "Existe-t-il d'autres façons de soumettre des propositions ?",
"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.": "Si vous possédez un portefeuille de nœud complet, vous pouvez également choisir de soumettre en utilisant des commandes via ILC. Les commandes peuvent être générées sur DeFiScan, sous l'onglet Governance > Submit proposal."
},
"components/EvmFeatureFaq": {
"FREQUENTLY ASKED QUESTIONS": "FOIRE AUX QUESTIONS"
},
"screens/NetworkSelectionScreen": {
"NETWORK": "RÉSEAU",
"Select network": "Sélectionnez un réseau",
Expand Down
3 changes: 3 additions & 0 deletions shared/translations/languages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,9 @@
"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": "DOMANDE FREQUENTI"
},
"screens/NetworkSelectionScreen": {
"NETWORK": "RETE",
"Select network": "Selezionare la rete",
Expand Down
3 changes: 3 additions & 0 deletions shared/translations/languages/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,9 @@
"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.": "如果您拥有全节点钱包,你可以选择通过CLI界面使用命令进行提交。该命令可以在DeFiScan上生成,在\"Governance\" > \"Submit proposal\" 选项里。"
},
"components/EvmFeatureFaq": {
"FREQUENTLY ASKED QUESTIONS": "常见问题"
},
"screens/NetworkSelectionScreen": {
"NETWORK": "网络",
"Select network": "切换网络",
Expand Down
3 changes: 3 additions & 0 deletions shared/translations/languages/zh-Hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,9 @@
"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.": "如果您擁有全節點錢包,你可以選擇通過CLI界面使用命令進行提交。該命令可以在DeFiScan上生成,在\"Governance\" > \"Submit proposal\" 選項裡。"
},
"components/EvmFeatureFaq": {
"FREQUENTLY ASKED QUESTIONS": "常見問題"
},
"screens/NetworkSelectionScreen": {
"NETWORK": "網絡",
"Select network": "切換網絡",
Expand Down