This commit is contained in:
Marcos Rodriguez Velez 2023-11-15 08:54:04 -04:00
parent d2c6abf98c
commit d87470163a
No known key found for this signature in database
GPG key ID: 6030B2F48CCE86D7
8 changed files with 20 additions and 27 deletions

View file

@ -1,13 +1,14 @@
import React, { useContext, useEffect, useState } from 'react'; import React, { useContext, useEffect, useState } from 'react';
import { View, Share, StyleSheet } from 'react-native'; import { View, Share, StyleSheet } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native'; import { useNavigation, useRoute } from '@react-navigation/native';
import { BlueButton, BlueCopyTextToClipboard, BlueLoading, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents'; import { BlueCopyTextToClipboard, BlueLoading, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
import navigationStyle from '../../components/navigationStyle'; import navigationStyle from '../../components/navigationStyle';
import loc from '../../loc'; import loc from '../../loc';
import { BlueStorageContext } from '../../blue_modules/storage-context'; import { BlueStorageContext } from '../../blue_modules/storage-context';
import QRCodeComponent from '../../components/QRCodeComponent'; import QRCodeComponent from '../../components/QRCodeComponent';
import alert from '../../components/Alert'; import alert from '../../components/Alert';
import { useTheme } from '../../components/themes'; import { useTheme } from '../../components/themes';
import Button from '../../components/Button';
const LNDViewAdditionalInvoiceInformation = () => { const LNDViewAdditionalInvoiceInformation = () => {
const { walletID } = useRoute().params; const { walletID } = useRoute().params;
@ -60,7 +61,7 @@ const LNDViewAdditionalInvoiceInformation = () => {
<BlueText>{loc.lndViewInvoice.open_direct_channel}</BlueText> <BlueText>{loc.lndViewInvoice.open_direct_channel}</BlueText>
<BlueCopyTextToClipboard text={walletInfo.uris[0]} /> <BlueCopyTextToClipboard text={walletInfo.uris[0]} />
<View style={styles.share}> <View style={styles.share}>
<BlueButton <Button
icon={{ icon={{
name: 'share-alternative', name: 'share-alternative',
type: 'entypo', type: 'entypo',

View file

@ -5,15 +5,7 @@ import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
import { Icon } from 'react-native-elements'; import { Icon } from 'react-native-elements';
import QRCodeComponent from '../../components/QRCodeComponent'; import QRCodeComponent from '../../components/QRCodeComponent';
import { useNavigation, useNavigationState, useRoute } from '@react-navigation/native'; import { useNavigation, useNavigationState, useRoute } from '@react-navigation/native';
import { import { BlueLoading, BlueText, SafeBlueArea, BlueCopyTextToClipboard, BlueSpacing20, BlueTextCentered } from '../../BlueComponents';
BlueLoading,
BlueText,
SafeBlueArea,
BlueButton,
BlueCopyTextToClipboard,
BlueSpacing20,
BlueTextCentered,
} from '../../BlueComponents';
import navigationStyle from '../../components/navigationStyle'; import navigationStyle from '../../components/navigationStyle';
import loc from '../../loc'; import loc from '../../loc';
import { BlueStorageContext } from '../../blue_modules/storage-context'; import { BlueStorageContext } from '../../blue_modules/storage-context';
@ -273,7 +265,7 @@ const LNDViewInvoice = () => {
<Button onPress={handleOnSharePressed} title={loc.receive.details_share} /> <Button onPress={handleOnSharePressed} title={loc.receive.details_share} />
<BlueSpacing20 /> <BlueSpacing20 />
<BlueButton <Button
style={stylesHook.additionalInfo} style={stylesHook.additionalInfo}
onPress={handleOnViewAdditionalInformationPressed} onPress={handleOnViewAdditionalInformationPressed}
title={loc.lndViewInvoice.additional_info} title={loc.lndViewInvoice.additional_info}

View file

@ -2,9 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { View, Text, Linking, StyleSheet, Image, ScrollView } from 'react-native'; import { View, Text, Linking, StyleSheet, Image, ScrollView } from 'react-native';
import AsyncStorage from '@react-native-async-storage/async-storage'; import AsyncStorage from '@react-native-async-storage/async-storage';
import { import {
BlueButton,
BlueButtonLink, BlueButtonLink,
BlueCard, BlueCard,
BlueLoading, BlueLoading,
@ -17,6 +15,7 @@ import navigationStyle from '../../components/navigationStyle';
import Lnurl from '../../class/lnurl'; import Lnurl from '../../class/lnurl';
import loc from '../../loc'; import loc from '../../loc';
import { SuccessView } from '../send/success'; import { SuccessView } from '../send/success';
import Button from '../../components/Button';
export default class LnurlPaySuccess extends Component { export default class LnurlPaySuccess extends Component {
constructor(props) { constructor(props) {
@ -113,7 +112,7 @@ export default class LnurlPaySuccess extends Component {
<BlueCard> <BlueCard>
{repeatable ? ( {repeatable ? (
<BlueButton <Button
onPress={() => { onPress={() => {
this.props.navigation.navigate('ScanLndInvoiceRoot', { this.props.navigation.navigate('ScanLndInvoiceRoot', {
screen: 'LnurlPay', screen: 'LnurlPay',
@ -127,7 +126,7 @@ export default class LnurlPaySuccess extends Component {
icon={{ name: 'refresh', type: 'font-awesome', color: '#9aa0aa' }} icon={{ name: 'refresh', type: 'font-awesome', color: '#9aa0aa' }}
/> />
) : ( ) : (
<BlueButton <Button
onPress={() => { onPress={() => {
this.props.navigation.getParent().popToTop(); this.props.navigation.getParent().popToTop();
}} }}

View file

@ -6,7 +6,7 @@ import { launchImageLibrary } from 'react-native-image-picker';
import { decodeUR, extractSingleWorkload, BlueURDecoder } from '../../blue_modules/ur'; import { decodeUR, extractSingleWorkload, BlueURDecoder } from '../../blue_modules/ur';
import { useNavigation, useRoute, useIsFocused } from '@react-navigation/native'; import { useNavigation, useRoute, useIsFocused } from '@react-navigation/native';
import loc from '../../loc'; import loc from '../../loc';
import { BlueLoading, BlueText, BlueButton, BlueSpacing40 } from '../../BlueComponents'; import { BlueLoading, BlueText, BlueSpacing40 } from '../../BlueComponents';
import alert from '../../components/Alert'; import alert from '../../components/Alert';
import { openPrivacyDesktopSettings } from '../../class/camera'; import { openPrivacyDesktopSettings } from '../../class/camera';
import { isCameraAuthorizationStatusGranted } from '../../helpers/scan-qr'; import { isCameraAuthorizationStatusGranted } from '../../helpers/scan-qr';
@ -370,7 +370,7 @@ const ScanQRCode = () => {
value={backdoorText} value={backdoorText}
onChangeText={setBackdoorText} onChangeText={setBackdoorText}
/> />
<BlueButton <Button
title="OK" title="OK"
testID="scanQrBackdoorOkButton" testID="scanQrBackdoorOkButton"
onPress={() => { onPress={() => {

View file

@ -3,7 +3,7 @@ import { useNavigation, useRoute } from '@react-navigation/native';
import { StyleSheet, View, KeyboardAvoidingView, Platform, TextInput, Keyboard } from 'react-native'; import { StyleSheet, View, KeyboardAvoidingView, Platform, TextInput, Keyboard } from 'react-native';
import loc from '../../loc'; import loc from '../../loc';
import { BlueButton, BlueButtonLink, BlueCard, BlueSpacing10, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents'; import { BlueButtonLink, BlueCard, BlueSpacing10, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
import navigationStyle from '../../components/navigationStyle'; import navigationStyle from '../../components/navigationStyle';
import { BlueStorageContext } from '../../blue_modules/storage-context'; import { BlueStorageContext } from '../../blue_modules/storage-context';
import { requestCameraAuthorization } from '../../helpers/scan-qr'; import { requestCameraAuthorization } from '../../helpers/scan-qr';
@ -121,7 +121,7 @@ const IsItMyAddress = () => {
<BlueSpacing20 /> <BlueSpacing20 />
</> </>
)} )}
<BlueButton <Button
disabled={address.trim().length === 0} disabled={address.trim().length === 0}
title={loc.is_it_my_address.check_address} title={loc.is_it_my_address.check_address}
onPress={checkAddress} onPress={checkAddress}

View file

@ -1,9 +1,7 @@
import React, { useEffect, useState, useContext } from 'react'; import React, { useEffect, useState, useContext } from 'react';
import { Platform, View, Keyboard, StyleSheet, Switch, TouchableWithoutFeedback } from 'react-native'; import { Platform, View, Keyboard, StyleSheet, Switch, TouchableWithoutFeedback } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native'; import { useNavigation, useRoute } from '@react-navigation/native';
import { import {
BlueButton,
BlueButtonLink, BlueButtonLink,
BlueDoneAndDismissKeyboardInputAccessory, BlueDoneAndDismissKeyboardInputAccessory,
BlueFormLabel, BlueFormLabel,
@ -18,6 +16,7 @@ import loc from '../../loc';
import { BlueStorageContext } from '../../blue_modules/storage-context'; import { BlueStorageContext } from '../../blue_modules/storage-context';
import { requestCameraAuthorization } from '../../helpers/scan-qr'; import { requestCameraAuthorization } from '../../helpers/scan-qr';
import { useTheme } from '../../components/themes'; import { useTheme } from '../../components/themes';
import Button from '../../components/Button';
const WalletsImport = () => { const WalletsImport = () => {
const navigation = useNavigation(); const navigation = useNavigation();
@ -133,7 +132,7 @@ const WalletsImport = () => {
<BlueSpacing20 /> <BlueSpacing20 />
<View style={styles.center}> <View style={styles.center}>
<> <>
<BlueButton <Button
disabled={importText.trim().length === 0} disabled={importText.trim().length === 0}
title={loc.wallets.import_do_import} title={loc.wallets.import_do_import}
testID="DoImport" testID="DoImport"

View file

@ -2,7 +2,7 @@ import React, { useContext, useEffect, useState, useRef, useMemo } from 'react';
import { FlatList, StyleSheet, TextInput, View } from 'react-native'; import { FlatList, StyleSheet, TextInput, View } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native'; import { useNavigation, useRoute } from '@react-navigation/native';
import { BlueButton, BlueFormLabel, BlueSpacing20, BlueTextCentered, SafeBlueArea } from '../../BlueComponents'; import { BlueFormLabel, BlueSpacing20, BlueTextCentered, SafeBlueArea } from '../../BlueComponents';
import navigationStyle from '../../components/navigationStyle'; import navigationStyle from '../../components/navigationStyle';
import WalletToImport from '../../components/WalletToImport'; import WalletToImport from '../../components/WalletToImport';
import loc from '../../loc'; import loc from '../../loc';
@ -11,6 +11,7 @@ import { HDLegacyP2PKHWallet, HDSegwitP2SHWallet, HDSegwitBech32Wallet } from '.
import { validateBip32 } from '../../class/wallet-import'; import { validateBip32 } from '../../class/wallet-import';
import debounce from '../../blue_modules/debounce'; import debounce from '../../blue_modules/debounce';
import { useTheme } from '../../components/themes'; import { useTheme } from '../../components/themes';
import Button from '../../components/Button';
const WRONG_PATH = 'WRONG_PATH'; const WRONG_PATH = 'WRONG_PATH';
const WALLET_FOUND = 'WALLET_FOUND'; const WALLET_FOUND = 'WALLET_FOUND';
@ -140,7 +141,7 @@ const ImportCustomDerivationPath = () => {
<View style={[styles.center, stylesHook.center]}> <View style={[styles.center, stylesHook.center]}>
<View style={styles.buttonContainer}> <View style={styles.buttonContainer}>
<BlueButton <Button
disabled={wallets[path]?.[selected] === undefined} disabled={wallets[path]?.[selected] === undefined}
title={loc.wallets.import_do_import} title={loc.wallets.import_do_import}
testID="ImportButton" testID="ImportButton"

View file

@ -3,7 +3,7 @@ import { ActivityIndicator, Alert, FlatList, LayoutAnimation, StyleSheet, View }
import IdleTimerManager from 'react-native-idle-timer'; import IdleTimerManager from 'react-native-idle-timer';
import { useNavigation, useRoute } from '@react-navigation/native'; import { useNavigation, useRoute } from '@react-navigation/native';
import ReactNativeHapticFeedback from 'react-native-haptic-feedback'; import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
import { BlueButton, BlueButtonLink, BlueFormLabel, BlueSpacing10, BlueSpacing20, SafeBlueArea } from '../../BlueComponents'; import { BlueButtonLink, BlueFormLabel, BlueSpacing10, BlueSpacing20, SafeBlueArea } from '../../BlueComponents';
import navigationStyle from '../../components/navigationStyle'; import navigationStyle from '../../components/navigationStyle';
import WalletToImport from '../../components/WalletToImport'; import WalletToImport from '../../components/WalletToImport';
import loc from '../../loc'; import loc from '../../loc';
@ -12,6 +12,7 @@ import startImport from '../../class/wallet-import';
import { BlueStorageContext } from '../../blue_modules/storage-context'; import { BlueStorageContext } from '../../blue_modules/storage-context';
import prompt from '../../helpers/prompt'; import prompt from '../../helpers/prompt';
import { useTheme } from '../../components/themes'; import { useTheme } from '../../components/themes';
import Button from '../../components/Button';
const ImportWalletDiscovery = () => { const ImportWalletDiscovery = () => {
const navigation = useNavigation(); const navigation = useNavigation();
@ -153,7 +154,7 @@ const ImportWalletDiscovery = () => {
)} )}
<BlueSpacing10 /> <BlueSpacing10 />
<View style={styles.buttonContainer}> <View style={styles.buttonContainer}>
<BlueButton <Button
disabled={wallets.length === 0} disabled={wallets.length === 0}
title={loc.wallets.import_do_import} title={loc.wallets.import_do_import}
onPress={() => saveWallet(wallets[selected].wallet)} onPress={() => saveWallet(wallets[selected].wallet)}