mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +00:00
chore: printVs
This commit is contained in:
parent
b927af97ba
commit
f702a19965
4 changed files with 21 additions and 19 deletions
|
@ -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);
|
||||
|
|
|
@ -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 {};
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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<String, dynamic> 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;
|
||||
|
|
Loading…
Reference in a new issue