Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bitpay/bitpay-app
Browse files Browse the repository at this point in the history
  • Loading branch information
lanchana committed Jul 25, 2022
2 parents 7c02983 + a13cf88 commit 6cb5816
Show file tree
Hide file tree
Showing 46 changed files with 1,215 additions and 528 deletions.
3 changes: 3 additions & 0 deletions assets/img/edit-icon-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/img/edit-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 17 additions & 21 deletions locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@
"Wrong password": "Wrong password",
"Exceeded daily limit of $500 per user": "Exceeded daily limit of $500 per user",
"Unknown error": "Unknown error",
"Dutch": "Dutch",
"English": "English",
"French": "French",
"Japanese": "Japanese",
"German": "German",
"Portuguese": "Portuguese",
"Russian": "Russian",
"Chinese": "Chinese",
"Welcome Back!": "Welcome Back!",
"Create Account": "Create Account",
"Check Your Inbox": "Check Your Inbox",
Expand Down Expand Up @@ -262,6 +254,7 @@
"Native Currency": "Native Currency",
"Created at": "Created at",
"Time Zone": "Time Zone",
"Hide Balance": "Hide Balance",
"Sign out": "Sign out",
"Summary": "Summary",
"Amount": "Amount",
Expand Down Expand Up @@ -547,13 +540,8 @@
"All settings have been reset.": "All settings have been reset.",
"CANCEL": "CANCEL",
"Reset All Settings": "Reset All Settings",
"Notifications Disabled": "Notifications Disabled",
"If you want to get important updates on your account, new features, promos and more, go to Settings and tap Allow Notifications.": "If you want to get important updates on your account, new features, promos and more, go to Settings and tap Allow Notifications.",
"Change Settings": "Change Settings",
"Enable Push Notifications": "Enable Push Notifications",
"Confirmed Transactions": "Confirmed Transactions",
"Product Updates": "Product Updates",
"Offers & Promotions": "Offers & Promotions",
"Push Notifications": "Push Notifications",
"Email Notifications": "Email Notifications",
"Lock App": "Lock App",
"Enabled": "Enabled",
"Disabled": "Disabled",
Expand Down Expand Up @@ -613,6 +601,19 @@
"Carousel": "Carousel",
"List View": "List View",
"Favorites": "Favorites",
"Provide your email address to receive occasional updates on new features and other relevant news.": "Provide your email address to receive occasional updates on new features and other relevant news.",
"I agree to receive marketing communications from BitPay.": "I agree to receive marketing communications from BitPay.",
"I agree to the ": "I agree to the ",
"and ": "and ",
"Subscribe": "Subscribe",
"Enable Email Notifications": "Enable Email Notifications",
"Notifications Disabled": "Notifications Disabled",
"If you want to get important updates on your account, new features, promos and more, go to Settings and tap Allow Notifications.": "If you want to get important updates on your account, new features, promos and more, go to Settings and tap Allow Notifications.",
"Change Settings": "Change Settings",
"Enable Push Notifications": "Enable Push Notifications",
"Automated alerts about wallet or card.": "Automated alerts about wallet or card.",
"Announcements": "Announcements",
"Updates on new features and other relevant news.": "Updates on new features and other relevant news.",
"Network Fee Policy": "Network Fee Policy",
"Satoshis per byte": "Satoshis per byte",
"within an hour": "within an hour",
Expand Down Expand Up @@ -644,6 +645,7 @@
"Search Results for ": "Search Results for ",
"Enter Email": "Enter Email",
"Enter Phone": "Enter Phone",
"Two-Step Verification": "Two-Step Verification",
"BuyGiftCard": "Buy {{displayName}} Gift Card",
"Activation fee": "Activation fee",
"gift cards contain an additional activation fee of .": "{{displayName}} gift cards contain an additional activation fee of {{fiatAmount}}.",
Expand Down Expand Up @@ -908,7 +910,6 @@
"Sync wallet": "Sync wallet",
"Failed to Sync wallets": "Failed to Sync wallets",
"Key Name": "Key Name",
"Hide Balance": "Hide Balance",
"Backup": "Backup",
"Request Encrypt Password": "Request Encrypt Password",
"Password Not Recoverable": "Password Not Recoverable",
Expand All @@ -929,9 +930,7 @@
"Share this QR code to receive in your wallet .": "Share this QR code to receive {{amountUnitStr}} in your wallet {{walletName}}.",
"Receive ": "Receive ",
"Select Inputs": "Select Inputs",
"Specify Amount": "Specify Amount",
"Total Selected Inputs": "Total Selected Inputs",
"The sum of the selected amounts must be at least:": "The sum of the selected amounts must be at least: {{specifiedAmount}} {{currencyAbbreviation}}",
"Wallet Inputs": "Wallet Inputs",
"No available inputs.": "No available inputs.",
"Confirm ": "Confirm {{title}}",
Expand Down Expand Up @@ -1075,7 +1074,6 @@
"Hide Wallet": "Hide Wallet",
"This wallet will not be removed from the device.": "This wallet will not be removed from the device.",
"Information": "Information",
"Two-Step Verification": "Two-Step Verification",
"Create Multisig Wallet": "Create Multisig Wallet",
"Join Shared Wallet": "Join Shared Wallet",
"Invitation": "Invitation",
Expand All @@ -1093,8 +1091,6 @@
"Verification Required": "Verification Required",
"To complete this payment please verify your account.": "To complete this payment please verify your account.",
"Verify": "Verify",
"Connect Your BitPay ID": "Connect Your BitPay ID",
"To complete this payment, please login with your BitPay ID.": "To complete this payment, please login with your BitPay ID.",
"Session request failed or rejected. Please try again by refreshing the QR code.": "Session request failed or rejected. Please try again by refreshing the QR code.",
"20 Wallet limit from the same coin and network has been reached.": "20 Wallet limit from the same coin and network has been reached.",
"High": "High",
Expand Down
38 changes: 23 additions & 15 deletions locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@
"Native Currency": "Moneda nativa",
"Created at": "Creado el",
"Time Zone": "Zona horaria",
"Hide Balance": "Ocultar balance",
"Sign out": "Cerrar sesión",
"Summary": "Resumen",
"Amount": "Monto",
Expand Down Expand Up @@ -539,13 +540,8 @@
"All settings have been reset.": "Se ha restablecido la configuración.",
"CANCEL": "CANCELAR",
"Reset All Settings": "Restablecer toda la configuración",
"Notifications Disabled": "Notificaciones deshabilitadas",
"If you want to get important updates on your account, new features, promos and more, go to Settings and tap Allow Notifications.": "Si quieres obtener actualizaciones importantes en tu cuenta, nuevas funcionalidades, avisos y más, ve a Configuración y pulsa Habilitar notificaciones.",
"Change Settings": "Cambiar configuración",
"Enable Push Notifications": "Habilitar notificaciones push",
"Confirmed Transactions": "Transacciones confirmadas",
"Product Updates": "Actualizaciones",
"Offers & Promotions": "Ofertas y promociones",
"Push Notifications": "Push Notifications",
"Email Notifications": "Email Notifications",
"Lock App": "Bloquear aplicación",
"Enabled": "Activado",
"Disabled": "Deshabilitado",
Expand Down Expand Up @@ -605,6 +601,19 @@
"Carousel": "Carrusel",
"List View": "Vista de lista",
"Favorites": "Favoritos",
"Provide your email address to receive occasional updates on new features and other relevant news.": "Provide your email address to receive occasional updates on new features and other relevant news.",
"I agree to receive marketing communications from BitPay.": "I agree to receive marketing communications from BitPay.",
"I agree to the ": "I agree to the ",
"and ": "and ",
"Subscribe": "Subscribe",
"Enable Email Notifications": "Habilitar notificaciones de correo electrónico",
"Notifications Disabled": "Notificaciones deshabilitadas",
"If you want to get important updates on your account, new features, promos and more, go to Settings and tap Allow Notifications.": "Si quieres obtener actualizaciones importantes en tu cuenta, nuevas funcionalidades, avisos y más, ve a Configuración y pulsa Habilitar notificaciones.",
"Change Settings": "Cambiar configuración",
"Enable Push Notifications": "Habilitar notificaciones push",
"Automated alerts about wallet or card.": "Automated alerts about wallet or card.",
"Announcements": "Announcements",
"Updates on new features and other relevant news.": "Updates on new features and other relevant news.",
"Network Fee Policy": "Políticas de comisiones de red",
"Satoshis per byte": "Satoshis por byte",
"within an hour": "en una hora",
Expand Down Expand Up @@ -636,6 +645,7 @@
"Search Results for ": "Resultados de búsqueda para ",
"Enter Email": "Ingrese correo electrónico",
"Enter Phone": "Introducir teléfono",
"Two-Step Verification": "Verificación de 2 pasos",
"BuyGiftCard": "Comprar {{displayName}} Gift Card",
"Activation fee": "Comisión de activación",
"gift cards contain an additional activation fee of .": "Las gift cards de {{displayName}} contienen una comisión de activación adicional de {{fiatAmount}}.",
Expand Down Expand Up @@ -793,8 +803,10 @@
"Your encryption password has been removed. This key is now decrypted.": "Su contraseña de cifrado ha sido eliminada. Esta clave ahora está descifrada.",
"To disable encryption for your wallet, please enter your encryption password below.": "Para desactivar el cifrado de su billetera, por favor introduzca su contraseña de cifrado a continuación.",
"Generating Address": "Generando dirección",
"To get started, you’ll need to enter a valid address or select an existing contact or wallet.": "Para comenzar, deberá ingresar una dirección válida o seleccionar un contacto o billetera existente.",
"Enter address or select wallet": "Ingrese una dirección o seleccione una billetera",
"Recipients": "Recipients",
"Recipient": "Destinatario",
"To get started, you’ll need to enter a valid address or select an existing contact or wallet.": "Para comenzar, deberá ingresar una dirección válida o seleccionar un contacto o billetera existente.",
"Search contact": "Buscar contacto",
"Select Wallet Type": "Seleccionar tipo de billetera",
"Basic wallet": "Billetera básica",
Expand Down Expand Up @@ -898,7 +910,6 @@
"Sync wallet": "Sincronizar billetera",
"Failed to Sync wallets": "Error al sincronizar billeteras",
"Key Name": "Nombre de clave",
"Hide Balance": "Ocultar balance",
"Backup": "Respaldo",
"Request Encrypt Password": "Solicitar contraseña de cifrado",
"Password Not Recoverable": "Contraseña no recuperable",
Expand All @@ -919,10 +930,7 @@
"Share this QR code to receive in your wallet .": "Comparte este código QR para recibir {{amountUnitStr}} en su billetera {{walletName}}.",
"Receive ": "Recibir ",
"Select Inputs": "Seleccionar inputs",
"Recipient": "Destinatario",
"Specify Amount": "Especificar Monto",
"Total Selected Inputs": "Total de inputs seleccionados",
"The sum of the selected amounts must be at least:": "La suma de los inputs seleccionados debe ser como mínimo: {{specifiedAmount}} {{currencyAbbreviation}}",
"Wallet Inputs": "Inputs de la billetera",
"No available inputs.": "No hay inputs disponibles.",
"Confirm ": "Confirmar {{title}}",
Expand Down Expand Up @@ -952,6 +960,9 @@
"Sending from": "Enviando desde",
"Select Inputs for this Transaction": "Seleccionar inputs para esta transacción",
"Choose which inputs you'd like to use to send crypto.": "Elija qué inputs le gustaría usar para enviar criptomonedas.",
"Transfer to Multiple Recipients": "Transfer to Multiple Recipients",
"Send crypto to multiple contacts or addresses.": "Send crypto to multiple contacts or addresses.",
"Multiple Recipients": "Multiple Recipients",
"Send To": "Enviar a",
"Fetching payment options...": "Obteniendo opciones de pago...",
"Search contact or enter address": "Buscar contacto o ingresar dirección",
Expand Down Expand Up @@ -1063,7 +1074,6 @@
"Hide Wallet": "Ocultar billetera",
"This wallet will not be removed from the device.": "Esta billetera no se eliminará del dispositivo.",
"Information": "Información",
"Two-Step Verification": "Verificación de 2 pasos",
"Create Multisig Wallet": "Crear billetera multifirma",
"Join Shared Wallet": "Unirse a billetera compartida",
"Invitation": "Invitación",
Expand All @@ -1081,8 +1091,6 @@
"Verification Required": "Verification Required",
"To complete this payment please verify your account.": "To complete this payment please verify your account.",
"Verify": "Verify",
"Connect Your BitPay ID": "Conecte su ID de BitPay",
"To complete this payment, please login with your BitPay ID.": "Para completar este pago, inicie sesión con su ID de BitPay.",
"Session request failed or rejected. Please try again by refreshing the QR code.": "Solicitud de sesión fallida o rechazada. Vuelva a intentarlo actualizando el código QR.",
"20 Wallet limit from the same coin and network has been reached.": "Se alcanzó el límite de 20 billeteras de la misma moneda y red.",
"High": "Alta",
Expand Down
12 changes: 11 additions & 1 deletion src/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ import CardActivationStack, {
} from './navigation/card-activation/CardActivationStack';
import {sleep} from './utils/helper-methods';
import {Analytics, handleBwsEvent} from './store/app/app.effects';
import NotificationsSettingsStack, {
NotificationsSettingsStackParamsList,
} from './navigation/tabs/settings/notifications/NotificationsStack';

