FIX: greatly improve startup time
Some checks are pending
Build Release and Upload to TestFlight (iOS) / build (push) Waiting to run
Build Release and Upload to TestFlight (iOS) / testflight-upload (push) Blocked by required conditions
BuildReleaseApk / buildReleaseApk (push) Waiting to run
BuildReleaseApk / browserstack (push) Blocked by required conditions

This commit is contained in:
overtorment 2026-04-20 20:50:39 +01:00 committed by Overtorment
parent adbeeaf5f3
commit 66cf16fba3
78 changed files with 192 additions and 152 deletions

View File

@ -5,7 +5,10 @@ import RNFS from 'react-native-fs';
import Realm from 'realm';
import { sha256 as _sha256 } from '@noble/hashes/sha256';
import { LegacyWallet, SegwitBech32Wallet, SegwitP2SHWallet, TaprootWallet } from '../class';
import type { LegacyWallet as LegacyWalletT } from '../class/wallets/legacy-wallet';
import type { SegwitBech32Wallet as SegwitBech32WalletT } from '../class/wallets/segwit-bech32-wallet';
import type { SegwitP2SHWallet as SegwitP2SHWalletT } from '../class/wallets/segwit-p2sh-wallet';
import type { TaprootWallet as TaprootWalletT } from '../class/wallets/taproot-wallet';
import presentAlert from '../components/Alert';
import loc from '../loc';
import { GROUP_IO_BLUEWALLET } from './currency';
@ -599,6 +602,21 @@ export function txhexToElectrumTransaction(txhex: string): ElectrumTransactionWi
let address: false | string = false;
let type: false | string = false;
// Lazy require to avoid the module-scope cycle described above. These
// modules are fully loaded by the time this function is actually invoked.
const { SegwitBech32Wallet } = require('../class/wallets/segwit-bech32-wallet') as {
SegwitBech32Wallet: typeof SegwitBech32WalletT;
};
const { SegwitP2SHWallet } = require('../class/wallets/segwit-p2sh-wallet') as {
SegwitP2SHWallet: typeof SegwitP2SHWalletT;
};
const { LegacyWallet } = require('../class/wallets/legacy-wallet') as {
LegacyWallet: typeof LegacyWalletT;
};
const { TaprootWallet } = require('../class/wallets/taproot-wallet') as {
TaprootWallet: typeof TaprootWalletT;
};
if (SegwitBech32Wallet.scriptPubKeyToAddress(uint8ArrayToHex(out.script))) {
address = SegwitBech32Wallet.scriptPubKeyToAddress(uint8ArrayToHex(out.script));
type = 'witness_v0_keyhash';

View File

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

View File

@ -1,6 +1,6 @@
import { Platform } from 'react-native';
import { BlueApp as BlueAppClass } from '../class/';
import { BlueApp as BlueAppClass } from '../class/blue-app';
import prompt from '../helpers/prompt';
import { showKeychainWipeAlert } from '../hooks/useBiometrics';
import loc from '../loc';

View File

@ -13,7 +13,8 @@ import AsyncStorage from '@react-native-async-storage/async-storage';
import { Psbt } from 'bitcoinjs-lib';
import b58 from 'bs58check';
import { MultisigCosigner, MultisigHDWallet } from '../../class';
import { MultisigCosigner } from '../../class/multisig-cosigner';
import { MultisigHDWallet } from '../../class/wallets/multisig-hd-wallet';
import { joinQRs } from '../bbqr/join';
import {
concatUint8Arrays,

View File

@ -3,7 +3,7 @@ import * as bitcoin from 'bitcoinjs-lib';
import URL from 'url';
import { readFileOutsideSandbox } from '../blue_modules/fs';
import { Chain } from '../models/bitcoinUnits';
import { WatchOnlyWallet } from './';
import { WatchOnlyWallet } from './wallets/watch-only-wallet';
import Azteco from './azteco';
import Lnurl from './lnurl';
import type { TWallet } from './wallets/types';

View File

@ -1,22 +0,0 @@
export * from './blue-app';
export * from './hd-segwit-bech32-transaction';
export * from './multisig-cosigner';
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/hd-taproot-wallet';
export * from './wallets/legacy-wallet';
export * from './wallets/lightning-custodian-wallet';
export * from './wallets/lightning-ark-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

@ -2,27 +2,23 @@ import bip38 from 'bip38';
import wif from 'wif';
import loc from '../loc';
import {
HDAezeedWallet,
HDLegacyBreadwalletWallet,
HDLegacyElectrumSeedP2PKHWallet,
HDLegacyP2PKHWallet,
HDSegwitBech32Wallet,
HDSegwitElectrumSeedP2WPKHWallet,
HDSegwitP2SHWallet,
HDTaprootWallet,
LegacyWallet,
LightningCustodianWallet,
LightningArkWallet,
MultisigHDWallet,
SegwitBech32Wallet,
SegwitP2SHWallet,
SLIP39LegacyP2PKHWallet,
SLIP39SegwitBech32Wallet,
SLIP39SegwitP2SHWallet,
TaprootWallet,
WatchOnlyWallet,
} from '.';
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 { HDTaprootWallet } from './wallets/hd-taproot-wallet';
import { LegacyWallet } from './wallets/legacy-wallet';
import { LightningCustodianWallet } from './wallets/lightning-custodian-wallet';
import { LightningArkWallet } from './wallets/lightning-ark-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 { TaprootWallet } from './wallets/taproot-wallet';
import { WatchOnlyWallet } from './wallets/watch-only-wallet';
import bip39WalletFormatsElectrum 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';

View File

@ -8,7 +8,7 @@ import { ECPairAPI, ECPairFactory, Signer } from 'ecpair';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import ecc from '../../blue_modules/noble_ecc';
import { hexToUint8Array, concatUint8Arrays } from '../../blue_modules/uint8array-extras';
import { HDSegwitBech32Wallet } from '..';
import type { HDSegwitBech32Wallet as HDSegwitBech32WalletT } from './hd-segwit-bech32-wallet';
import { randomBytes } from '../rng';
import { AbstractWallet } from './abstract-wallet';
import { CreateTransactionResult, CreateTransactionTarget, CreateTransactionUtxo, Transaction, Utxo } from './types';
@ -347,6 +347,9 @@ export class LegacyWallet extends AbstractWallet {
this._txs_by_external_index = this._txs_by_external_index || [];
this._txs_by_internal_index = [];
const { HDSegwitBech32Wallet } = require('./hd-segwit-bech32-wallet') as {
HDSegwitBech32Wallet: typeof HDSegwitBech32WalletT;
};
const hd = new HDSegwitBech32Wallet();
return hd.getTransactions.apply(this);
}

View File

@ -3,7 +3,7 @@ import DefaultPreference from 'react-native-default-preference';
import { isReadClipboardAllowed, setReadClipboardAllowed } from '../../blue_modules/clipboard';
import { getPreferredCurrency, GROUP_IO_BLUEWALLET, initCurrencyDaemon, setPreferredCurrency } from '../../blue_modules/currency';
import { clearUseURv1, isURv1Enabled, setUseURv1 } from '../../blue_modules/ur';
import { BlueApp } from '../../class';
import { BlueApp } from '../../class/blue-app';
import { saveLanguage, STORAGE_KEY } from '../../loc';
import { FiatUnit, TFiatUnit } from '../../models/fiatUnit';
import {

View File

@ -1,6 +1,8 @@
import React, { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { LayoutAnimation } from 'react-native';
import { BlueApp as BlueAppClass, LegacyWallet, TCounterpartyMetadata, TTXMetadata, WatchOnlyWallet } from '../../class';
import { BlueApp as BlueAppClass, TCounterpartyMetadata, TTXMetadata } from '../../class/blue-app';
import { LegacyWallet } from '../../class/wallets/legacy-wallet';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import type { TWallet } from '../../class/wallets/types';
import presentAlert from '../../components/Alert';
import loc, { formatBalanceWithoutSuffix } from '../../loc';

View File

@ -1,7 +1,8 @@
import React, { useEffect } from 'react';
import { DevSettings, Alert, Platform, AlertButton } from 'react-native';
import { useStorage } from '../hooks/context/useStorage';
import { HDSegwitBech32Wallet, WatchOnlyWallet } from '../class';
import { HDSegwitBech32Wallet } from '../class/wallets/hd-segwit-bech32-wallet';
import { WatchOnlyWallet } from '../class/wallets/watch-only-wallet';
import Clipboard from '@react-native-clipboard/clipboard';
import { TWallet } from '../class/wallets/types';

View File

@ -4,7 +4,7 @@ import DefaultPreference from 'react-native-default-preference';
import Handoff from 'react-native-handoff';
import { useSettings } from '../hooks/context/useSettings';
import { GROUP_IO_BLUEWALLET } from '../blue_modules/currency';
import { BlueApp } from '../class';
import { BlueApp } from '../class/blue-app';
import { HandOffComponentProps } from './types';
const HandOffComponent: React.FC<HandOffComponentProps> = props => {

View File

@ -3,7 +3,9 @@ import Clipboard from '@react-native-clipboard/clipboard';
import { ImageBackground, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import Animated, { useAnimatedStyle, useSharedValue, withSpring, withTiming } from 'react-native-reanimated';
import LinearGradient from 'react-native-linear-gradient';
import { LightningArkWallet, LightningCustodianWallet, MultisigHDWallet } from '../class';
import { LightningArkWallet } from '../class/wallets/lightning-ark-wallet';
import { LightningCustodianWallet } from '../class/wallets/lightning-custodian-wallet';
import { MultisigHDWallet } from '../class/wallets/multisig-hd-wallet';
import WalletGradient from '../class/wallet-gradient';
import { TWallet } from '../class/wallets/types';
import loc, { formatBalance, formatBalanceWithoutSuffix } from '../loc';

View File

@ -23,7 +23,9 @@ import Animated, {
withTiming,
} from 'react-native-reanimated';
import LinearGradient from 'react-native-linear-gradient';
import { LightningArkWallet, LightningCustodianWallet, MultisigHDWallet } from '../class';
import { LightningArkWallet } from '../class/wallets/lightning-ark-wallet';
import { LightningCustodianWallet } from '../class/wallets/lightning-custodian-wallet';
import { MultisigHDWallet } from '../class/wallets/multisig-hd-wallet';
import WalletGradient from '../class/wallet-gradient';
import { useSizeClass, SizeClass } from '../blue_modules/sizeClass';
import loc, { formatBalance, transactionTimeToReadable } from '../loc';

View File

@ -1,6 +1,6 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import DefaultPreference from 'react-native-default-preference';
import { BlueApp } from '../class';
import { BlueApp } from '../class/blue-app';
import { GROUP_IO_BLUEWALLET } from '../blue_modules/currency';
// Function to get the value from DefaultPreference first, then fallback to AsyncStorage

View File

@ -12,7 +12,7 @@ import {
removeAllDeliveredNotifications,
setApplicationIconBadgeNumber,
} from '../blue_modules/notifications';
import { LightningCustodianWallet } from '../class';
import { LightningCustodianWallet } from '../class/wallets/lightning-custodian-wallet';
import DeeplinkSchemaMatch from '../class/deeplink-schema-match';
import loc from '../loc';
import { Chain } from '../models/bitcoinUnits';

View File

@ -7,7 +7,7 @@ import {
useReachability,
watchEvents,
} from 'react-native-watch-connectivity';
import { MultisigHDWallet } from '../class';
import { MultisigHDWallet } from '../class/wallets/multisig-hd-wallet';
import loc from '../loc';
import { Chain } from '../models/bitcoinUnits';
import { FiatUnit } from '../models/fiatUnit';

View File

@ -26,7 +26,7 @@ import { LightningCustodianWallet } from '../../class/wallets/lightning-custodia
import { DecodedInvoice, TWallet } from '../../class/wallets/types';
import { useKeyboard } from '../../hooks/useKeyboard';
import { BlueLoading } from '../../components/BlueLoading';
import { LightningArkWallet } from '../../class';
import { LightningArkWallet } from '../../class/wallets/lightning-ark-wallet';
type RouteProps = RouteProp<LNDStackParamsList, 'ScanLNDInvoice'>;
type NavigationProps = NativeStackNavigationProp<LNDStackParamsList, 'ScanLNDInvoice'>;

View File

@ -30,7 +30,8 @@ import { DismissKeyboardInputAccessory, DismissKeyboardInputAccessoryViewID } fr
import { majorTomToGroundControl, tryToObtainPermissions } from '../../blue_modules/notifications';
import { BlueLoading } from '../../components/BlueLoading';
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation.ts';
import { LightningArkWallet, LightningCustodianWallet } from '../../class';
import { LightningArkWallet } from '../../class/wallets/lightning-ark-wallet';
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
import assert from 'assert';
import { scanQrHelper } from '../../helpers/scan-qr.ts';

View File

@ -20,7 +20,7 @@ import { LightningTransaction } from '../../class/wallets/types';
import dayjs from 'dayjs';
import SafeAreaScrollView from '../../components/SafeAreaScrollView';
import { BlueSpacing20 } from '../../components/BlueSpacing';
import { LightningCustodianWallet } from '../../class';
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
type LNDViewInvoiceRouteParams = {
walletID: string;

View File

@ -17,7 +17,8 @@ import { BlueLoading } from '../../components/BlueLoading';
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
import useWalletSubscribe from '../../hooks/useWalletSubscribe.tsx';
import assert from 'assert';
import { LightningArkWallet, LightningCustodianWallet } from '../../class';
import { LightningArkWallet } from '../../class/wallets/lightning-ark-wallet';
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
const AuthState = {
USER_PROMPT: 0,

View File

@ -4,7 +4,7 @@ import { ActivityIndicator, Keyboard, Linking, StyleSheet, TextInput, View, Text
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import { HDSegwitBech32Wallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import presentAlert from '../../components/Alert';
import Button from '../../components/Button';
import { useTheme } from '../../components/themes';

View File

@ -22,7 +22,7 @@ import { SendDetailsStackParamList } from '../../navigation/SendDetailsStackPara
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
import { ContactList } from '../../class/contact-list';
import { useStorage } from '../../hooks/context/useStorage';
import { HDSegwitBech32Wallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { useSettings } from '../../hooks/context/useSettings';
import { majorTomToGroundControl } from '../../blue_modules/notifications';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';

View File

@ -29,7 +29,9 @@ import { btcToSatoshi, fiatToBTC } from '../../blue_modules/currency';
import * as fs from '../../blue_modules/fs';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import { BlueText } from '../../BlueComponents';
import { HDSegwitBech32Wallet, MultisigHDWallet, WatchOnlyWallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { MultisigHDWallet } from '../../class/wallets/multisig-hd-wallet';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import { ContactList } from '../../class/contact-list';
import DeeplinkSchemaMatch from '../../class/deeplink-schema-match';
import { AbstractHDElectrumWallet } from '../../class/wallets/abstract-hd-electrum-wallet';

View File

@ -27,7 +27,7 @@ import { BitcoinUnit } from '../../models/bitcoinUnits';
import { useStorage } from '../../hooks/context/useStorage';
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
import { combinePSBTs } from '../../util/combinePSBTs.ts';
import { MultisigHDWallet } from '../../class';
import { MultisigHDWallet } from '../../class/wallets/multisig-hd-wallet';
import assert from 'assert';
type RouteParams = {

View File

@ -21,7 +21,7 @@ import { majorTomToGroundControl } from '../../blue_modules/notifications';
import { openSignedTransactionRaw } from '../../blue_modules/fs';
import { BlueSpacing20 } from '../../components/BlueSpacing';
import { SendDetailsStackParamList } from '../../navigation/SendDetailsStackParamList';
import { WatchOnlyWallet } from '../../class';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
const PsbtWithHardwareWallet = () => {
const { txMetadata, fetchAndSaveWalletTransactions, wallets } = useStorage();

View File

@ -6,7 +6,7 @@ import Icon from '@react-native-vector-icons/fontawesome6';
import A from '../../blue_modules/analytics';
import { BlueTextCentered } from '../../BlueComponents';
import { HDSegwitBech32Wallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import presentAlert from '../../components/Alert';
import { BlueSpacing20 } from '../../components/BlueSpacing';
import Button from '../../components/Button';

View File

@ -14,15 +14,13 @@ import * as fs from '../../blue_modules/fs';
import ecc from '../../blue_modules/noble_ecc';
import { hexToUint8Array, uint8ArrayToHex } from '../../blue_modules/uint8array-extras';
import { BlueText } from '../../BlueComponents';
import {
HDAezeedWallet,
HDSegwitBech32Wallet,
HDSegwitP2SHWallet,
LegacyWallet,
SegwitP2SHWallet,
SLIP39LegacyP2PKHWallet,
TaprootWallet,
} from '../../class';
import { HDAezeedWallet } from '../../class/wallets/hd-aezeed-wallet';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { HDSegwitP2SHWallet } from '../../class/wallets/hd-segwit-p2sh-wallet';
import { LegacyWallet } from '../../class/wallets/legacy-wallet';
import { SegwitP2SHWallet } from '../../class/wallets/segwit-p2sh-wallet';
import { SLIP39LegacyP2PKHWallet } from '../../class/wallets/slip39-wallets';
import { TaprootWallet } from '../../class/wallets/taproot-wallet';
import presentAlert from '../../components/Alert';
import Button from '../../components/Button';
import SaveFileButton from '../../components/SaveFileButton';

View File

@ -5,7 +5,8 @@ import PropTypes from 'prop-types';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import { BlueCard, BlueText } from '../../BlueComponents';
import { HDSegwitBech32Transaction, HDSegwitBech32Wallet } from '../../class';
import { HDSegwitBech32Transaction } from '../../class/hd-segwit-bech32-transaction';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import presentAlert, { AlertType } from '../../components/Alert';
import Button from '../../components/Button';
import SafeArea from '../../components/SafeArea';

View File

@ -2,7 +2,8 @@ import React from 'react';
import PropTypes from 'prop-types';
import { ActivityIndicator, ScrollView, StyleSheet, View } from 'react-native';
import { BlueText } from '../../BlueComponents';
import { HDSegwitBech32Transaction, HDSegwitBech32Wallet } from '../../class';
import { HDSegwitBech32Transaction } from '../../class/hd-segwit-bech32-transaction';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import presentAlert from '../../components/Alert';
import SafeArea from '../../components/SafeArea';
import loc from '../../loc';

View File

@ -2,7 +2,8 @@ import React from 'react';
import PropTypes from 'prop-types';
import { ActivityIndicator, ScrollView, View } from 'react-native';
import { BlueText } from '../../BlueComponents';
import { HDSegwitBech32Transaction, HDSegwitBech32Wallet } from '../../class';
import { HDSegwitBech32Transaction } from '../../class/hd-segwit-bech32-transaction';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import presentAlert from '../../components/Alert';
import SafeArea from '../../components/SafeArea';
import loc from '../../loc';

View File

@ -6,7 +6,8 @@ import Icon from '../../components/Icon';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import { BlueCard, BlueText } from '../../BlueComponents';
import { HDSegwitBech32Transaction, HDSegwitBech32Wallet } from '../../class';
import { HDSegwitBech32Transaction } from '../../class/hd-segwit-bech32-transaction';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { Transaction, TWallet } from '../../class/wallets/types';
import Button from '../../components/Button';
import HandOffComponent from '../../components/HandOffComponent';

View File

@ -5,7 +5,10 @@ import assert from 'assert';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import { BlueButtonLink, BlueFormLabel, BlueText } from '../../BlueComponents';
import { HDSegwitBech32Wallet, HDTaprootWallet, LightningCustodianWallet, HDLegacyP2PKHWallet } from '../../class';
import { HDLegacyP2PKHWallet } from '../../class/wallets/hd-legacy-p2pkh-wallet';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { HDTaprootWallet } from '../../class/wallets/hd-taproot-wallet';
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
import presentAlert from '../../components/Alert';
import Button from '../../components/Button';
import { useTheme } from '../../components/themes';

View File

@ -4,7 +4,10 @@ import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { FlatList, StyleSheet, TextInput, View } from 'react-native';
import debounce from '../../blue_modules/debounce';
import { BlueFormLabel, BlueTextCentered } from '../../BlueComponents';
import { HDLegacyP2PKHWallet, HDSegwitBech32Wallet, HDSegwitP2SHWallet, HDTaprootWallet } from '../../class';
import { HDLegacyP2PKHWallet } from '../../class/wallets/hd-legacy-p2pkh-wallet';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { HDSegwitP2SHWallet } from '../../class/wallets/hd-segwit-p2sh-wallet';
import { HDTaprootWallet } from '../../class/wallets/hd-taproot-wallet';
import { validateBip32 } from '../../class/wallet-import';
import { TWallet } from '../../class/wallets/types';
import Button from '../../components/Button';

View File

@ -3,7 +3,8 @@ import React, { useState } from 'react';
import { ActivityIndicator, StyleSheet, TextInput, View } from 'react-native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { BlueFormLabel, BlueFormMultiInput } from '../../BlueComponents';
import { HDSegwitBech32Wallet, WatchOnlyWallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import presentAlert from '../../components/Alert';
import Button from '../../components/Button';
import SafeArea from '../../components/SafeArea';

View File

@ -3,7 +3,8 @@ import { RouteProp, useRoute } from '@react-navigation/native';
import { ActivityIndicator, FlatList, LayoutAnimation, Platform, StyleSheet, UIManager, View } from 'react-native';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import { BlueButtonLink, BlueFormLabel, BlueText } from '../../BlueComponents';
import { HDSegwitBech32Wallet, WatchOnlyWallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import startImport, { TImport } from '../../class/wallet-import';
import presentAlert from '../../components/Alert';
import Button from '../../components/Button';

View File

@ -19,7 +19,7 @@ import { useTheme } from '../../components/themes';
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
import loc from '../../loc';
import { useStorage } from '../../hooks/context/useStorage';
import { TTXMetadata } from '../../class';
import { TTXMetadata } from '../../class/blue-app';
import { ExtendedTransaction, LightningTransaction, Transaction, TWallet } from '../../class/wallets/types';
import useBounceAnimation from '../../hooks/useBounceAnimation';
import HeaderRightButton from '../../components/HeaderRightButton';

View File

@ -3,7 +3,7 @@ import { StyleSheet, Text, View, Pressable, Platform } from 'react-native';
import { RouteProp, useRoute } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import Icon from '../../components/Icon';
import { MultisigHDWallet } from '../../class';
import { MultisigHDWallet } from '../../class/wallets/multisig-hd-wallet';
import ListItem from '../../components/ListItem';
import SafeArea from '../../components/SafeArea';
import { useTheme } from '../../components/themes';

View File

@ -7,7 +7,7 @@ import { sha256 } from '@noble/hashes/sha256';
import { SectionList, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import { satoshiToLocalCurrency } from '../../blue_modules/currency';
import { HDSegwitBech32Wallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { ContactList } from '../../class/contact-list';
import { AbstractHDElectrumWallet } from '../../class/wallets/abstract-hd-electrum-wallet';
import presentAlert from '../../components/Alert';

View File

@ -15,7 +15,9 @@ import Badge from '../../components/Badge';
import { isDesktop } from '../../blue_modules/environment';
import { encodeUR } from '../../blue_modules/ur';
import { BlueCard } from '../../BlueComponents';
import { HDSegwitBech32Wallet, MultisigCosigner, MultisigHDWallet } from '../../class';
import { MultisigCosigner } from '../../class/multisig-cosigner';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { MultisigHDWallet } from '../../class/wallets/multisig-hd-wallet';
import presentAlert from '../../components/Alert';
import Button from '../../components/Button';
import MultipleStepsListItem, {

View File

@ -1,7 +1,7 @@
import React, { useCallback, useEffect, useLayoutEffect, useRef, useReducer, useMemo } from 'react';
import { useRoute, RouteProp, useFocusEffect } from '@react-navigation/native';
import { ActivityIndicator, FlatList, StyleSheet, View, Platform, UIManager } from 'react-native';
import { WatchOnlyWallet } from '../../class';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import { AddressItem } from '../../components/addresses/AddressItem';
import { useTheme } from '../../components/themes';
import { useStorage } from '../../hooks/context/useStorage';

View File

@ -4,16 +4,14 @@ import { writeFileAndExport } from '../../blue_modules/fs';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';
import { BlueCard, BlueText } from '../../BlueComponents';
import {
HDAezeedWallet,
HDSegwitBech32Wallet,
LegacyWallet,
LightningArkWallet,
MultisigHDWallet,
SegwitBech32Wallet,
SegwitP2SHWallet,
WatchOnlyWallet,
} from '../../class';
import { HDAezeedWallet } from '../../class/wallets/hd-aezeed-wallet';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { LegacyWallet } from '../../class/wallets/legacy-wallet';
import { LightningArkWallet } from '../../class/wallets/lightning-ark-wallet';
import { MultisigHDWallet } from '../../class/wallets/multisig-hd-wallet';
import { SegwitBech32Wallet } from '../../class/wallets/segwit-bech32-wallet';
import { SegwitP2SHWallet } from '../../class/wallets/segwit-p2sh-wallet';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import { AbstractHDElectrumWallet } from '../../class/wallets/abstract-hd-electrum-wallet';
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
import presentAlert from '../../components/Alert';

View File

@ -7,7 +7,8 @@ import { useScreenProtect } from '../../hooks/useScreenProtect';
import { validateMnemonic } from '../../blue_modules/bip39';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import { BlueText } from '../../BlueComponents';
import { LightningCustodianWallet, WatchOnlyWallet } from '../../class';
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import HandOffComponent from '../../components/HandOffComponent';
import QRCodeComponent from '../../components/QRCodeComponent';
import SeedWords from '../../components/SeedWords';

View File

@ -19,7 +19,10 @@ import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import { isDesktop } from '../../blue_modules/environment';
import * as fs from '../../blue_modules/fs';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import { LightningArkWallet, LightningCustodianWallet, MultisigHDWallet, WatchOnlyWallet } from '../../class';
import { LightningArkWallet } from '../../class/wallets/lightning-ark-wallet';
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
import { MultisigHDWallet } from '../../class/wallets/multisig-hd-wallet';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import presentAlert, { AlertType } from '../../components/Alert';
import { FButton, FContainer } from '../../components/FloatButtons';
import { useTheme } from '../../components/themes';

View File

@ -2,7 +2,7 @@ import React, { useReducer, useCallback } from 'react';
import { useRoute, RouteProp } from '@react-navigation/native';
import LottieView from 'lottie-react-native';
import { StyleSheet, Text, View } from 'react-native';
import { MultisigHDWallet } from '../../class';
import { MultisigHDWallet } from '../../class/wallets/multisig-hd-wallet';
import Button from '../../components/Button';
import ListItem from '../../components/ListItem';
import SafeArea from '../../components/SafeArea';

View File

@ -5,7 +5,9 @@ import Animated, { LinearTransition } from 'react-native-reanimated';
import Icon from '../../components/Icon';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import { encodeUR } from '../../blue_modules/ur';
import { HDSegwitBech32Wallet, MultisigCosigner, MultisigHDWallet } from '../../class';
import { MultisigCosigner } from '../../class/multisig-cosigner';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { MultisigHDWallet } from '../../class/wallets/multisig-hd-wallet';
import presentAlert from '../../components/Alert';
import Button from '../../components/Button';
import { useTheme } from '../../components/themes';

View File

@ -15,7 +15,7 @@ import { useStorage } from '../../hooks/context/useStorage';
import { HandOffActivityType } from '../../components/types';
import { useSettings } from '../../hooks/context/useSettings';
import { BlueSpacing20 } from '../../components/BlueSpacing';
import { HDTaprootWallet } from '../../class';
import { HDTaprootWallet } from '../../class/wallets/hd-taproot-wallet';
import { WalletDescriptor } from '../../class/wallet-descriptor.ts';
type WalletXpubRouteProp = RouteProp<{ params: { walletID: string; xpub: string } }, 'params'>;

View File

@ -6,7 +6,8 @@ import { ECPairFactory } from 'ecpair';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import ecc from '../../blue_modules/noble_ecc';
import { HDLegacyP2PKHWallet, HDSegwitBech32Wallet } from '../../class';
import { HDLegacyP2PKHWallet } from '../../class/wallets/hd-legacy-p2pkh-wallet';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
const ECPair = ECPairFactory(ecc);

View File

@ -2,7 +2,7 @@ import assert from 'assert';
import * as bitcoin from 'bitcoinjs-lib';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import { HDLegacyBreadwalletWallet } from '../../class';
import { HDLegacyBreadwalletWallet } from '../../class/wallets/hd-legacy-breadwallet-wallet';
import { AbstractHDElectrumWallet } from '../../class/wallets/abstract-hd-electrum-wallet';
jest.setTimeout(300 * 1000);

View File

@ -2,7 +2,10 @@ import assert from 'assert';
import * as bitcoin from 'bitcoinjs-lib';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import { HDSegwitBech32Transaction, HDSegwitBech32Wallet, SegwitBech32Wallet, SegwitP2SHWallet } from '../../class';
import { HDSegwitBech32Transaction } from '../../class/hd-segwit-bech32-transaction';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { SegwitBech32Wallet } from '../../class/wallets/segwit-bech32-wallet';
import { SegwitP2SHWallet } from '../../class/wallets/segwit-p2sh-wallet';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';
jest.setTimeout(150 * 1000);

View File

@ -1,7 +1,7 @@
import assert from 'assert';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import { HDSegwitBech32Wallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
jest.setTimeout(90 * 1000);

View File

@ -2,7 +2,7 @@ import assert from 'assert';
import * as bitcoin from 'bitcoinjs-lib';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import { HDSegwitP2SHWallet } from '../../class';
import { HDSegwitP2SHWallet } from '../../class/wallets/hd-segwit-p2sh-wallet';
jest.setTimeout(300 * 1000);

View File

@ -2,23 +2,20 @@ import assert from 'assert';
import fs from 'fs';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import {
HDAezeedWallet,
HDLegacyBreadwalletWallet,
HDLegacyElectrumSeedP2PKHWallet,
HDLegacyP2PKHWallet,
HDSegwitBech32Wallet,
HDSegwitElectrumSeedP2WPKHWallet,
HDSegwitP2SHWallet,
HDTaprootWallet,
LegacyWallet,
LightningArkWallet,
SegwitBech32Wallet,
SegwitP2SHWallet,
SLIP39SegwitBech32Wallet,
SLIP39SegwitP2SHWallet,
WatchOnlyWallet,
} from '../../class';
import { HDAezeedWallet } from '../../class/wallets/hd-aezeed-wallet';
import { HDLegacyBreadwalletWallet } from '../../class/wallets/hd-legacy-breadwallet-wallet';
import { HDLegacyElectrumSeedP2PKHWallet } from '../../class/wallets/hd-legacy-electrum-seed-p2pkh-wallet';
import { HDLegacyP2PKHWallet } from '../../class/wallets/hd-legacy-p2pkh-wallet';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { HDSegwitElectrumSeedP2WPKHWallet } from '../../class/wallets/hd-segwit-electrum-seed-p2wpkh-wallet';
import { HDSegwitP2SHWallet } from '../../class/wallets/hd-segwit-p2sh-wallet';
import { HDTaprootWallet } from '../../class/wallets/hd-taproot-wallet';
import { LegacyWallet } from '../../class/wallets/legacy-wallet';
import { LightningArkWallet } from '../../class/wallets/lightning-ark-wallet';
import { SegwitBech32Wallet } from '../../class/wallets/segwit-bech32-wallet';
import { SegwitP2SHWallet } from '../../class/wallets/segwit-p2sh-wallet';
import { SLIP39SegwitBech32Wallet, SLIP39SegwitP2SHWallet } from '../../class/wallets/slip39-wallets';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import startImport from '../../class/wallet-import';
import { TWallet } from '../../class/wallets/types';

View File

@ -1,7 +1,9 @@
import assert from 'assert';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import { LegacyWallet, SegwitBech32Wallet, SegwitP2SHWallet } from '../../class';
import { LegacyWallet } from '../../class/wallets/legacy-wallet';
import { SegwitBech32Wallet } from '../../class/wallets/segwit-bech32-wallet';
import { SegwitP2SHWallet } from '../../class/wallets/segwit-p2sh-wallet';
jest.setTimeout(30 * 1000);

View File

@ -2,7 +2,7 @@ import assert from 'assert';
import fs from 'fs';
import path from 'path';
import { HDSegwitBech32Wallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { LightningArkWallet } from '../../class/wallets/lightning-ark-wallet.ts';
// Mock AsyncStorage using fs in tests/integration/fixtures/ark/

View File

@ -1,6 +1,6 @@
import assert from 'assert';
import { LightningCustodianWallet } from '../../class';
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
import { fetch } from '../../util/fetch';
jest.setTimeout(200 * 1000);

View File

@ -1,7 +1,7 @@
import assert from 'assert';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import { MultisigHDWallet } from '../../class/';
import { MultisigHDWallet } from '../../class/wallets/multisig-hd-wallet';
jest.setTimeout(300 * 1000);

View File

@ -1,7 +1,7 @@
import assert from 'assert';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import { WatchOnlyWallet } from '../../class';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
jest.setTimeout(500 * 1000);

View File

@ -4,7 +4,8 @@ import * as bitcoin from 'bitcoinjs-lib';
import { ECPairFactory } from 'ecpair';
import ecc from '../../blue_modules/noble_ecc';
import { HDSegwitBech32Wallet, WatchOnlyWallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import { CreateTransactionUtxo } from '../../class/wallets/types';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';

View File

@ -2,7 +2,10 @@
import assert from 'assert';
import * as bitcoin from 'bitcoinjs-lib';
import { HDLegacyP2PKHWallet, HDSegwitBech32Wallet, HDSegwitP2SHWallet, WatchOnlyWallet } from '../../class';
import { HDLegacyP2PKHWallet } from '../../class/wallets/hd-legacy-p2pkh-wallet';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { HDSegwitP2SHWallet } from '../../class/wallets/hd-segwit-p2sh-wallet';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import { CreateTransactionUtxo } from '../../class/wallets/types.ts';
import { Transaction } from 'bitcoinjs-lib';
import { hexToUint8Array } from '../../blue_modules/uint8array-extras/index';

View File

@ -1,7 +1,8 @@
import assert from 'assert';
import DeeplinkSchemaMatch from '../../class/deeplink-schema-match';
import { HDSegwitBech32Wallet, LightningCustodianWallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { LightningCustodianWallet } from '../../class/wallets/lightning-custodian-wallet';
jest.mock('../../blue_modules/BlueElectrum', () => {
return {

View File

@ -1,6 +1,7 @@
import assert from 'assert';
import { HDAezeedWallet, WatchOnlyWallet } from '../../class';
import { HDAezeedWallet } from '../../class/wallets/hd-aezeed-wallet';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';
describe('HDAezeedWallet', () => {

View File

@ -1,6 +1,6 @@
import assert from 'assert';
import { HDLegacyBreadwalletWallet } from '../../class';
import { HDLegacyBreadwalletWallet } from '../../class/wallets/hd-legacy-breadwallet-wallet';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';
describe('HDLegacyBreadwalletWallet', () => {

View File

@ -1,6 +1,6 @@
import assert from 'assert';
import { HDLegacyElectrumSeedP2PKHWallet } from '../../class';
import { HDLegacyElectrumSeedP2PKHWallet } from '../../class/wallets/hd-legacy-electrum-seed-p2pkh-wallet';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';
describe('HDLegacyElectrumSeedP2PKHWallet', () => {

View File

@ -1,7 +1,7 @@
import assert from 'assert';
import * as bitcoin from 'bitcoinjs-lib';
import { HDLegacyP2PKHWallet } from '../../class';
import { HDLegacyP2PKHWallet } from '../../class/wallets/hd-legacy-p2pkh-wallet';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';
describe('Legacy HD (BIP44)', () => {

View File

@ -1,7 +1,7 @@
import assert from 'assert';
import * as bitcoin from 'bitcoinjs-lib';
import { HDSegwitBech32Wallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';
describe('Bech32 Segwit HD (BIP84)', () => {

View File

@ -1,6 +1,6 @@
import assert from 'assert';
import { HDSegwitElectrumSeedP2WPKHWallet } from '../../class';
import { HDSegwitElectrumSeedP2WPKHWallet } from '../../class/wallets/hd-segwit-electrum-seed-p2wpkh-wallet';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';
describe('HDSegwitElectrumSeedP2WPKHWallet', () => {

View File

@ -1,6 +1,10 @@
import assert from 'assert';
import { HDLegacyP2PKHWallet, HDSegwitP2SHWallet, LegacyWallet, SegwitBech32Wallet, SegwitP2SHWallet } from '../../class';
import { HDLegacyP2PKHWallet } from '../../class/wallets/hd-legacy-p2pkh-wallet';
import { HDSegwitP2SHWallet } from '../../class/wallets/hd-segwit-p2sh-wallet';
import { LegacyWallet } from '../../class/wallets/legacy-wallet';
import { SegwitBech32Wallet } from '../../class/wallets/segwit-bech32-wallet';
import { SegwitP2SHWallet } from '../../class/wallets/segwit-p2sh-wallet';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';
describe('P2SH Segwit HD (BIP49)', () => {

View File

@ -1,6 +1,7 @@
import assert from 'assert';
import { HDTaprootWallet, TaprootWallet } from '../../class';
import { HDTaprootWallet } from '../../class/wallets/hd-taproot-wallet';
import { TaprootWallet } from '../../class/wallets/taproot-wallet';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';
const utxos = [

View File

@ -1,7 +1,7 @@
import assert from 'assert';
import * as bitcoin from 'bitcoinjs-lib';
import { LegacyWallet } from '../../class';
import { LegacyWallet } from '../../class/wallets/legacy-wallet';
describe('Legacy wallet', () => {
it('can validate addresses', () => {

View File

@ -3,7 +3,7 @@ import * as bitcoin from 'bitcoinjs-lib';
import Base43 from '../../blue_modules/base43';
import { BlueURDecoder, decodeUR, encodeUR } from '../../blue_modules/ur';
import { MultisigHDWallet } from '../../class/';
import { MultisigHDWallet } from '../../class/wallets/multisig-hd-wallet';
import { MultisigCosigner } from '../../class/multisig-cosigner';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';

View File

@ -2,7 +2,7 @@ import assert from 'assert';
import * as bitcoin from 'bitcoinjs-lib';
import { PayjoinClient } from 'payjoin-client';
import { HDSegwitBech32Wallet } from '../../class';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import PayjoinTransaction from '../../class/payjoin-transaction';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';

View File

@ -1,7 +1,7 @@
import assert from 'assert';
import * as bitcoin from 'bitcoinjs-lib';
import { SegwitBech32Wallet } from '../../class';
import { SegwitBech32Wallet } from '../../class/wallets/segwit-bech32-wallet';
describe('Segwit P2SH wallet', () => {
it('can create transaction', async () => {

View File

@ -1,7 +1,7 @@
import assert from 'assert';
import * as bitcoin from 'bitcoinjs-lib';
import { SegwitP2SHWallet } from '../../class';
import { SegwitP2SHWallet } from '../../class/wallets/segwit-p2sh-wallet';
describe('Segwit P2SH wallet', () => {
it('can create transaction', async () => {

View File

@ -1,6 +1,6 @@
import assert from 'assert';
import { SLIP39LegacyP2PKHWallet, SLIP39SegwitBech32Wallet, SLIP39SegwitP2SHWallet } from '../../class';
import { SLIP39LegacyP2PKHWallet, SLIP39SegwitBech32Wallet, SLIP39SegwitP2SHWallet } from '../../class/wallets/slip39-wallets';
global.crypto = require('crypto');

View File

@ -1,7 +1,10 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import assert from 'assert';
import { BlueApp, HDSegwitBech32Wallet, SegwitP2SHWallet, WatchOnlyWallet } from '../../class';
import { BlueApp } from '../../class/blue-app';
import { HDSegwitBech32Wallet } from '../../class/wallets/hd-segwit-bech32-wallet';
import { SegwitP2SHWallet } from '../../class/wallets/segwit-p2sh-wallet';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
jest.mock('../../blue_modules/BlueElectrum', () => {
return {

View File

@ -1,7 +1,7 @@
import assert from 'assert';
import * as bitcoin from 'bitcoinjs-lib';
import { TaprootWallet } from '../../class';
import { TaprootWallet } from '../../class/wallets/taproot-wallet';
describe('Taproot wallet', () => {
it('can convert scriptPubKey to address', () => {

View File

@ -2,7 +2,7 @@ import assert from 'assert';
import { Psbt } from 'bitcoinjs-lib';
import { BlueURDecoder, clearUseURv1, decodeUR, encodeUR, extractSingleWorkload, setUseURv1 } from '../../blue_modules/ur';
import { WatchOnlyWallet } from '../../class';
import { WatchOnlyWallet } from '../../class/wallets/watch-only-wallet';
import { uint8ArrayToHex } from '../../blue_modules/uint8array-extras';
describe('Watch only wallet', () => {