fix: appy simple-import-sort plugin

This commit is contained in:
Ivan Vershigora 2024-05-20 10:54:13 +01:00
parent 227f9da67b
commit 642932d4a7
No known key found for this signature in database
GPG key ID: DCCF7FB5ED2CEBD7
260 changed files with 1283 additions and 1086 deletions

12
App.tsx
View file

@ -1,15 +1,17 @@
import 'react-native-gesture-handler'; // should be on top
import { NavigationContainer } from '@react-navigation/native';
import React from 'react';
import { useColorScheme } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { navigationRef } from './NavigationService';
import { BlueDefaultTheme, BlueDarkTheme } from './components/themes';
import { NavigationProvider } from './components/NavigationProvider';
import { BlueStorageProvider } from './blue_modules/storage-context';
import { SettingsProvider } from './components/Context/SettingsContext';
import { LargeScreenProvider } from './components/Context/LargeScreenProvider';
import { SettingsProvider } from './components/Context/SettingsContext';
import { NavigationProvider } from './components/NavigationProvider';
import { BlueDarkTheme, BlueDefaultTheme } from './components/themes';
import MasterView from './navigation/MasterView';
import { navigationRef } from './NavigationService';
const App = () => {
const colorScheme = useColorScheme();

View file

@ -1,10 +1,12 @@
/* eslint react/prop-types: "off", react-native/no-inline-styles: "off" */
import React, { Component, forwardRef } from 'react';
import AsyncStorage from '@react-native-async-storage/async-storage';
import Clipboard from '@react-native-clipboard/clipboard';
import PropTypes from 'prop-types';
import { Icon, Text } from 'react-native-elements';
import React, { Component, forwardRef } from 'react';
import {
ActivityIndicator,
Dimensions,
I18nManager,
InputAccessoryView,
Keyboard,
KeyboardAvoidingView,
@ -13,13 +15,12 @@ import {
TextInput,
TouchableOpacity,
View,
I18nManager,
} from 'react-native';
import Clipboard from '@react-native-clipboard/clipboard';
import NetworkTransactionFees, { NetworkTransactionFee, NetworkTransactionFeeType } from './models/networkTransactionFees';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { Icon, Text } from 'react-native-elements';
import { BlueCurrentTheme, useTheme } from './components/themes';
import loc, { formatStringAddTwoWhiteSpaces } from './loc';
import NetworkTransactionFees, { NetworkTransactionFee, NetworkTransactionFeeType } from './models/networkTransactionFees';
const { height, width } = Dimensions.get('window');
const aspectRatio = height / width;

View file

@ -1,7 +1,9 @@
import 'react-native-gesture-handler'; // should be on top
import React, { Suspense, lazy } from 'react';
import MainRoot from './navigation';
import React, { lazy, Suspense } from 'react';
import { useStorage } from './blue_modules/storage-context';
import MainRoot from './navigation';
const CompanionDelegates = lazy(() => import('./components/CompanionDelegates'));
const MasterView = () => {

View file

@ -1,4 +1,4 @@
import { createNavigationContainerRef, ParamListBase, NavigationAction } from '@react-navigation/native';
import { createNavigationContainerRef, NavigationAction, ParamListBase } from '@react-navigation/native';
export const navigationRef = createNavigationContainerRef<ParamListBase>();

View file

@ -3,11 +3,12 @@ import BigNumber from 'bignumber.js';
import * as bitcoin from 'bitcoinjs-lib';
import { Alert } from 'react-native';
import DefaultPreference from 'react-native-default-preference';
import RNFS from 'react-native-fs';
import Realm from 'realm';
import { LegacyWallet, SegwitBech32Wallet, SegwitP2SHWallet, TaprootWallet } from '../class';
import presentAlert from '../components/Alert';
import loc from '../loc';
import RNFS from 'react-native-fs';
const ElectrumClient = require('electrum-client');
const net = require('net');

View file

@ -1,5 +1,6 @@
import { getUniqueId } from 'react-native-device-info';
import Bugsnag from '@bugsnag/react-native';
import { getUniqueId } from 'react-native-device-info';
import { BlueApp as BlueAppClass } from '../class';
const BlueApp = BlueAppClass.getInstance();

View file

@ -1,7 +1,8 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import BigNumber from 'bignumber.js';
import DefaultPreference from 'react-native-default-preference';
import * as RNLocalize from 'react-native-localize';
import BigNumber from 'bignumber.js';
import { FiatUnit, FiatUnitType, getFiatRate } from '../models/fiatUnit';
const PREFERRED_CURRENCY_STORAGE_KEY = 'preferredCurrency';
@ -219,23 +220,23 @@ function _setSkipUpdateExchangeRate(): void {
}
export {
updateExchangeRate,
initCurrencyDaemon,
satoshiToLocalCurrency,
fiatToBTC,
satoshiToBTC,
BTCToLocalCurrency,
setPreferredCurrency,
getPreferredCurrency,
btcToSatoshi,
getCurrencySymbol,
_setPreferredFiatCurrency,
_setExchangeRate,
_setPreferredFiatCurrency,
_setSkipUpdateExchangeRate,
PREFERRED_CURRENCY_STORAGE_KEY,
BTCToLocalCurrency,
btcToSatoshi,
EXCHANGE_RATES_STORAGE_KEY,
fiatToBTC,
getCurrencySymbol,
getPreferredCurrency,
initCurrencyDaemon,
isRateOutdated,
LAST_UPDATED,
mostRecentFetchedRate,
isRateOutdated,
PREFERRED_CURRENCY_STORAGE_KEY,
restoreSavedPreferredFiatCurrencyAndExchangeFromStorage,
satoshiToBTC,
satoshiToLocalCurrency,
setPreferredCurrency,
updateExchangeRate,
};

View file

@ -1,7 +1,7 @@
import { isTablet as checkIsTablet, getDeviceType } from 'react-native-device-info';
import { getDeviceType, isTablet as checkIsTablet } from 'react-native-device-info';
const isTablet: boolean = checkIsTablet();
const isDesktop: boolean = getDeviceType() === 'Desktop';
const isHandset: boolean = getDeviceType() === 'Handset';
export { isDesktop, isTablet, isHandset };
export { isDesktop, isHandset, isTablet };

View file

@ -1,12 +1,13 @@
import { Alert, Linking, PermissionsAndroid, Platform } from 'react-native';
import RNFS from 'react-native-fs';
import Share from 'react-native-share';
import LocalQRCode from '@remobile/react-native-qrcode-local-image';
import loc from '../loc';
import { Alert, Linking, PermissionsAndroid, Platform } from 'react-native';
import DocumentPicker from 'react-native-document-picker';
import RNFS from 'react-native-fs';
import { launchImageLibrary } from 'react-native-image-picker';
import { isDesktop } from './environment';
import Share from 'react-native-share';
import presentAlert from '../components/Alert';
import loc from '../loc';
import { isDesktop } from './environment';
import { readFile } from './react-native-bw-file-access';
const _sanitizeFileName = (fileName: string) => {

View file

@ -1,5 +1,5 @@
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
import DeviceInfo, { PowerState } from 'react-native-device-info';
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
// Define a const enum for HapticFeedbackTypes
export const enum HapticFeedbackTypes {

View file

@ -5,12 +5,12 @@
* @see https://github.com/bitcoinjs/tiny-secp256k1/issues/84#issuecomment-1185682315
* @see https://github.com/bitcoinjs/bitcoinjs-lib/issues/1781
*/
import createHash from 'create-hash';
import { createHmac } from 'crypto';
import * as necc from '@noble/secp256k1';
import { TinySecp256k1Interface } from 'ecpair/src/ecpair';
import { TinySecp256k1Interface as TinySecp256k1InterfaceBIP32 } from 'bip32/types/bip32';
import { XOnlyPointAddTweakResult } from 'bitcoinjs-lib/src/types';
import createHash from 'create-hash';
import { createHmac } from 'crypto';
import { TinySecp256k1Interface } from 'ecpair/src/ecpair';
export interface TinySecp256k1InterfaceExtended {
pointMultiply(p: Uint8Array, tweak: Uint8Array, compressed?: boolean): Uint8Array | null;

View file

@ -1,11 +1,12 @@
import PushNotificationIOS from '@react-native-community/push-notification-ios';
import { Platform, findNodeHandle } from 'react-native';
import Frisbee from 'frisbee';
import { getApplicationName, getVersion, getSystemName, getSystemVersion, hasGmsSync, hasHmsSync } from 'react-native-device-info';
import AsyncStorage from '@react-native-async-storage/async-storage';
import loc from '../loc';
import PushNotificationIOS from '@react-native-community/push-notification-ios';
import Frisbee from 'frisbee';
import { findNodeHandle, Platform } from 'react-native';
import { getApplicationName, getSystemName, getSystemVersion, getVersion, hasGmsSync, hasHmsSync } from 'react-native-device-info';
import { requestNotifications } from 'react-native-permissions';
import PushNotification from 'react-native-push-notification';
import loc from '../loc';
import ActionSheet from '../screen/ActionSheet';
import { groundControlUri } from './constants';

View file

@ -1,6 +1,6 @@
// @ts-ignore: Ignore
import type { Element } from 'react';
import { Text, TouchableNativeFeedback, TouchableWithoutFeedback, View, findNodeHandle, UIManager } from 'react-native';
import { findNodeHandle, Text, TouchableNativeFeedback, TouchableWithoutFeedback, UIManager, View } from 'react-native';
type PopupMenuItem = { id?: any; label: string };
type OnPopupMenuItemSelect = (selectedPopupMenuItem: PopupMenuItem) => void;
@ -28,5 +28,5 @@ function showPopupMenu(
);
}
export type { PopupMenuItem, OnPopupMenuItemSelect, PopupMenuOptions };
export type { OnPopupMenuItemSelect, PopupMenuItem, PopupMenuOptions };
export default showPopupMenu;

View file

@ -1,8 +1,9 @@
import { Platform } from 'react-native';
import prompt from '../helpers/prompt';
import loc from '../loc';
import { BlueApp as BlueAppClass } from '../class/';
import prompt from '../helpers/prompt';
import { showKeychainWipeAlert } from '../hooks/useBiometrics';
import loc from '../loc';
const BlueApp = BlueAppClass.getInstance();
// If attempt reaches 10, a wipe keychain option will be provided to the user.

View file

@ -1,14 +1,15 @@
import React, { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
import { startAndDecrypt } from './start-and-decrypt';
import { InteractionManager } from 'react-native';
import A from '../blue_modules/analytics';
import Notifications from '../blue_modules/notifications';
import { LegacyWallet, TTXMetadata, WatchOnlyWallet, BlueApp as BlueAppClass, TCounterpartyMetadata } from '../class';
import { BlueApp as BlueAppClass, LegacyWallet, TCounterpartyMetadata, TTXMetadata, WatchOnlyWallet } from '../class';
import type { TWallet } from '../class/wallets/types';
import presentAlert from '../components/Alert';
import loc from '../loc';
import * as BlueElectrum from './BlueElectrum';
import triggerHapticFeedback, { HapticFeedbackTypes } from './hapticFeedback';
import A from '../blue_modules/analytics';
import { InteractionManager } from 'react-native';
import { startAndDecrypt } from './start-and-decrypt';
const BlueApp = BlueAppClass.getInstance();

View file

@ -1,29 +1,30 @@
import { ExtendedTransaction, Transaction, TWallet } from './wallets/types';
import RNSecureKeyStore, { ACCESSIBLE } from 'react-native-secure-key-store';
import AsyncStorage from '@react-native-async-storage/async-storage';
import * as encryption from '../blue_modules/encryption';
import createHash from 'create-hash';
import DefaultPreference from 'react-native-default-preference';
import RNFS from 'react-native-fs';
import Realm from 'realm';
import Keychain from 'react-native-keychain';
import { randomBytes } from './rng';
import RNSecureKeyStore, { ACCESSIBLE } from 'react-native-secure-key-store';
import Realm from 'realm';
import * as encryption from '../blue_modules/encryption';
import presentAlert from '../components/Alert';
import { SegwitBech32Wallet } from './wallets/segwit-bech32-wallet';
import { SegwitP2SHWallet } from './wallets/segwit-p2sh-wallet';
import { WatchOnlyWallet } from './wallets/watch-only-wallet';
import { HDLegacyP2PKHWallet } from './wallets/hd-legacy-p2pkh-wallet';
import { HDSegwitP2SHWallet } from './wallets/hd-segwit-p2sh-wallet';
import { HDSegwitBech32Wallet } from './wallets/hd-segwit-bech32-wallet';
import { randomBytes } from './rng';
import { HDAezeedWallet } from './wallets/hd-aezeed-wallet';
import { HDLegacyBreadwalletWallet } from './wallets/hd-legacy-breadwallet-wallet';
import { HDLegacyElectrumSeedP2PKHWallet } from './wallets/hd-legacy-electrum-seed-p2pkh-wallet';
import { HDLegacyP2PKHWallet } from './wallets/hd-legacy-p2pkh-wallet';
import { HDSegwitBech32Wallet } from './wallets/hd-segwit-bech32-wallet';
import { HDSegwitElectrumSeedP2WPKHWallet } from './wallets/hd-segwit-electrum-seed-p2wpkh-wallet';
import { MultisigHDWallet } from './wallets/multisig-hd-wallet';
import { HDAezeedWallet } from './wallets/hd-aezeed-wallet';
import { LightningLdkWallet } from './wallets/lightning-ldk-wallet';
import { SLIP39LegacyP2PKHWallet, SLIP39SegwitBech32Wallet, SLIP39SegwitP2SHWallet } from './wallets/slip39-wallets';
import { LightningCustodianWallet } from './wallets/lightning-custodian-wallet';
import { HDSegwitP2SHWallet } from './wallets/hd-segwit-p2sh-wallet';
import { LegacyWallet } from './wallets/legacy-wallet';
import DefaultPreference from 'react-native-default-preference';
import { LightningCustodianWallet } from './wallets/lightning-custodian-wallet';
import { LightningLdkWallet } from './wallets/lightning-ldk-wallet';
import { MultisigHDWallet } from './wallets/multisig-hd-wallet';
import { SegwitBech32Wallet } from './wallets/segwit-bech32-wallet';
import { SegwitP2SHWallet } from './wallets/segwit-p2sh-wallet';
import { SLIP39LegacyP2PKHWallet, SLIP39SegwitBech32Wallet, SLIP39SegwitP2SHWallet } from './wallets/slip39-wallets';
import { ExtendedTransaction, Transaction, TWallet } from './wallets/types';
import { WatchOnlyWallet } from './wallets/watch-only-wallet';
let usedBucketNum: boolean | number = false;
let savingInProgress = 0; // its both a flag and a counter of attempts to write to disk

View file

@ -1,6 +1,7 @@
import { Linking, Alert } from 'react-native';
import loc from '../loc';
import { Alert, Linking } from 'react-native';
import { isDesktop } from '../blue_modules/environment';
import loc from '../loc';
export const openPrivacyDesktopSettings = () => {
if (isDesktop) {

View file

@ -1,6 +1,7 @@
import BIP47Factory from '@spsina/bip47';
import { TWallet } from './wallets/types';
import ecc from '../blue_modules/noble_ecc';
import { TWallet } from './wallets/types';
export class ContactList {
private _wallet: TWallet;

View file

@ -1,9 +1,9 @@
import * as bitcoin from 'bitcoinjs-lib';
import BigNumber from 'bignumber.js';
import * as bitcoin from 'bitcoinjs-lib';
import * as BlueElectrum from '../blue_modules/BlueElectrum';
import { HDSegwitBech32Wallet } from './wallets/hd-segwit-bech32-wallet';
import { SegwitBech32Wallet } from './wallets/segwit-bech32-wallet';
import * as BlueElectrum from '../blue_modules/BlueElectrum';
/**
* Represents transaction of a BIP84 wallet.

View file

@ -1,21 +1,21 @@
export * from './wallets/abstract-wallet';
export * from './wallets/legacy-wallet';
export * from './wallets/segwit-bech32-wallet';
export * from './wallets/taproot-wallet';
export * from './wallets/segwit-p2sh-wallet';
export * from './wallets/hd-segwit-p2sh-wallet';
export * from './wallets/hd-legacy-breadwallet-wallet';
export * from './wallets/hd-legacy-p2pkh-wallet';
export * from './wallets/watch-only-wallet';
export * from './wallets/lightning-custodian-wallet';
export * from './wallets/lightning-ldk-wallet';
export * from './wallets/abstract-hd-wallet';
export * from './wallets/hd-segwit-bech32-wallet';
export * from './wallets/hd-legacy-electrum-seed-p2pkh-wallet';
export * from './wallets/hd-segwit-electrum-seed-p2wpkh-wallet';
export * from './wallets/hd-aezeed-wallet';
export * from './wallets/multisig-hd-wallet';
export * from './wallets/slip39-wallets';
export * from './blue-app';
export * from './hd-segwit-bech32-transaction';
export * from './multisig-cosigner';
export * from './blue-app';
export * from './wallets/abstract-hd-wallet';
export * from './wallets/abstract-wallet';
export * from './wallets/hd-aezeed-wallet';
export * from './wallets/hd-legacy-breadwallet-wallet';
export * from './wallets/hd-legacy-electrum-seed-p2pkh-wallet';
export * from './wallets/hd-legacy-p2pkh-wallet';
export * from './wallets/hd-segwit-bech32-wallet';
export * from './wallets/hd-segwit-electrum-seed-p2wpkh-wallet';
export * from './wallets/hd-segwit-p2sh-wallet';
export * from './wallets/legacy-wallet';
export * from './wallets/lightning-custodian-wallet';
export * from './wallets/lightning-ldk-wallet';
export * from './wallets/multisig-hd-wallet';
export * from './wallets/segwit-bech32-wallet';
export * from './wallets/segwit-p2sh-wallet';
export * from './wallets/slip39-wallets';
export * from './wallets/taproot-wallet';
export * from './wallets/watch-only-wallet';

View file

@ -1,10 +1,10 @@
import { bech32 } from 'bech32';
import bolt11 from 'bolt11';
import { parse } from 'url'; // eslint-disable-line n/no-deprecated-api
import { createHmac } from 'crypto';
import secp256k1 from 'secp256k1';
import CryptoJS from 'crypto-js';
import createHash from 'create-hash';
import { createHmac } from 'crypto';
import CryptoJS from 'crypto-js';
import secp256k1 from 'secp256k1';
import { parse } from 'url'; // eslint-disable-line n/no-deprecated-api
const ONION_REGEX = /^(http:\/\/[^/:@]+\.onion(?::\d{1,5})?)(\/.*)?$/; // regex for onion URL

View file

@ -1,7 +1,8 @@
import b58 from 'bs58check';
import { MultisigHDWallet } from './wallets/multisig-hd-wallet';
import BIP32Factory from 'bip32';
import b58 from 'bs58check';
import ecc from '../blue_modules/noble_ecc';
import { MultisigHDWallet } from './wallets/multisig-hd-wallet';
const bip32 = BIP32Factory(ecc);
export class MultisigCosigner {

View file

@ -1,8 +1,9 @@
import * as bitcoin from 'bitcoinjs-lib';
import presentAlert from '../components/Alert';
import { ECPairFactory } from 'ecpair';
import ecc from '../blue_modules/noble_ecc';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../blue_modules/hapticFeedback';
import ecc from '../blue_modules/noble_ecc';
import presentAlert from '../components/Alert';
const ECPair = ECPairFactory(ecc);
const delay = milliseconds => new Promise(resolve => setTimeout(resolve, milliseconds));

View file

@ -1,9 +1,8 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import SHA256 from 'crypto-js/sha256';
import AES from 'crypto-js/aes';
import ENCHEX from 'crypto-js/enc-hex';
import ENCUTF8 from 'crypto-js/enc-utf8';
import AES from 'crypto-js/aes';
import SHA256 from 'crypto-js/sha256';
export default class SyncedAsyncStorage {
defaultBaseUrl = 'https://bytes-store.herokuapp.com';

View file

@ -1,18 +1,18 @@
import { LegacyWallet } from './wallets/legacy-wallet';
import { HDSegwitP2SHWallet } from './wallets/hd-segwit-p2sh-wallet';
import { LightningCustodianWallet } from './wallets/lightning-custodian-wallet'; // Missing import
import { HDLegacyBreadwalletWallet } from './wallets/hd-legacy-breadwallet-wallet';
import { HDLegacyP2PKHWallet } from './wallets/hd-legacy-p2pkh-wallet';
import { WatchOnlyWallet } from './wallets/watch-only-wallet';
import { HDSegwitBech32Wallet } from './wallets/hd-segwit-bech32-wallet';
import { SegwitBech32Wallet } from './wallets/segwit-bech32-wallet';
import { HDLegacyElectrumSeedP2PKHWallet } from './wallets/hd-legacy-electrum-seed-p2pkh-wallet';
import { HDSegwitElectrumSeedP2WPKHWallet } from './wallets/hd-segwit-electrum-seed-p2wpkh-wallet';
import { MultisigHDWallet } from './wallets/multisig-hd-wallet';
import { HDAezeedWallet } from './wallets/hd-aezeed-wallet';
import { LightningLdkWallet } from './wallets/lightning-ldk-wallet';
import { SLIP39LegacyP2PKHWallet, SLIP39SegwitP2SHWallet, SLIP39SegwitBech32Wallet } from './wallets/slip39-wallets';
import { useTheme } from '../components/themes';
import { HDAezeedWallet } from './wallets/hd-aezeed-wallet';
import { HDLegacyBreadwalletWallet } from './wallets/hd-legacy-breadwallet-wallet';
import { HDLegacyElectrumSeedP2PKHWallet } from './wallets/hd-legacy-electrum-seed-p2pkh-wallet';
import { HDLegacyP2PKHWallet } from './wallets/hd-legacy-p2pkh-wallet';
import { HDSegwitBech32Wallet } from './wallets/hd-segwit-bech32-wallet';
import { HDSegwitElectrumSeedP2WPKHWallet } from './wallets/hd-segwit-electrum-seed-p2wpkh-wallet';
import { HDSegwitP2SHWallet } from './wallets/hd-segwit-p2sh-wallet';
import { LegacyWallet } from './wallets/legacy-wallet';
import { LightningCustodianWallet } from './wallets/lightning-custodian-wallet'; // Missing import
import { LightningLdkWallet } from './wallets/lightning-ldk-wallet';
import { MultisigHDWallet } from './wallets/multisig-hd-wallet';
import { SegwitBech32Wallet } from './wallets/segwit-bech32-wallet';
import { SLIP39LegacyP2PKHWallet, SLIP39SegwitBech32Wallet, SLIP39SegwitP2SHWallet } from './wallets/slip39-wallets';
import { WatchOnlyWallet } from './wallets/watch-only-wallet';
export default class WalletGradient {
static hdSegwitP2SHWallet: string[] = ['#007AFF', '#0040FF'];

View file

@ -1,6 +1,7 @@
import wif from 'wif';
import bip38 from 'bip38';
import wif from 'wif';
import loc from '../loc';
import {
HDAezeedWallet,
HDLegacyBreadwalletWallet,
@ -13,17 +14,16 @@ import {
LightningCustodianWallet,
LightningLdkWallet,
MultisigHDWallet,
SegwitBech32Wallet,
SegwitP2SHWallet,
SLIP39LegacyP2PKHWallet,
SLIP39SegwitBech32Wallet,
SLIP39SegwitP2SHWallet,
SegwitBech32Wallet,
SegwitP2SHWallet,
WatchOnlyWallet,
} from '.';
import type { TWallet } from './wallets/types';
import loc from '../loc';
import bip39WalletFormats from './bip39_wallet_formats.json'; // https://github.com/spesmilo/electrum/blob/master/electrum/bip39_wallet_formats.json
import bip39WalletFormatsBlueWallet from './bip39_wallet_formats_bluewallet.json';
import type { TWallet } from './wallets/types';
// https://github.com/bitcoinjs/bip32/blob/master/ts-src/bip32.ts#L43
export const validateBip32 = (path: string) => path.match(/^(m\/)?(\d+'?\/)*\d+'?$/) !== null;

View file

@ -1,10 +1,11 @@
/* eslint react/prop-types: "off", @typescript-eslint/ban-ts-comment: "off", camelcase: "off" */
import BIP47Factory, { BIP47Interface } from '@spsina/bip47';
import assert from 'assert';
import BigNumber from 'bignumber.js';
import BIP32Factory, { BIP32Interface } from 'bip32';
import * as bip39 from 'bip39';
import * as bitcoin from 'bitcoinjs-lib';
import { Transaction as BTransaction, Psbt } from 'bitcoinjs-lib';
import { Psbt, Transaction as BTransaction } from 'bitcoinjs-lib';
import b58 from 'bs58check';
import { CoinSelectReturnInput } from 'coinselect';
import { ECPairFactory } from 'ecpair';
@ -16,7 +17,6 @@ import ecc from '../../blue_modules/noble_ecc';
import { randomBytes } from '../rng';
import { AbstractHDWallet } from './abstract-hd-wallet';
import { CreateTransactionResult, CreateTransactionTarget, CreateTransactionUtxo, Transaction, Utxo } from './types';
import assert from 'assert';
const ECPair = ECPairFactory(ecc);
const bip32 = BIP32Factory(ecc);

View file

@ -1,7 +1,8 @@
import { BIP32Interface } from 'bip32';
import * as bip39 from 'bip39';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import * as bip39custom from '../../blue_modules/bip39';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import { LegacyWallet } from './legacy-wallet';
import { Transaction } from './types';

View file

@ -1,5 +1,6 @@
import b58 from 'bs58check';
import createHash from 'create-hash';
import { BitcoinUnit, Chain } from '../../models/bitcoinUnits';
import { CreateTransactionResult, CreateTransactionUtxo, Transaction, Utxo } from './types';

View file

@ -2,6 +2,7 @@ import { CipherSeed } from 'aezeed';
import BIP32Factory from 'bip32';
import * as bitcoin from 'bitcoinjs-lib';
import b58 from 'bs58check';
import ecc from '../../blue_modules/noble_ecc';
import { AbstractHDElectrumWallet } from './abstract-hd-electrum-wallet';

View file

@ -2,6 +2,7 @@ import BIP32Factory, { BIP32Interface } from 'bip32';
import * as bitcoinjs from 'bitcoinjs-lib';
import { Psbt } from 'bitcoinjs-lib';
import { CoinSelectReturnInput } from 'coinselect';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import { ElectrumHistory } from '../../blue_modules/BlueElectrum';
import ecc from '../../blue_modules/noble_ecc';

View file

@ -1,6 +1,7 @@
import BIP32Factory from 'bip32';
import * as bitcoin from 'bitcoinjs-lib';
import * as mn from 'electrum-mnemonic';
import ecc from '../../blue_modules/noble_ecc';
import { HDLegacyP2PKHWallet } from './hd-legacy-p2pkh-wallet';

View file

@ -1,6 +1,7 @@
import BIP32Factory, { BIP32Interface } from 'bip32';
import { Psbt } from 'bitcoinjs-lib';
import { CoinSelectReturnInput } from 'coinselect';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import ecc from '../../blue_modules/noble_ecc';
import { AbstractHDElectrumWallet } from './abstract-hd-electrum-wallet';

View file

@ -2,6 +2,7 @@ import BIP32Factory from 'bip32';
import * as bitcoin from 'bitcoinjs-lib';
import b58 from 'bs58check';
import * as mn from 'electrum-mnemonic';
import ecc from '../../blue_modules/noble_ecc';
import { HDSegwitBech32Wallet } from './hd-segwit-bech32-wallet';

View file

@ -3,6 +3,7 @@ import * as bitcoin from 'bitcoinjs-lib';
import { Psbt } from 'bitcoinjs-lib';
import b58 from 'bs58check';
import { CoinSelectReturnInput } from 'coinselect';
import ecc from '../../blue_modules/noble_ecc';
import { AbstractHDElectrumWallet } from './abstract-hd-electrum-wallet';

View file

@ -1,16 +1,16 @@
import BigNumber from 'bignumber.js';
import bitcoinMessage from 'bitcoinjs-message';
import { randomBytes } from '../rng';
import { AbstractWallet } from './abstract-wallet';
import { HDSegwitBech32Wallet } from '..';
import * as bitcoin from 'bitcoinjs-lib';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import bitcoinMessage from 'bitcoinjs-message';
import coinSelect, { CoinSelectOutput, CoinSelectReturnInput, CoinSelectTarget } from 'coinselect';
import coinSelectSplit from 'coinselect/split';
import { CreateTransactionResult, CreateTransactionTarget, CreateTransactionUtxo, Transaction, Utxo } from './types';
import { ECPairAPI, ECPairFactory, Signer } from 'ecpair';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import ecc from '../../blue_modules/noble_ecc';
import { HDSegwitBech32Wallet } from '..';
import { randomBytes } from '../rng';
import { AbstractWallet } from './abstract-wallet';
import { CreateTransactionResult, CreateTransactionTarget, CreateTransactionUtxo, Transaction, Utxo } from './types';
const ECPair: ECPairAPI = ECPairFactory(ecc);
bitcoin.initEccLib(ecc);

View file

@ -1,7 +1,8 @@
import { LegacyWallet } from './legacy-wallet';
import Frisbee from 'frisbee';
import bolt11 from 'bolt11';
import Frisbee from 'frisbee';
import { BitcoinUnit, Chain } from '../../models/bitcoinUnits';
import { LegacyWallet } from './legacy-wallet';
export class LightningCustodianWallet extends LegacyWallet {
static readonly type = 'lightningCustodianWallet';

View file

@ -3,6 +3,7 @@ import * as bitcoin from 'bitcoinjs-lib';
import bolt11 from 'bolt11';
import RNFS from 'react-native-fs';
import RnLdk from 'rn-ldk/src/index';
import presentAlert from '../../components/Alert';
import { BitcoinUnit, Chain } from '../../models/bitcoinUnits';
import { randomBytes } from '../rng';

View file

@ -7,6 +7,7 @@ import { CoinSelectReturnInput, CoinSelectTarget } from 'coinselect';
import createHash from 'create-hash';
import { ECPairFactory } from 'ecpair';
import * as mn from 'electrum-mnemonic';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import ecc from '../../blue_modules/noble_ecc';
import { decodeUR } from '../../blue_modules/ur';

View file

@ -1,9 +1,10 @@
import * as bitcoin from 'bitcoinjs-lib';
import { CoinSelectTarget } from 'coinselect';
import { ECPairFactory } from 'ecpair';
import ecc from '../../blue_modules/noble_ecc';
import { LegacyWallet } from './legacy-wallet';
import { CreateTransactionResult, CreateTransactionUtxo } from './types';
import { CoinSelectTarget } from 'coinselect';
const ECPair = ECPairFactory(ecc);

View file

@ -1,6 +1,7 @@
import * as bitcoin from 'bitcoinjs-lib';
import { CoinSelectTarget } from 'coinselect';
import { ECPairFactory } from 'ecpair';
import ecc from '../../blue_modules/noble_ecc';
import { LegacyWallet } from './legacy-wallet';
import { CreateTransactionResult, CreateTransactionUtxo } from './types';

View file

@ -1,10 +1,10 @@
import createHash from 'create-hash';
import slip39 from 'slip39';
import { WORD_LIST } from 'slip39/dist/slip39_helper';
import createHash from 'create-hash';
import { HDLegacyP2PKHWallet } from './hd-legacy-p2pkh-wallet';
import { HDSegwitP2SHWallet } from './hd-segwit-p2sh-wallet';
import { HDSegwitBech32Wallet } from './hd-segwit-bech32-wallet';
import { HDSegwitP2SHWallet } from './hd-segwit-p2sh-wallet';
type TWalletThis = Omit<HDLegacyP2PKHWallet | HDSegwitP2SHWallet | HDSegwitBech32Wallet, 'secret'> & {
secret: string[];

View file

@ -1,4 +1,5 @@
import * as bitcoin from 'bitcoinjs-lib';
import { SegwitBech32Wallet } from './segwit-bech32-wallet';
export class TaprootWallet extends SegwitBech32Wallet {

View file

@ -1,5 +1,7 @@
import bitcoin from 'bitcoinjs-lib';
import { CoinSelectOutput, CoinSelectReturnInput, CoinSelectUtxo } from 'coinselect';
import { BitcoinUnit } from '../../models/bitcoinUnits';
import { HDAezeedWallet } from './hd-aezeed-wallet';
import { HDLegacyBreadwalletWallet } from './hd-legacy-breadwallet-wallet';
import { HDLegacyElectrumSeedP2PKHWallet } from './hd-legacy-electrum-seed-p2pkh-wallet';
@ -15,7 +17,6 @@ import { SegwitBech32Wallet } from './segwit-bech32-wallet';
import { SegwitP2SHWallet } from './segwit-p2sh-wallet';
import { SLIP39LegacyP2PKHWallet, SLIP39SegwitBech32Wallet, SLIP39SegwitP2SHWallet } from './slip39-wallets';
import { WatchOnlyWallet } from './watch-only-wallet';
import { BitcoinUnit } from '../../models/bitcoinUnits';
export type Utxo = {
// Returned by BlueElectrum

View file

@ -1,5 +1,6 @@
import BIP32Factory from 'bip32';
import * as bitcoin from 'bitcoinjs-lib';
import ecc from '../../blue_modules/noble_ecc';
import { AbstractWallet } from './abstract-wallet';
import { HDLegacyP2PKHWallet } from './hd-legacy-p2pkh-wallet';

View file

@ -1,9 +1,10 @@
import React from 'react';
import { Image, Keyboard, Text, StyleSheet, TextInput, TouchableOpacity, View } from 'react-native';
import loc from '../loc';
import { scanQrHelper } from '../helpers/scan-qr';
import { useTheme } from './themes';
import { useNavigation } from '@react-navigation/native';
import React from 'react';
import { Image, Keyboard, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
import { scanQrHelper } from '../helpers/scan-qr';
import loc from '../loc';
import { useTheme } from './themes';
interface AddressInputProps {
isLoading?: boolean;

View file

@ -1,6 +1,7 @@
import { Alert as RNAlert } from 'react-native';
import loc from '../loc';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../blue_modules/hapticFeedback';
import loc from '../loc';
export enum AlertType {
Alert,

View file

@ -1,16 +1,11 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import BigNumber from 'bignumber.js';
import { Badge, Icon, Text } from 'react-native-elements';
import { Image, LayoutAnimation, Pressable, StyleSheet, TextInput, TouchableOpacity, TouchableWithoutFeedback, View } from 'react-native';
import dayjs from 'dayjs';
import localizedFormat from 'dayjs/plugin/localizedFormat';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Image, LayoutAnimation, Pressable, StyleSheet, TextInput, TouchableOpacity, TouchableWithoutFeedback, View } from 'react-native';
import { Badge, Icon, Text } from 'react-native-elements';
import confirm from '../helpers/confirm';
import { BitcoinUnit } from '../models/bitcoinUnits';
import loc, { formatBalanceWithoutSuffix, formatBalancePlain, removeTrailingZeros } from '../loc';
import { BlueText } from '../BlueComponents';
import { useTheme } from './themes';
import {
fiatToBTC,
getCurrencySymbol,
@ -19,6 +14,11 @@ import {
satoshiToBTC,
updateExchangeRate,
} from '../blue_modules/currency';
import { BlueText } from '../BlueComponents';
import confirm from '../helpers/confirm';
import loc, { formatBalancePlain, formatBalanceWithoutSuffix, removeTrailingZeros } from '../loc';
import { BitcoinUnit } from '../models/bitcoinUnits';
import { useTheme } from './themes';
dayjs.extend(localizedFormat);

View file

@ -1,7 +1,8 @@
/* eslint react/prop-types: "off", react-native/no-inline-styles: "off" */
import { StyleSheet, Pressable, View, Keyboard } from 'react-native';
import { Text, Icon } from 'react-native-elements';
import React, { useState } from 'react';
import { Keyboard, Pressable, StyleSheet, View } from 'react-native';
import { Icon, Text } from 'react-native-elements';
import loc from '../loc';
import { useTheme } from './themes';

View file

@ -1,10 +1,11 @@
import React from 'react';
import { StyleSheet, Platform, useWindowDimensions, View } from 'react-native';
import { Platform, StyleSheet, useWindowDimensions, View } from 'react-native';
import Modal from 'react-native-modal';
import { BlueSpacing10 } from '../BlueComponents';
import loc from '../loc';
import { useTheme } from './themes';
import Button from './Button';
import { useTheme } from './themes';
const styles = StyleSheet.create({
root: {

View file

@ -1,6 +1,7 @@
import React, { forwardRef } from 'react';
import { TouchableOpacity, View, Text, StyleSheet, StyleProp, ViewStyle } from 'react-native';
import { StyleProp, StyleSheet, Text, TouchableOpacity, View, ViewStyle } from 'react-native';
import { Icon } from 'react-native-elements';
import { useTheme } from './themes';
// Define an interface for the props

View file

@ -1,5 +1,5 @@
import React from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { Avatar } from 'react-native-elements';
import loc from '../loc';

View file

@ -1,19 +1,21 @@
import 'react-native-gesture-handler'; // should be on top
import React, { useEffect, useRef, useCallback, lazy, Suspense } from 'react';
import { AppState, NativeModules, NativeEventEmitter, Linking, Platform, UIManager, AppStateStatus } from 'react-native';
import { CommonActions } from '@react-navigation/native';
import { navigationRef } from '../NavigationService';
import { Chain } from '../models/bitcoinUnits';
import DeeplinkSchemaMatch from '../class/deeplink-schema-match';
import loc from '../loc';
import BlueClipboard from '../blue_modules/clipboard';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../blue_modules/hapticFeedback';
import { updateExchangeRate } from '../blue_modules/currency';
import React, { lazy, Suspense, useCallback, useEffect, useRef } from 'react';
import { AppState, AppStateStatus, Linking, NativeEventEmitter, NativeModules, Platform, UIManager } from 'react-native';
import A from '../blue_modules/analytics';
import BlueClipboard from '../blue_modules/clipboard';
import { updateExchangeRate } from '../blue_modules/currency';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../blue_modules/hapticFeedback';
import Notifications from '../blue_modules/notifications';
import { useStorage } from '../blue_modules/storage-context';
import { LightningCustodianWallet } from '../class';
import DeeplinkSchemaMatch from '../class/deeplink-schema-match';
import loc from '../loc';
import { Chain } from '../models/bitcoinUnits';
import { navigationRef } from '../NavigationService';
import ActionSheet from '../screen/ActionSheet';
import Notifications from '../blue_modules/notifications';
const MenuElements = lazy(() => import('../components/MenuElements'));
const DeviceQuickActions = lazy(() => import('../components/DeviceQuickActions'));

View file

@ -1,5 +1,6 @@
import React, { createContext, useState, useEffect, useMemo, ReactNode } from 'react';
import React, { createContext, ReactNode, useEffect, useMemo, useState } from 'react';
import { Dimensions } from 'react-native';
import { isDesktop, isTablet } from '../../blue_modules/environment';
interface ILargeScreenContext {

View file

@ -1,18 +1,19 @@
import React, { createContext, useState, useContext, useEffect, useMemo, useCallback } from 'react';
import { useAsyncStorage } from '@react-native-async-storage/async-storage';
import { FiatUnit, TFiatUnit } from '../../models/fiatUnit';
import { GROUP_IO_BLUEWALLET, getPreferredCurrency, initCurrencyDaemon } from '../../blue_modules/currency';
import { BlueApp } from '../../class';
import presentAlert from '../Alert';
import { STORAGE_KEY, saveLanguage } from '../../loc';
import { useStorage } from '../../blue_modules/storage-context';
import { isBalanceDisplayAllowed, setBalanceDisplayAllowed } from '../WidgetCommunication';
import { clearUseURv1, isURv1Enabled, setUseURv1 } from '../../blue_modules/ur';
import BlueClipboard from '../../blue_modules/clipboard';
import { getIsHandOffUseEnabled, setIsHandOffUseEnabled } from '../HandOffComponent';
import { getEnabled as getIsDeviceQuickActionsEnabled, setEnabled as setIsDeviceQuickActionsEnabled } from '..//DeviceQuickActions';
import React, { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';
import DefaultPreference from 'react-native-default-preference';
import BlueClipboard from '../../blue_modules/clipboard';
import { getPreferredCurrency, GROUP_IO_BLUEWALLET, initCurrencyDaemon } from '../../blue_modules/currency';
import { useStorage } from '../../blue_modules/storage-context';
import { clearUseURv1, isURv1Enabled, setUseURv1 } from '../../blue_modules/ur';
import { BlueApp } from '../../class';
import { saveLanguage, STORAGE_KEY } from '../../loc';
import { FiatUnit, TFiatUnit } from '../../models/fiatUnit';
import { getEnabled as getIsDeviceQuickActionsEnabled, setEnabled as setIsDeviceQuickActionsEnabled } from '..//DeviceQuickActions';
import presentAlert from '../Alert';
import { getIsHandOffUseEnabled, setIsHandOffUseEnabled } from '../HandOffComponent';
import { isBalanceDisplayAllowed, setBalanceDisplayAllowed } from '../WidgetCommunication';
interface SettingsContextType {
preferredFiatCurrency: TFiatUnit;
setPreferredFiatCurrencyStorage: (currency: TFiatUnit) => Promise<void>;

View file

@ -1,8 +1,9 @@
import Clipboard from '@react-native-clipboard/clipboard';
import React, { useState, useEffect, forwardRef } from 'react';
import { View, TouchableOpacity, Animated, StyleSheet } from 'react-native';
import loc from '../loc';
import React, { forwardRef, useEffect, useState } from 'react';
import { Animated, StyleSheet, TouchableOpacity, View } from 'react-native';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../blue_modules/hapticFeedback';
import loc from '../loc';
type CopyTextToClipboardProps = {
text: string;

View file

@ -1,8 +1,9 @@
import Clipboard from '@react-native-clipboard/clipboard';
import React from 'react';
import { TouchableOpacity, Text, StyleSheet } from 'react-native';
import loc from '../loc';
import { StyleSheet, Text, TouchableOpacity } from 'react-native';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../blue_modules/hapticFeedback';
import loc from '../loc';
type CopyToClipboardButtonProps = {
stringToCopy: string;

View file

@ -1,15 +1,16 @@
import { useContext, useEffect } from 'react';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { CommonActions } from '@react-navigation/native';
import { useContext, useEffect } from 'react';
import { DeviceEventEmitter, Linking, Platform } from 'react-native';
import QuickActions from 'react-native-quick-actions';
import * as NavigationService from '../NavigationService';
import { BlueStorageContext } from '../blue_modules/storage-context';
import { formatBalance } from '../loc';
import DeeplinkSchemaMatch from '../class/deeplink-schema-match';
import { TWallet } from '../class/wallets/types';
import useOnAppLaunch from '../hooks/useOnAppLaunch';
import { useSettings } from '../components/Context/SettingsContext';
import useOnAppLaunch from '../hooks/useOnAppLaunch';
import { formatBalance } from '../loc';
import * as NavigationService from '../NavigationService';
const DeviceQuickActionsStorageKey = 'DeviceQuickActionsEnabled';

View file

@ -1,11 +1,12 @@
import React, { Component } from 'react';
import { Text } from 'react-native-elements';
import { Dimensions, LayoutAnimation, StyleSheet, TouchableOpacity, View } from 'react-native';
import { Text } from 'react-native-elements';
import { encodeUR } from '../blue_modules/ur';
import QRCodeComponent from './QRCodeComponent';
import { BlueCurrentTheme } from '../components/themes';
import { BlueSpacing20 } from '../BlueComponents';
import { BlueCurrentTheme } from '../components/themes';
import loc from '../loc';
import QRCodeComponent from './QRCodeComponent';
const { height, width } = Dimensions.get('window');

View file

@ -1,5 +1,5 @@
import React, { useState, useRef, forwardRef, ReactNode, useEffect } from 'react';
import { View, Text, TouchableOpacity, StyleSheet, Dimensions, PixelRatio, Animated, useWindowDimensions } from 'react-native';
import React, { forwardRef, ReactNode, useEffect, useRef, useState } from 'react';
import { Animated, Dimensions, PixelRatio, StyleSheet, Text, TouchableOpacity, useWindowDimensions, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { useTheme } from './themes';

View file

@ -1,10 +1,11 @@
import React from 'react';
import DefaultPreference from 'react-native-default-preference';
// @ts-ignore: react-native-handoff is not in the type definition
import Handoff from 'react-native-handoff';
import { useSettings } from './Context/SettingsContext';
import DefaultPreference from 'react-native-default-preference';
import { GROUP_IO_BLUEWALLET } from '../blue_modules/currency';
import { BlueApp } from '../class';
import { useSettings } from './Context/SettingsContext';
interface HandOffComponentProps {
url?: string;

View file

@ -1,7 +1,8 @@
import React, { useEffect } from 'react';
import * as NavigationService from '../NavigationService';
import { useStorage } from '../blue_modules/storage-context';
import { NativeEventEmitter, NativeModules } from 'react-native';
import { useStorage } from '../blue_modules/storage-context';
import * as NavigationService from '../NavigationService';
import HandOffComponent from './HandOffComponent.ios';
interface UserActivityData {

View file

@ -1,8 +1,9 @@
import React from 'react';
import { StyleSheet, View, Text } from 'react-native';
import { useTheme } from './themes';
import PlusIcon from './icons/PlusIcon';
import { StyleSheet, Text, View } from 'react-native';
import loc from '../loc';
import PlusIcon from './icons/PlusIcon';
import { useTheme } from './themes';
interface HeaderProps {
leftText: string;

View file

@ -1,5 +1,6 @@
import React from 'react';
import { StyleSheet, TouchableOpacity, Text } from 'react-native';
import { StyleSheet, Text, TouchableOpacity } from 'react-native';
import { useTheme } from './themes';
interface HeaderRightButtonProps {

View file

@ -1,10 +1,11 @@
import React from 'react';
import PropTypes from 'prop-types';
import React from 'react';
import { InputAccessoryView, Keyboard, Platform, StyleSheet, View } from 'react-native';
import { Text } from 'react-native-elements';
import { InputAccessoryView, StyleSheet, Keyboard, Platform, View } from 'react-native';
import { BlueButtonLink } from '../BlueComponents';
import loc from '../loc';
import { BitcoinUnit } from '../models/bitcoinUnits';
import { BlueButtonLink } from '../BlueComponents';
import { useTheme } from './themes';
const InputAccessoryAllFunds = ({ balance, canUseAll, onUseAllPressed }) => {

View file

@ -1,5 +1,6 @@
import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { StyleSheet, Text, View } from 'react-native';
import loc, { formatBalanceWithoutSuffix } from '../loc';
import { BitcoinUnit } from '../models/bitcoinUnits';
import { useTheme } from './themes';

View file

@ -1,6 +1,7 @@
import React from 'react';
import { DimensionValue, Image, StyleSheet, TouchableOpacity, View } from 'react-native';
import { Text } from 'react-native-elements';
import React from 'react';
import { useTheme } from './themes';
interface LdkButtonProps {

View file

@ -1,6 +1,7 @@
import React, { useMemo } from 'react';
import { I18nManager, ActivityIndicator, TouchableOpacity, Switch, StyleSheet, Pressable, PressableProps } from 'react-native';
import { ListItem as RNElementsListItem, Avatar } from 'react-native-elements'; // Replace with actual import paths
import { ActivityIndicator, I18nManager, Pressable, PressableProps, StyleSheet, Switch, TouchableOpacity } from 'react-native';
import { Avatar, ListItem as RNElementsListItem } from 'react-native-elements'; // Replace with actual import paths
import { useTheme } from './themes';
// Update the type for the props

View file

@ -1,8 +1,9 @@
import { CommonActions } from '@react-navigation/native';
import { useCallback, useContext, useEffect } from 'react';
import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
import * as NavigationService from '../NavigationService';
import { CommonActions } from '@react-navigation/native';
import { BlueStorageContext } from '../blue_modules/storage-context';
import * as NavigationService from '../NavigationService';
/*
Component for iPadOS and macOS menu items with keyboard shortcuts.

View file

@ -1,11 +1,11 @@
import React, { useRef } from 'react';
import { View, StyleSheet, Text, TouchableOpacity, ActivityIndicator, findNodeHandle } from 'react-native';
import PropTypes from 'prop-types';
import React, { useRef } from 'react';
import { ActivityIndicator, findNodeHandle, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { Icon } from 'react-native-elements';
import { useTheme } from './themes';
import ActionSheetOptions from '../screen/ActionSheet.common';
import ActionSheet from '../screen/ActionSheet';
import ActionSheetOptions from '../screen/ActionSheet.common';
import { useTheme } from './themes';
export const MultipleStepsListItemDashType = Object.freeze({ none: 0, top: 1, bottom: 2, topAndBottom: 3 });
export const MultipleStepsListItemButtohType = Object.freeze({ partial: 0, full: 1 });

View file

@ -1,12 +1,13 @@
import React, { useRef } from 'react';
import { View, StyleSheet, Platform } from 'react-native';
import QRCode from 'react-native-qrcode-svg';
import ToolTipMenu from './TooltipMenu';
import Share from 'react-native-share';
import loc from '../loc';
import Clipboard from '@react-native-clipboard/clipboard';
import { useTheme } from './themes';
import React, { useRef } from 'react';
import { Platform, StyleSheet, View } from 'react-native';
import QRCode from 'react-native-qrcode-svg';
import Share from 'react-native-share';
import loc from '../loc';
import { ActionIcons } from '../typings/ActionIcons';
import { useTheme } from './themes';
import ToolTipMenu from './TooltipMenu';
import { Action } from './types';
interface QRCodeComponentProps {

View file

@ -1,10 +1,11 @@
import React, { ReactNode } from 'react';
import { StyleProp, ViewStyle } from 'react-native';
import * as fs from '../blue_modules/fs';
import loc from '../loc';
import { ActionIcons } from '../typings/ActionIcons';
import * as fs from '../blue_modules/fs';
import { Action } from './types';
import ToolTipMenu from './TooltipMenu';
import { Action } from './types';
interface SaveFileButtonProps {
fileName: string;

View file

@ -1,8 +1,9 @@
import React, { forwardRef } from 'react';
import { useTheme } from './themes';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { Icon } from 'react-native-elements';
import { useTheme } from './themes';
type IconProps = {
name: string;
type: string;

View file

@ -1,5 +1,6 @@
import React, { forwardRef } from 'react';
import { TouchableOpacity, View, Text, StyleProp, ViewStyle, StyleSheet } from 'react-native';
import { StyleProp, StyleSheet, Text, TouchableOpacity, View, ViewStyle } from 'react-native';
import { useTheme } from './themes';
interface SquareButtonProps {

View file

@ -1,5 +1,6 @@
import React from 'react';
import { TouchableOpacity, Text, StyleSheet, View } from 'react-native';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { useTheme } from './themes';
type ContentAlignType = 'flex-start' | 'center' | 'flex-end';

View file

@ -1,5 +1,6 @@
import React, { FC } from 'react';
import { TouchableOpacity, View, Text, StyleSheet } from 'react-native';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { useTheme } from './themes';
export const StyledButtonType: Record<string, string> = { default: 'default', destroy: 'destroy', grey: 'grey' };

View file

@ -1,5 +1,6 @@
import React from 'react';
import { StyleSheet, View, TouchableOpacity } from 'react-native';
import { StyleSheet, TouchableOpacity, View } from 'react-native';
import { useTheme } from './themes';
const tabsStyles = StyleSheet.create({

View file

@ -1,5 +1,6 @@
import React, { useRef, useEffect, forwardRef, Ref, useMemo, useCallback } from 'react';
import React, { forwardRef, Ref, useCallback, useEffect, useMemo, useRef } from 'react';
import { Pressable, View } from 'react-native';
import showPopupMenu, { OnPopupMenuItemSelect, PopupMenuItem } from '../blue_modules/showPopupMenu.android';
import { ToolTipMenuProps } from './types';

View file

@ -1,7 +1,8 @@
import React, { forwardRef, Ref, useMemo, useCallback } from 'react';
import { ContextMenuView, ContextMenuButton, RenderItem } from 'react-native-ios-context-menu';
import React, { forwardRef, Ref, useCallback, useMemo } from 'react';
import { TouchableOpacity } from 'react-native';
import { ToolTipMenuProps, Action } from './types';
import { ContextMenuButton, ContextMenuView, RenderItem } from 'react-native-ios-context-menu';
import { Action, ToolTipMenuProps } from './types';
const BaseToolTipMenu = (props: ToolTipMenuProps, ref: Ref<any>) => {
const {

View file

@ -1,4 +1,5 @@
import { forwardRef, Ref } from 'react';
import { ToolTipMenuProps } from './types';
const BaseToolTipMenu = (props: ToolTipMenuProps, ref: Ref<any>) => {

View file

@ -1,14 +1,12 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import Clipboard from '@react-native-clipboard/clipboard';
import { useNavigation } from '@react-navigation/native';
import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
import { Linking, StyleSheet, View } from 'react-native';
import Clipboard from '@react-native-clipboard/clipboard';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { useNavigation } from '@react-navigation/native';
import { BitcoinUnit } from '../models/bitcoinUnits';
import * as NavigationService from '../NavigationService';
import loc, { formatBalanceWithoutSuffix, transactionTimeToReadable } from '../loc';
import Lnurl from '../class/lnurl';
import { BlueStorageContext } from '../blue_modules/storage-context';
import ToolTipMenu from './TooltipMenu';
import Lnurl from '../class/lnurl';
import { LightningTransaction, Transaction } from '../class/wallets/types';
import TransactionExpiredIcon from '../components/icons/TransactionExpiredIcon';
import TransactionIncomingIcon from '../components/icons/TransactionIncomingIcon';
import TransactionOffchainIcon from '../components/icons/TransactionOffchainIcon';
@ -16,10 +14,13 @@ import TransactionOffchainIncomingIcon from '../components/icons/TransactionOffc
import TransactionOnchainIcon from '../components/icons/TransactionOnchainIcon';
import TransactionOutgoingIcon from '../components/icons/TransactionOutgoingIcon';
import TransactionPendingIcon from '../components/icons/TransactionPendingIcon';
import { useTheme } from './themes';
import ListItem from './ListItem';
import loc, { formatBalanceWithoutSuffix, transactionTimeToReadable } from '../loc';
import { BitcoinUnit } from '../models/bitcoinUnits';
import * as NavigationService from '../NavigationService';
import { useSettings } from './Context/SettingsContext';
import { LightningTransaction, Transaction } from '../class/wallets/types';
import ListItem from './ListItem';
import { useTheme } from './themes';
import ToolTipMenu from './TooltipMenu';
import { Action } from './types';
interface TransactionListItemProps {

View file

@ -1,6 +1,7 @@
import { StyleSheet, View } from 'react-native';
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { Icon } from 'react-native-elements';
import { useTheme } from './themes';
export const TransactionPendingIconBig: React.FC = () => {

View file

@ -1,16 +1,17 @@
import React, { useState, useEffect, useRef, useCallback, useMemo } from 'react';
import { Image, Text, TouchableOpacity, View, I18nManager, StyleSheet, LayoutAnimation } from 'react-native';
import Clipboard from '@react-native-clipboard/clipboard';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { I18nManager, Image, LayoutAnimation, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import { HDSegwitBech32Wallet, LightningCustodianWallet, LightningLdkWallet, MultisigHDWallet } from '../class';
import { BitcoinUnit } from '../models/bitcoinUnits';
import WalletGradient from '../class/wallet-gradient';
import loc, { formatBalance, formatBalanceWithoutSuffix } from '../loc';
import ToolTipMenu from './TooltipMenu';
import { FiatUnit } from '../models/fiatUnit';
import { TWallet } from '../class/wallets/types';
import loc, { formatBalance, formatBalanceWithoutSuffix } from '../loc';
import { BitcoinUnit } from '../models/bitcoinUnits';
import { FiatUnit } from '../models/fiatUnit';
import { BlurredBalanceView } from './BlurredBalanceView';
import { useSettings } from './Context/SettingsContext';
import ToolTipMenu from './TooltipMenu';
interface TransactionsNavigationHeaderProps {
wallet: TWallet;

View file

@ -1,7 +1,8 @@
import React from 'react';
import { TouchableOpacity, View, Text, Image, I18nManager, StyleSheet, ImageSourcePropType, DimensionValue } from 'react-native';
import { Theme, useTheme } from './themes';
import { DimensionValue, I18nManager, Image, ImageSourcePropType, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import loc from '../loc';
import { Theme, useTheme } from './themes';
interface ButtonDetails {
image: ImageSourcePropType;

View file

@ -1,6 +1,7 @@
import React from 'react';
import { Text } from 'react-native-elements';
import { I18nManager, StyleSheet, TouchableOpacity, View } from 'react-native';
import { Text } from 'react-native-elements';
import { useTheme } from './themes';
interface WalletToImportProp {

View file

@ -1,29 +1,29 @@
import React, { useRef, useCallback, useImperativeHandle, forwardRef, useContext } from 'react';
import PropTypes from 'prop-types';
import React, { forwardRef, useCallback, useContext, useImperativeHandle, useRef } from 'react';
import {
Animated,
Image,
FlatList,
I18nManager,
Image,
Platform,
Pressable,
StyleSheet,
Text,
TouchableOpacity,
useWindowDimensions,
View,
FlatList,
Pressable,
} from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import loc, { formatBalance, transactionTimeToReadable } from '../loc';
import { BlueStorageContext, WalletTransactionsStatus } from '../blue_modules/storage-context';
import { BlueSpacing10 } from '../BlueComponents';
import { LightningCustodianWallet, LightningLdkWallet, MultisigHDWallet } from '../class';
import WalletGradient from '../class/wallet-gradient';
import { BlueSpacing10 } from '../BlueComponents';
import { BlueStorageContext, WalletTransactionsStatus } from '../blue_modules/storage-context';
import { useTheme } from './themes';
import { BlurredBalanceView } from './BlurredBalanceView';
import { useIsLargeScreen } from '../hooks/useIsLargeScreen';
import loc, { formatBalance, transactionTimeToReadable } from '../loc';
import { BlurredBalanceView } from './BlurredBalanceView';
import { useSettings } from './Context/SettingsContext';
import { useTheme } from './themes';
const nStyles = StyleSheet.create({
container: {

View file

@ -1,18 +1,19 @@
import React, { useContext, useEffect, useRef } from 'react';
import {
updateApplicationContext,
watchEvents,
useReachability,
useInstalled,
transferCurrentComplicationUserInfo,
transferUserInfo,
updateApplicationContext,
useInstalled,
useReachability,
watchEvents,
} from 'react-native-watch-connectivity';
import { Chain } from '../models/bitcoinUnits';
import loc, { formatBalance, transactionTimeToReadable } from '../loc';
import { BlueStorageContext } from '../blue_modules/storage-context';
import Notifications from '../blue_modules/notifications';
import { FiatUnit } from '../models/fiatUnit';
import { BlueStorageContext } from '../blue_modules/storage-context';
import { MultisigHDWallet } from '../class';
import loc, { formatBalance, transactionTimeToReadable } from '../loc';
import { Chain } from '../models/bitcoinUnits';
import { FiatUnit } from '../models/fiatUnit';
import { useSettings } from './Context/SettingsContext';
function WatchConnectivity() {

View file

@ -1,5 +1,6 @@
import React, { useContext, useEffect } from 'react';
import DefaultPreference from 'react-native-default-preference';
import { BlueStorageContext } from '../blue_modules/storage-context';
import { TWallet } from '../class/wallets/types';
import { useSettings } from './Context/SettingsContext';

View file

@ -1,4 +1,5 @@
import React from 'react';
import { TWallet } from '../class/wallets/types';
export const isBalanceDisplayAllowed = async (): Promise<boolean> => {

View file

@ -1,21 +1,22 @@
import Clipboard from '@react-native-clipboard/clipboard';
import { useNavigation } from '@react-navigation/native';
import React, { useMemo, useRef } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { useNavigation } from '@react-navigation/native';
import { ListItem } from 'react-native-elements';
import { AddressTypeBadge } from './AddressTypeBadge';
import loc, { formatBalance } from '../../loc';
import TooltipMenu from '../TooltipMenu';
import Clipboard from '@react-native-clipboard/clipboard';
import Share from 'react-native-share';
import { useTheme } from '../themes';
import { BitcoinUnit } from '../../models/bitcoinUnits';
import { useStorage } from '../../blue_modules/storage-context';
import presentAlert from '../Alert';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import QRCodeComponent from '../QRCodeComponent';
import { useStorage } from '../../blue_modules/storage-context';
import confirm from '../../helpers/confirm';
import { useBiometrics } from '../../hooks/useBiometrics';
import loc, { formatBalance } from '../../loc';
import { BitcoinUnit } from '../../models/bitcoinUnits';
import presentAlert from '../Alert';
import QRCodeComponent from '../QRCodeComponent';
import { useTheme } from '../themes';
import TooltipMenu from '../TooltipMenu';
import { Action } from '../types';
import { AddressTypeBadge } from './AddressTypeBadge';
interface AddressItemProps {
// todo: fix `any` after addresses.js is converted to the church of holy typescript

View file

@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { StyleSheet, View, Text } from 'react-native';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import loc, { formatStringAddTwoWhiteSpaces } from '../../loc';
import { useTheme } from '../themes';

View file

@ -1,5 +1,6 @@
import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { StyleSheet, Text, View } from 'react-native';
import loc from '../../loc';
import { useTheme } from '../themes';

View file

@ -1,6 +1,7 @@
import React from 'react';
import { StyleSheet, TouchableOpacity } from 'react-native';
import { Icon } from 'react-native-elements';
import { useTheme } from '../themes';
const styles = StyleSheet.create({

View file

@ -1,6 +1,7 @@
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { Icon } from 'react-native-elements';
import { useTheme } from '../themes';
const styles = StyleSheet.create({

View file

@ -1,6 +1,7 @@
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { Icon } from 'react-native-elements';
import { useTheme } from '../themes';
const styles = StyleSheet.create({

View file

@ -1,6 +1,7 @@
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { Icon } from 'react-native-elements';
import { useTheme } from '../themes';
const styles = StyleSheet.create({

View file

@ -1,6 +1,7 @@
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { Icon } from 'react-native-elements';
import { useTheme } from '../themes';
const styles = StyleSheet.create({

View file

@ -1,6 +1,7 @@
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { Icon } from 'react-native-elements';
import { useTheme } from '../themes';
const styles = StyleSheet.create({

View file

@ -1,6 +1,7 @@
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { Icon } from 'react-native-elements';
import { useTheme } from '../themes';
const styles = StyleSheet.create({

View file

@ -1,6 +1,7 @@
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { Icon } from 'react-native-elements';
import { useTheme } from '../themes';
const styles = StyleSheet.create({

Some files were not shown because too many files have changed in this diff Show more