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 { View, Share, StyleSheet } from 'react-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 loc from '../../loc';
import { BlueStorageContext } from '../../blue_modules/storage-context';
import QRCodeComponent from '../../components/QRCodeComponent';
import alert from '../../components/Alert';
import { useTheme } from '../../components/themes';
import Button from '../../components/Button';
const LNDViewAdditionalInvoiceInformation = () => {
const { walletID } = useRoute().params;
@ -60,7 +61,7 @@ const LNDViewAdditionalInvoiceInformation = () => {
<BlueText>{loc.lndViewInvoice.open_direct_channel}</BlueText>
<BlueCopyTextToClipboard text={walletInfo.uris[0]} />
<View style={styles.share}>
<BlueButton
<Button
icon={{
name: 'share-alternative',
type: 'entypo',

View file

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

View file

@ -2,9 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, Text, Linking, StyleSheet, Image, ScrollView } from 'react-native';
import AsyncStorage from '@react-native-async-storage/async-storage';
import {
BlueButton,
BlueButtonLink,
BlueCard,
BlueLoading,
@ -17,6 +15,7 @@ import navigationStyle from '../../components/navigationStyle';
import Lnurl from '../../class/lnurl';
import loc from '../../loc';
import { SuccessView } from '../send/success';
import Button from '../../components/Button';
export default class LnurlPaySuccess extends Component {
constructor(props) {
@ -113,7 +112,7 @@ export default class LnurlPaySuccess extends Component {
<BlueCard>
{repeatable ? (
<BlueButton
<Button
onPress={() => {
this.props.navigation.navigate('ScanLndInvoiceRoot', {
screen: 'LnurlPay',
@ -127,7 +126,7 @@ export default class LnurlPaySuccess extends Component {
icon={{ name: 'refresh', type: 'font-awesome', color: '#9aa0aa' }}
/>
) : (
<BlueButton
<Button
onPress={() => {
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 { useNavigation, useRoute, useIsFocused } from '@react-navigation/native';
import loc from '../../loc';
import { BlueLoading, BlueText, BlueButton, BlueSpacing40 } from '../../BlueComponents';
import { BlueLoading, BlueText, BlueSpacing40 } from '../../BlueComponents';
import alert from '../../components/Alert';
import { openPrivacyDesktopSettings } from '../../class/camera';
import { isCameraAuthorizationStatusGranted } from '../../helpers/scan-qr';
@ -370,7 +370,7 @@ const ScanQRCode = () => {
value={backdoorText}
onChangeText={setBackdoorText}
/>
<BlueButton
<Button
title="OK"
testID="scanQrBackdoorOkButton"
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 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 { BlueStorageContext } from '../../blue_modules/storage-context';
import { requestCameraAuthorization } from '../../helpers/scan-qr';
@ -121,7 +121,7 @@ const IsItMyAddress = () => {
<BlueSpacing20 />
</>
)}
<BlueButton
<Button
disabled={address.trim().length === 0}
title={loc.is_it_my_address.check_address}
onPress={checkAddress}

View file

@ -1,9 +1,7 @@
import React, { useEffect, useState, useContext } from 'react';
import { Platform, View, Keyboard, StyleSheet, Switch, TouchableWithoutFeedback } from 'react-native';
import { useNavigation, useRoute } from '@react-navigation/native';
import {
BlueButton,
BlueButtonLink,
BlueDoneAndDismissKeyboardInputAccessory,
BlueFormLabel,
@ -18,6 +16,7 @@ import loc from '../../loc';
import { BlueStorageContext } from '../../blue_modules/storage-context';
import { requestCameraAuthorization } from '../../helpers/scan-qr';
import { useTheme } from '../../components/themes';
import Button from '../../components/Button';
const WalletsImport = () => {
const navigation = useNavigation();
@ -133,7 +132,7 @@ const WalletsImport = () => {
<BlueSpacing20 />
<View style={styles.center}>
<>
<BlueButton
<Button
disabled={importText.trim().length === 0}
title={loc.wallets.import_do_import}
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 { 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 WalletToImport from '../../components/WalletToImport';
import loc from '../../loc';
@ -11,6 +11,7 @@ import { HDLegacyP2PKHWallet, HDSegwitP2SHWallet, HDSegwitBech32Wallet } from '.
import { validateBip32 } from '../../class/wallet-import';
import debounce from '../../blue_modules/debounce';
import { useTheme } from '../../components/themes';
import Button from '../../components/Button';
const WRONG_PATH = 'WRONG_PATH';
const WALLET_FOUND = 'WALLET_FOUND';
@ -140,7 +141,7 @@ const ImportCustomDerivationPath = () => {
<View style={[styles.center, stylesHook.center]}>
<View style={styles.buttonContainer}>
<BlueButton
<Button
disabled={wallets[path]?.[selected] === undefined}
title={loc.wallets.import_do_import}
testID="ImportButton"

View file

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