Skip to content
Merged
Prev Previous commit
fix lint
  • Loading branch information
ikethirdweb committed Oct 20, 2023
commit 82987d90e263cd5dfee754e15bac806a1e3f9b98
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const SmartWalletFlow = ({
<>
<Text variant="header" mt="lg" textAlign="center">
{mismatch
? l.smart_wallet.network_mistmach
? l.smart_wallet.network_mismatch
: `${l.smart_wallet.connecting} ...`}
</Text>
{mismatch ? (
Expand Down
8 changes: 6 additions & 2 deletions packages/react-native/src/evm/i18n/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export const _en = {
copy_address_or_scan:
"Copy the wallet address or scan the QR code to send funds to this wallet.",
request_testnet_funds: "Request Testnet Funds",
view_transatcion_history: "View Transaction History",
your_address: "Your address",
qr_code: "QR Code",
select_token: "Select Token",
Expand Down Expand Up @@ -72,14 +71,17 @@ export const _en = {
smart_wallet: {
switch_to_smart: "Switch to Smart Wallet",
switch_to_personal: "Switch to Personal Wallet",
network_mistmach: "Network Mismatch",
network_mismatch: "Network Mismatch",
connecting: "Connecting",
},
embedded_wallet: {
request_new_code: "Request new code",
sign_in: "Sign In",
sign_in_google: "Sign in with Google",
enter_your_email: "Enter your email address",
forgot_password: "Forgot password",
enter_account_recovery_code: "Enter account recovery code",
backup_your_account: "Backup your account",
},
wallet_connect: {
no_results_found: "No results found",
Expand All @@ -103,5 +105,7 @@ export const _en = {
or: "OR",
from: "from",
to: "from",
next: "Next",
learn_more: "Learn More",
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ import React, { useState } from "react";
import { ActivityIndicator } from "react-native";
import { ConnectWalletHeader } from "../../../components/ConnectWalletFlow/ConnectingWallet/ConnectingWalletHeader";
import { Box, BaseButton, Text, TextInput } from "../../../components/base";
import { useGlobalTheme } from "../../../providers/ui-context-provider";
import {
useGlobalTheme,
useLocale,
} from "../../../providers/ui-context-provider";

export type EnterPasswordProps = {
goBack: () => void;
close: () => void;
};

export const AccountRecovery = ({ close, goBack }: EnterPasswordProps) => {
const l = useLocale();
const theme = useGlobalTheme();
const [errorMessage, setErrorMessage] = useState<string>();
const [checkingRecoveryCode, setCheckingRecoveryCode] =
Expand All @@ -26,7 +30,9 @@ export const AccountRecovery = ({ close, goBack }: EnterPasswordProps) => {
<Box marginHorizontal="xl">
<ConnectWalletHeader
middleContent={
<Text variant="header">Enter account recovery code</Text>
<Text variant="header">
{l.embedded_wallet.enter_account_recovery_code}
</Text>
}
subHeaderText={
"You should have a copy of this in the email address associated with your account"
Expand Down Expand Up @@ -76,7 +82,7 @@ export const AccountRecovery = ({ close, goBack }: EnterPasswordProps) => {
<ActivityIndicator size={"small"} color={theme.colors.linkPrimary} />
) : (
<Text variant="bodySmallSecondary" color="linkPrimary">
Next
{l.common.next}
</Text>
)}
</BaseButton>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import React, { useEffect, useState } from "react";
import { ConnectWalletHeader } from "../../../components/ConnectWalletFlow/ConnectingWallet/ConnectingWalletHeader";
import { Box, BaseButton, Text, Toast } from "../../../components/base";
import { useGlobalTheme } from "../../../providers/ui-context-provider";
import {
useGlobalTheme,
useLocale,
} from "../../../providers/ui-context-provider";
import CopyIcon from "../../../assets/copy";
import CheckBox from "@react-native-community/checkbox";
import * as Clipboard from "expo-clipboard";
Expand All @@ -12,6 +15,7 @@ export type EnterPasswordProps = {
};

export const AccountRecovery = ({ close, goBack }: EnterPasswordProps) => {
const l = useLocale();
const theme = useGlobalTheme();
const [toggleCheckBox, setToggleCheckBox] = useState(false);
const [errorMessage] = useState<string>();
Expand Down Expand Up @@ -41,7 +45,9 @@ export const AccountRecovery = ({ close, goBack }: EnterPasswordProps) => {
return (
<Box marginHorizontal="xl">
<ConnectWalletHeader
middleContent={<Text variant="header">Backup your account</Text>}
middleContent={
<Text variant="header">{l.embedded_wallet.backup_your_account}</Text>
}
subHeaderText={
"Copy or download these codes and keep them safe. You will need these to recover access to your account if you forget your password. These have also been sent to the email address associated with your account"
}
Expand Down Expand Up @@ -85,7 +91,7 @@ export const AccountRecovery = ({ close, goBack }: EnterPasswordProps) => {
onValueChange={(newValue) => setToggleCheckBox(newValue)}
/>
<Text variant="bodySmallSecondary" color="linkPrimary">
Learn More
{l.common.learn_more}
</Text>
</BaseButton>
<BaseButton
Expand All @@ -96,7 +102,7 @@ export const AccountRecovery = ({ close, goBack }: EnterPasswordProps) => {
onPress={onNextPress}
>
<Text variant="bodySmallSecondary" color="linkPrimary">
Next
{l.common.next}
</Text>
</BaseButton>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import React, { useState } from "react";
import { ActivityIndicator } from "react-native";
import { ConnectWalletHeader } from "../../../components/ConnectWalletFlow/ConnectingWallet/ConnectingWalletHeader";
import { Box, BaseButton, Text } from "../../../components/base";
import { useGlobalTheme } from "../../../providers/ui-context-provider";
import {
useGlobalTheme,
useLocale,
} from "../../../providers/ui-context-provider";
import { PasswordInput } from "../../../components/PasswordInput";

export type EnterPasswordProps = {
Expand All @@ -18,6 +21,7 @@ export const EnterPassword = ({
email,
type,
}: EnterPasswordProps) => {
const l = useLocale();
const theme = useGlobalTheme();
const [errorMessage, setErrorMessage] = useState<string>();
const [checkingPass, setCheckingPass] = useState<boolean>(false);
Expand Down Expand Up @@ -67,7 +71,7 @@ export const EnterPassword = ({
onPress={onForgotPress}
>
<Text variant="bodySmallSecondary" color="linkPrimary">
Forgot password
{l.embedded_wallet.forgot_password}
</Text>
</BaseButton>
)}
Expand All @@ -83,7 +87,7 @@ export const EnterPassword = ({
{isCreatePassword ? (
<BaseButton onPress={onLearnMorePress}>
<Text variant="bodySmallSecondary" color="linkPrimary">
Learn More
{l.common.learn_more}
</Text>
</BaseButton>
) : null}
Expand All @@ -101,7 +105,7 @@ export const EnterPassword = ({
/>
) : (
<Text variant="bodySmallSecondary" color="linkPrimary">
Next
{l.common.next}
</Text>
)}
</BaseButton>
Expand Down