diff --git a/cw_bitcoin/lib/bitcoin_hardware_wallet_service.dart b/cw_bitcoin/lib/bitcoin_hardware_wallet_service.dart index 3f1a7a4c2..15ab4f6c1 100644 --- a/cw_bitcoin/lib/bitcoin_hardware_wallet_service.dart +++ b/cw_bitcoin/lib/bitcoin_hardware_wallet_service.dart @@ -5,7 +5,6 @@ import 'package:blockchain_utils/blockchain_utils.dart'; import 'package:cw_core/hardware/hardware_account_data.dart'; import 'package:ledger_bitcoin/ledger_bitcoin.dart'; import 'package:ledger_flutter_plus/ledger_flutter_plus.dart'; -import 'package:cw_core/utils/print_verbose.dart'; class BitcoinHardwareWalletService { BitcoinHardwareWalletService(this.ledgerConnection); diff --git a/cw_bitcoin/lib/bitcoin_wallet.dart b/cw_bitcoin/lib/bitcoin_wallet.dart index a7e442e9d..1846f225c 100644 --- a/cw_bitcoin/lib/bitcoin_wallet.dart +++ b/cw_bitcoin/lib/bitcoin_wallet.dart @@ -21,6 +21,7 @@ import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/sync_status.dart'; import 'package:cw_core/transaction_direction.dart'; import 'package:cw_core/unspent_coins_info.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_info.dart'; import 'package:cw_core/wallet_keys_file.dart'; // import 'package:cw_core/wallet_type.dart'; @@ -134,14 +135,14 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { seedBytes = ElectrumV2SeedGenerator.generateFromString(mnemonic, passphrase); hdWallets[CWBitcoinDerivationType.electrum] = Bip32Slip10Secp256k1.fromSeed(seedBytes); } catch (e) { - print("electrum_v2 seed error: $e"); + printV("electrum_v2 seed error: $e"); try { seedBytes = ElectrumV1SeedGenerator(mnemonic).generate(); hdWallets[CWBitcoinDerivationType.electrum] = Bip32Slip10Secp256k1.fromSeed(seedBytes); } catch (e) { - print("electrum_v1 seed error: $e"); + printV("electrum_v1 seed error: $e"); } } @@ -265,14 +266,14 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { seedBytes = ElectrumV2SeedGenerator.generateFromString(mnemonic, passphrase); hdWallets[CWBitcoinDerivationType.electrum] = Bip32Slip10Secp256k1.fromSeed(seedBytes); } catch (e) { - print("electrum_v2 seed error: $e"); + printV("electrum_v2 seed error: $e"); try { seedBytes = ElectrumV1SeedGenerator(mnemonic).generate(); hdWallets[CWBitcoinDerivationType.electrum] = Bip32Slip10Secp256k1.fromSeed(seedBytes); } catch (e) { - print("electrum_v1 seed error: $e"); + printV("electrum_v1 seed error: $e"); } } @@ -629,7 +630,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { // .toList(), // ); - // print("registered: $registered"); + // printV("registered: $registered"); } @action @@ -657,7 +658,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { switch (workerMethod) { case ElectrumRequestMethods.tweaksSubscribeMethod: if (workerError != null) { - print(messageJson); + printV(messageJson); // _onConnectionStatusChange(ConnectionStatus.failed); break; } @@ -827,7 +828,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { // return historiesWithDetails; // } catch (e) { - // print("fetchTransactions $e"); + // printV("fetchTransactions $e"); // return {}; // } } diff --git a/cw_bitcoin/lib/electrum_transaction_info.dart b/cw_bitcoin/lib/electrum_transaction_info.dart index b5e4bede5..43e462f7c 100644 --- a/cw_bitcoin/lib/electrum_transaction_info.dart +++ b/cw_bitcoin/lib/electrum_transaction_info.dart @@ -6,6 +6,7 @@ import 'package:cw_bitcoin/bitcoin_unspent.dart'; import 'package:cw_core/transaction_direction.dart'; import 'package:cw_core/transaction_info.dart'; import 'package:cw_core/format_amount.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:hex/hex.dart'; @@ -173,10 +174,10 @@ class ElectrumTransactionInfo extends TransactionInfo { } } } catch (e) { - print(bundle.originalTransaction.txId()); - print("original: ${bundle.originalTransaction}"); - print("bundle.inputs: ${bundle.originalTransaction.inputs}"); - print("ins: ${bundle.ins}"); + printV(bundle.originalTransaction.txId()); + printV("original: ${bundle.originalTransaction}"); + printV("bundle.inputs: ${bundle.originalTransaction.inputs}"); + printV("ins: ${bundle.ins}"); rethrow; } diff --git a/cw_bitcoin/lib/electrum_worker/electrum_worker.dart b/cw_bitcoin/lib/electrum_worker/electrum_worker.dart index 055b9f246..326fcf64a 100644 --- a/cw_bitcoin/lib/electrum_worker/electrum_worker.dart +++ b/cw_bitcoin/lib/electrum_worker/electrum_worker.dart @@ -15,6 +15,7 @@ import 'package:cw_bitcoin/electrum_worker/electrum_worker_params.dart'; import 'package:cw_bitcoin/electrum_worker/methods/methods.dart'; import 'package:cw_core/sync_status.dart'; import 'package:cw_core/transaction_direction.dart'; +import 'package:cw_core/utils/print_verbose.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:http/http.dart' as http; import 'package:rxdart/rxdart.dart'; @@ -49,7 +50,7 @@ class ElectrumWorker { } void handleMessage(dynamic message) async { - print("Worker: received message: $message"); + printV("Worker: received message: $message"); try { Map messageJson; @@ -107,7 +108,7 @@ class ElectrumWorker { ); break; case ElectrumWorkerMethods.stopScanningMethod: - print("Worker: received message: $message"); + printV("Worker: received message: $message"); await _handleStopScanning( ElectrumWorkerStopScanningRequest.fromJson(messageJson), ); @@ -205,7 +206,7 @@ class ElectrumWorker { return; } - print("status: $status"); + printV("status: $status"); _sendResponse(ElectrumWorkerScripthashesSubscribeResponse( result: {address: req.onResponse(status)}, @@ -756,13 +757,13 @@ class ElectrumWorker { return; } catch (e, stacktrace) { - print(stacktrace); - print(e.toString()); + printV(stacktrace); + printV(e.toString()); } } } catch (e, stacktrace) { - print(stacktrace); - print(e.toString()); + printV(stacktrace); + printV(e.toString()); } syncHeight = tweakHeight;