// ROOT NAVIGATION CONFIG
export type RootStackParamList = {
Expand All @@ -121,6 +124,7 @@ export type RootStackParamList = {
SwapCrypto: NavigatorScreenParams<SwapCryptoStackParamList>;
WalletConnect: NavigatorScreenParams<WalletConnectStackParamList>;
Debug: DebugScreenParamList;
NotificationsSettings: NavigatorScreenParams<NotificationsSettingsStackParamsList>;
};
// ROOT NAVIGATION CONFIG
export enum RootStacks {
Expand All @@ -146,6 +150,7 @@ export enum RootStacks {
SWAP_CRYPTO = 'SwapCrypto',
WALLET_CONNECT = 'WalletConnect',
DEBUG = 'Debug',
NOTIFICATIONS_SETTINGS = 'NotificationsSettings',
}

// ROOT NAVIGATION CONFIG
Expand All @@ -165,7 +170,8 @@ export type NavScreenParams = NavigatorScreenParams<
BuyCryptoStackParamList &
SwapCryptoStackParamList &
ScanStackParamList &
WalletConnectStackParamList
WalletConnectStackParamList &
NotificationsSettingsStackParamsList
>;

declare global {
Expand Down Expand Up @@ -459,6 +465,10 @@ export default () => {
name={RootStacks.EXTERNAL_SERVICES_SETTINGS}
component={ExternalServicesSettingsStack}
/>
<Root.Screen
name={RootStacks.NOTIFICATIONS_SETTINGS}
component={NotificationsSettingsStack}
/>
<Root.Screen name={RootStacks.ABOUT} component={AboutStack} />
<Root.Screen name={RootStacks.COINBASE} component={CoinbaseStack} />
<Root.Screen
Expand Down
43 changes: 40 additions & 3 deletions src/components/form/BoxInput.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import React, {useState} from 'react';
import {TextInput, TextInputProps} from 'react-native';
import {KeyboardTypeOptions, TextInput, TextInputProps} from 'react-native';
import TextInputMask, {TextInputMaskProps} from 'react-native-text-input-mask';
import styled, {css} from 'styled-components/native';
import ObfuscationHide from '../../../assets/img/obfuscation-hide.svg';
import ObfuscationShow from '../../../assets/img/obfuscation-show.svg';
import Search from '../../../assets/img/search.svg';
import {IS_ANDROID} from '../../constants';
import {
Caution,
LightBlack,
NeutralSlate,
ProgressBlue,
Slate,
White,
Expand All @@ -24,6 +26,7 @@ interface InputProps {
isFocused: boolean;
isError?: boolean;
type?: InputType;
disabled?: boolean;
}

const InputContainer = styled.View<InputProps>`
Expand All @@ -50,6 +53,12 @@ const InputContainer = styled.View<InputProps>`
border-bottom-color: ${Caution};
color: ${Caution};
`}
${({disabled}) =>
disabled &&
css`
border-color: ${({theme}) => (theme.dark ? LightBlack : NeutralSlate)};
`}
`;

const Affix = styled.View`
Expand Down Expand Up @@ -80,6 +89,12 @@ const Input = styled(TextInputMask)<InputProps>`
css`
color: ${Caution};
`}
${({disabled}) =>
disabled &&
css`
background: ${({theme}) => (theme.dark ? LightBlack : NeutralSlate)};
`}
`;

const Label = styled(BaseText)`
Expand Down Expand Up @@ -133,20 +148,36 @@ interface BoxInputProps extends TextInputProps {
suffix?: () => JSX.Element;
error?: any;
type?: InputType;
disabled?: boolean;
}

const BoxInput = React.forwardRef<
TextInput,
BoxInputProps & TextInputMaskProps
>(
(
{label, onFocus, onBlur, onSearch, prefix, suffix, error, type, ...props},
{
label,
onFocus,
onBlur,
onSearch,
prefix,
suffix,
error,
type,
disabled,
...props
},
ref,
) => {
const isPassword = type === 'password';
const isSearch = type === 'search';
const [isFocused, setIsFocused] = useState(false);
const [isSecureTextEntry, setSecureTextEntry] = useState(isPassword);
const keyboardType: KeyboardTypeOptions | undefined =
isPassword && !isSecureTextEntry && IS_ANDROID
? 'visible-password'
: undefined;

const _onFocus = () => {
setIsFocused(true);
Expand Down Expand Up @@ -180,18 +211,24 @@ const BoxInput = React.forwardRef<
<>
{label ? <Label>{label}</Label> : null}

<InputContainer isFocused={isFocused} isError={error}>
<InputContainer
isFocused={isFocused}
isError={error}
disabled={disabled}>
{prefix ? <Prefix>{prefix()}</Prefix> : null}

<Input
keyboardType={keyboardType}
{...props}
editable={!disabled}
ref={ref}
secureTextEntry={isPassword && isSecureTextEntry}
placeholderTextColor={Slate}
onFocus={_onFocus}
onBlur={_onBlur}
isFocused={isFocused}
isError={error}
disabled={disabled}
autoCapitalize={'none'}
type={type}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/list/TransactionRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const TransactionRow = ({
) : (
icon && <IconContainer>{icon}</IconContainer>
)}
{description && (
{!!description && (
<Description numberOfLines={details ? 2 : 1} ellipsizeMode={'tail'}>
{description}
{details && (
Expand Down
Loading

0 comments on commit 6cb5816

Please sign in to comment.