diff --git a/lib/models/exchange/exchange_form_state.dart b/lib/models/exchange/exchange_form_state.dart index 62509f7bb..5efa446a2 100644 --- a/lib/models/exchange/exchange_form_state.dart +++ b/lib/models/exchange/exchange_form_state.dart @@ -208,8 +208,9 @@ class ExchangeFormState extends ChangeNotifier { reversed: reversed, ); - debugPrint( - "_updated TO: _from=${_from!.ticker} _to=${_to!.ticker} _fromAmount=$fromAmount _toAmount=$toAmount rate:$rate for: $exchange"); + //todo: check if print needed + // debugPrint( + // "_updated TO: _from=${_from!.ticker} _to=${_to!.ticker} _fromAmount=$fromAmount _toAmount=$toAmount rate:$rate for: $exchange"); if (shouldNotifyListeners) { notifyListeners(); @@ -236,8 +237,9 @@ class ExchangeFormState extends ChangeNotifier { reversed: reversed, ); - debugPrint( - "_updated FROM: _from=${_from!.ticker} _to=${_to!.ticker} _fromAmount=$fromAmount _toAmount=$toAmount rate:$rate for: $exchange"); + //todo: check if print needed + // debugPrint( + // "_updated FROM: _from=${_from!.ticker} _to=${_to!.ticker} _fromAmount=$fromAmount _toAmount=$toAmount rate:$rate for: $exchange"); if (shouldNotifyListeners) { notifyListeners(); } @@ -325,8 +327,9 @@ class ExchangeFormState extends ChangeNotifier { minAmount = range.min; maxAmount = range.max; - debugPrint( - "updated range for: $exchange for $_fromTicker-$_toTicker: $range"); + //todo: check if print needed + // debugPrint( + // "updated range for: $exchange for $_fromTicker-$_toTicker: $range"); if (shouldNotifyListeners) { notifyListeners(); @@ -377,8 +380,9 @@ class ExchangeFormState extends ChangeNotifier { rate = (toAmount! / fromAmount!).toDecimal(scaleOnInfinitePrecision: 12); - debugPrint( - "updated estimate for: $exchange for $fromTicker-$toTicker: $estimate"); + //todo: check if print needed + // debugPrint( + // "updated estimate for: $exchange for $fromTicker-$toTicker: $estimate"); if (shouldNotifyListeners) { notifyListeners(); diff --git a/lib/pages/add_wallet_views/add_wallet_view/sub_widgets/next_button.dart b/lib/pages/add_wallet_views/add_wallet_view/sub_widgets/next_button.dart index 9314a8770..9cc91cb45 100644 --- a/lib/pages/add_wallet_views/add_wallet_view/sub_widgets/next_button.dart +++ b/lib/pages/add_wallet_views/add_wallet_view/sub_widgets/next_button.dart @@ -27,7 +27,9 @@ class AddWalletNextButton extends ConsumerWidget { : () { final selectedCoin = ref.read(addWalletSelectedCoinStateProvider.state).state; - debugPrint("Next pressed with ${selectedCoin!.name} selected!"); + + //todo: check if print needed + // debugPrint("Next pressed with ${selectedCoin!.name} selected!"); Navigator.of(context).pushNamed( CreateOrRestoreWalletView.routeName, arguments: selectedCoin, diff --git a/lib/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart b/lib/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart index 95822a25f..71faf92e4 100644 --- a/lib/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart +++ b/lib/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart @@ -92,8 +92,9 @@ class _NameYourWalletViewState extends ConsumerState { @override Widget build(BuildContext context) { - debugPrint( - "BUILD: NameYourWalletView with ${coin.name} ${addWalletType.name}"); + //todo: check if print needed + // debugPrint( + // "BUILD: NameYourWalletView with ${coin.name} ${addWalletType.name}"); if (isDesktop) { return DesktopScaffold( @@ -274,8 +275,7 @@ class _NameYourWalletViewState extends ConsumerState { ), GestureDetector( onTap: () async { - textEditingController.text = - await _generateRandomWalletName(); + textEditingController.text = await _generateRandomWalletName(); setState(() { _nextEnabled = true; _showDiceIcon = false; diff --git a/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart b/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart index 6899e4c1a..7a21a6f72 100644 --- a/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart +++ b/lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart @@ -203,8 +203,9 @@ class _RestoreWalletViewState extends ConsumerState { const double overestimateSecondsPerBlock = 61; int chosenSeconds = secondsSinceEpoch - epicCashFirstBlock; int approximateHeight = chosenSeconds ~/ overestimateSecondsPerBlock; - debugPrint( - "approximate height: $approximateHeight chosen_seconds: $chosenSeconds"); + //todo: check if print needed + // debugPrint( + // "approximate height: $approximateHeight chosen_seconds: $chosenSeconds"); height = approximateHeight; if (height < 0) { height = 0; @@ -519,7 +520,8 @@ class _RestoreWalletViewState extends ConsumerState { } Future pasteMnemonic() async { - debugPrint("restoreWalletPasteButton tapped"); + //todo: check if print needed + // debugPrint("restoreWalletPasteButton tapped"); final ClipboardData? data = await widget.clipboard.getData(Clipboard.kTextPlain); diff --git a/lib/pages/add_wallet_views/verify_recovery_phrase_view/verify_recovery_phrase_view.dart b/lib/pages/add_wallet_views/verify_recovery_phrase_view/verify_recovery_phrase_view.dart index b1c1886de..0ce1fac26 100644 --- a/lib/pages/add_wallet_views/verify_recovery_phrase_view/verify_recovery_phrase_view.dart +++ b/lib/pages/add_wallet_views/verify_recovery_phrase_view/verify_recovery_phrase_view.dart @@ -160,7 +160,8 @@ class _VerifyRecoveryPhraseViewState result.insert(random.nextInt(wordsToShow), chosenWord); - debugPrint("Mnemonic game correct word: $chosenWord"); + //todo: this prints sensitive info + // debugPrint("Mnemonic game correct word: $chosenWord"); return Tuple2(result, chosenWord); } diff --git a/lib/pages/buy_view/buy_view.dart b/lib/pages/buy_view/buy_view.dart index 8f759b79c..cc536dd45 100644 --- a/lib/pages/buy_view/buy_view.dart +++ b/lib/pages/buy_view/buy_view.dart @@ -11,7 +11,8 @@ class BuyView extends StatefulWidget { class _BuyViewState extends State { @override Widget build(BuildContext context) { - debugPrint("BUILD: BuyView"); + //todo: check if print needed + // debugPrint("BUILD: BuyView"); return SafeArea( child: Center( child: SingleChildScrollView( diff --git a/lib/pages/exchange_view/exchange_form.dart b/lib/pages/exchange_view/exchange_form.dart index b25a6fa3f..f584e16e5 100644 --- a/lib/pages/exchange_view/exchange_form.dart +++ b/lib/pages/exchange_view/exchange_form.dart @@ -1182,7 +1182,8 @@ class _ExchangeFormState extends ConsumerState { next.isEmpty ? "-" : next; - debugPrint("RECEIVE AMOUNT LISTENER ACTIVATED"); + //todo: check if print needed + // debugPrint("RECEIVE AMOUNT LISTENER ACTIVATED"); if (_swapLock) { _sendController.text = ref.read(exchangeFormStateProvider).fromAmountString; @@ -1194,7 +1195,8 @@ class _ExchangeFormState extends ConsumerState { (previous, String next) { if (!_sendFocusNode.hasFocus) { _sendController.text = next; - debugPrint("SEND AMOUNT LISTENER ACTIVATED"); + //todo: check if print needed + // debugPrint("SEND AMOUNT LISTENER ACTIVATED"); if (_swapLock) { _receiveController.text = isEstimated ? ref.read(exchangeFormStateProvider).toAmountString.isEmpty diff --git a/lib/pages/exchange_view/exchange_view.dart b/lib/pages/exchange_view/exchange_view.dart index ed99047b2..8fada855d 100644 --- a/lib/pages/exchange_view/exchange_view.dart +++ b/lib/pages/exchange_view/exchange_view.dart @@ -109,7 +109,8 @@ class _ExchangeViewState extends ConsumerState { .read(tradeSentFromStackLookupProvider) .all; - debugPrint("ALL: $lookup"); + //todo: check if print needed + // debugPrint("ALL: $lookup"); final String? txid = ref .read(tradeSentFromStackLookupProvider) @@ -125,7 +126,8 @@ class _ExchangeViewState extends ConsumerState { .read(walletsChangeNotifierProvider) .getManager(walletIds.first); - debugPrint("name: ${manager.walletName}"); + //todo: check if print needed + // debugPrint("name: ${manager.walletName}"); // TODO store tx data completely locally in isar so we don't lock up ui here when querying txData final txData = await manager.transactionData; diff --git a/lib/pages/exchange_view/sub_widgets/exchange_rate_sheet.dart b/lib/pages/exchange_view/sub_widgets/exchange_rate_sheet.dart index efef2f964..b56d2fbff 100644 --- a/lib/pages/exchange_view/sub_widgets/exchange_rate_sheet.dart +++ b/lib/pages/exchange_view/sub_widgets/exchange_rate_sheet.dart @@ -84,7 +84,8 @@ class ExchangeRateSheet extends ConsumerWidget { groupValue: ref.watch(prefsChangeNotifierProvider .select((value) => value.exchangeRateType)), onChanged: (x) { - debugPrint(x.toString()); + //todo: check if print needed + // debugPrint(x.toString()); ref .read(prefsChangeNotifierProvider) .exchangeRateType = diff --git a/lib/pages/exchange_view/trade_details_view.dart b/lib/pages/exchange_view/trade_details_view.dart index b2b6b5202..479600569 100644 --- a/lib/pages/exchange_view/trade_details_view.dart +++ b/lib/pages/exchange_view/trade_details_view.dart @@ -157,9 +157,10 @@ class _TradeDetailsViewState extends ConsumerState { trade.status == "Failed" || trade.status == "failed"); - debugPrint("sentFromStack: $sentFromStack"); - debugPrint("hasTx: $hasTx"); - debugPrint("trade: ${trade.toString()}"); + //todo: check if print needed + // debugPrint("sentFromStack: $sentFromStack"); + // debugPrint("hasTx: $hasTx"); + // debugPrint("trade: ${trade.toString()}"); final sendAmount = Decimal.tryParse(trade.payInAmount) ?? Decimal.parse("-1"); diff --git a/lib/pages/home_view/home_view.dart b/lib/pages/home_view/home_view.dart index 5f41bfb16..7d394d7ce 100644 --- a/lib/pages/home_view/home_view.dart +++ b/lib/pages/home_view/home_view.dart @@ -257,7 +257,8 @@ class _HomeViewState extends ConsumerState { height: 20, ), onPressed: () { - debugPrint("main view settings tapped"); + //todo: check if print needed + // debugPrint("main view settings tapped"); Navigator.of(context) .pushNamed(GlobalSettingsView.routeName); }, diff --git a/lib/pages/home_view/sub_widgets/home_view_button_bar.dart b/lib/pages/home_view/sub_widgets/home_view_button_bar.dart index 341fc35da..83a445cbf 100644 --- a/lib/pages/home_view/sub_widgets/home_view_button_bar.dart +++ b/lib/pages/home_view/sub_widgets/home_view_button_bar.dart @@ -34,7 +34,8 @@ class _HomeViewButtonBarState extends ConsumerState { @override Widget build(BuildContext context) { - debugPrint("BUILD: HomeViewButtonBar"); + //todo: check if print needed + // debugPrint("BUILD: HomeViewButtonBar"); final selectedIndex = ref.watch(homeViewPageIndexStateProvider.state).state; return Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, diff --git a/lib/pages/receive_view/generate_receiving_uri_qr_code_view.dart b/lib/pages/receive_view/generate_receiving_uri_qr_code_view.dart index 46b48bb42..27bc7b151 100644 --- a/lib/pages/receive_view/generate_receiving_uri_qr_code_view.dart +++ b/lib/pages/receive_view/generate_receiving_uri_qr_code_view.dart @@ -122,6 +122,7 @@ class _GenerateUriQrCodeViewState extends State { text: "Receive URI QR Code"); } } catch (e) { + //todo: comeback to this debugPrint(e.toString()); } } diff --git a/lib/pages/send_view/confirm_transaction_view.dart b/lib/pages/send_view/confirm_transaction_view.dart index 3ad391c82..b7e2181a1 100644 --- a/lib/pages/send_view/confirm_transaction_view.dart +++ b/lib/pages/send_view/confirm_transaction_view.dart @@ -119,6 +119,7 @@ class _ConfirmTransactionViewState return; } } catch (e, s) { + //todo: comeback to this debugPrint("$e\n$s"); // pop sending dialog Navigator.of(context).pop(); diff --git a/lib/pages/send_view/sub_widgets/transaction_fee_selection_sheet.dart b/lib/pages/send_view/sub_widgets/transaction_fee_selection_sheet.dart index 2f5ce2f3e..8ad6d0ca5 100644 --- a/lib/pages/send_view/sub_widgets/transaction_fee_selection_sheet.dart +++ b/lib/pages/send_view/sub_widgets/transaction_fee_selection_sheet.dart @@ -548,7 +548,8 @@ class _TransactionFeeSelectionSheetState .watch(feeRateTypeStateProvider.state) .state, onChanged: (x) { - debugPrint(x.toString()); + //todo: check if print needed + // debugPrint(x.toString()); ref .read(feeRateTypeStateProvider.state) .state = FeeRateType.slow; diff --git a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/swb_file_system.dart b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/swb_file_system.dart index e88e11dfe..8b8b9d695 100644 --- a/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/swb_file_system.dart +++ b/lib/pages/settings_views/global_settings_view/stack_backup_views/helpers/swb_file_system.dart @@ -20,11 +20,13 @@ class SWBFileSystem { await Permission.storage.request(); } rootPath = (await getApplicationDocumentsDirectory()); - debugPrint(rootPath!.absolute.toString()); + //todo: check if print needed + // debugPrint(rootPath!.absolute.toString()); if (Platform.isAndroid) { rootPath = Directory("/storage/emulated/0/"); } - debugPrint(rootPath!.absolute.toString()); + //todo: check if print needed + // debugPrint(rootPath!.absolute.toString()); late Directory sampleFolder; @@ -45,6 +47,7 @@ class SWBFileSystem { sampleFolder.createSync(recursive: true); } } catch (e, s) { + // todo: come back to this debugPrint("$e $s"); } @@ -58,6 +61,7 @@ class SWBFileSystem { sampleFile.createSync(); } } catch (e, s) { + // todo: come back to this debugPrint("$e $s"); } startPath = sampleFolder; diff --git a/lib/pages/wallet_view/sub_widgets/transactions_list.dart b/lib/pages/wallet_view/sub_widgets/transactions_list.dart index d7913456f..704a4e3d8 100644 --- a/lib/pages/wallet_view/sub_widgets/transactions_list.dart +++ b/lib/pages/wallet_view/sub_widgets/transactions_list.dart @@ -234,7 +234,8 @@ class _TransactionsListState extends ConsumerState { list.sort((a, b) => b.timestamp - a.timestamp); return RefreshIndicator( onRefresh: () async { - debugPrint("pulled down to refresh on transaction list"); + //todo: check if print needed + // debugPrint("pulled down to refresh on transaction list"); final managerProvider = ref .read(walletsChangeNotifierProvider) .getManagerProvider(widget.walletId); diff --git a/lib/pages/wallet_view/transaction_views/all_transactions_view.dart b/lib/pages/wallet_view/transaction_views/all_transactions_view.dart index 15061a841..27bb36331 100644 --- a/lib/pages/wallet_view/transaction_views/all_transactions_view.dart +++ b/lib/pages/wallet_view/transaction_views/all_transactions_view.dart @@ -77,7 +77,8 @@ class _TransactionDetailsViewState extends ConsumerState { return transactions; } - debugPrint("FILTER: $filter"); + //todo: check if print needed + // debugPrint("FILTER: $filter"); final contacts = ref.read(addressBookServiceProvider).contacts; final notes = @@ -449,7 +450,8 @@ class _TransactionDetailsViewState extends ConsumerState { final criteria = ref.watch(transactionFilterProvider.state).state; - debugPrint("Consumer build called"); + //todo: check if print needed + // debugPrint("Consumer build called"); return FutureBuilder( future: ref.watch(managerProvider diff --git a/lib/pages/wallet_view/wallet_view.dart b/lib/pages/wallet_view/wallet_view.dart index 61a1da0ac..4b415074c 100644 --- a/lib/pages/wallet_view/wallet_view.dart +++ b/lib/pages/wallet_view/wallet_view.dart @@ -529,7 +529,8 @@ class _WalletViewState extends ConsumerState { height: 20, ), onPressed: () { - debugPrint("wallet view settings tapped"); + //todo: check if print needed + // debugPrint("wallet view settings tapped"); Navigator.of(context).pushNamed( WalletSettingsView.routeName, arguments: Tuple4( diff --git a/lib/pages_desktop_specific/desktop_exchange/desktop_all_trades_view.dart b/lib/pages_desktop_specific/desktop_exchange/desktop_all_trades_view.dart index 9a4878101..472460469 100644 --- a/lib/pages_desktop_specific/desktop_exchange/desktop_all_trades_view.dart +++ b/lib/pages_desktop_specific/desktop_exchange/desktop_all_trades_view.dart @@ -346,7 +346,8 @@ class _DesktopTradeRowCardState extends ConsumerState { .read(walletsChangeNotifierProvider) .getManager(walletIds.first); - debugPrint("name: ${manager.walletName}"); + //todo: check if print needed + // debugPrint("name: ${manager.walletName}"); // TODO store tx data completely locally in isar so we don't lock up ui here when querying txData final txData = await manager.transactionData; diff --git a/lib/pages_desktop_specific/desktop_exchange/subwidgets/desktop_trade_history.dart b/lib/pages_desktop_specific/desktop_exchange/subwidgets/desktop_trade_history.dart index 54726e62a..2ba3078ac 100644 --- a/lib/pages_desktop_specific/desktop_exchange/subwidgets/desktop_trade_history.dart +++ b/lib/pages_desktop_specific/desktop_exchange/subwidgets/desktop_trade_history.dart @@ -106,7 +106,8 @@ class _DesktopTradeHistoryState extends ConsumerState { final lookup = ref.read(tradeSentFromStackLookupProvider).all; - debugPrint("ALL: $lookup"); + //todo: check if print needed + // debugPrint("ALL: $lookup"); final String? txid = ref .read(tradeSentFromStackLookupProvider) @@ -122,7 +123,8 @@ class _DesktopTradeHistoryState extends ConsumerState { .read(walletsChangeNotifierProvider) .getManager(walletIds.first); - debugPrint("name: ${manager.walletName}"); + //todo: check if print needed + // debugPrint("name: ${manager.walletName}"); // TODO store tx data completely locally in isar so we don't lock up ui here when querying txData final txData = await manager.transactionData; diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart index cd3e3f11c..c5c3f22b1 100644 --- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart +++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart @@ -2665,6 +2665,7 @@ class BitcoinCashWallet extends CoinServiceAPI { satoshisBeingUsed - satoshiAmountToSend - 1, ], // dust limit is the minimum amount a change output should be ))["vSize"] as int; + //todo: check if print needed debugPrint("vSizeForOneOutput $vSizeForOneOutput"); debugPrint("vSizeForTwoOutPuts $vSizeForTwoOutPuts"); @@ -3140,6 +3141,7 @@ class BitcoinCashWallet extends CoinServiceAPI { final tx = builder.build(); final txHex = tx.toHex(); final vSize = tx.virtualSize(); + //todo: check if print needed Logger.print("bch raw hex: $txHex"); return {"hex": txHex, "vSize": vSize}; diff --git a/lib/services/coins/dogecoin/dogecoin_wallet.dart b/lib/services/coins/dogecoin/dogecoin_wallet.dart index 81b318188..e477dfc78 100644 --- a/lib/services/coins/dogecoin/dogecoin_wallet.dart +++ b/lib/services/coins/dogecoin/dogecoin_wallet.dart @@ -2476,6 +2476,7 @@ class DogecoinWallet extends CoinServiceAPI { satoshisBeingUsed - satoshiAmountToSend - 1, ], // dust limit is the minimum amount a change output should be ))["vSize"] as int; + //todo: check if print needed debugPrint("vSizeForOneOutput $vSizeForOneOutput"); debugPrint("vSizeForTwoOutPuts $vSizeForTwoOutPuts"); diff --git a/lib/services/coins/epiccash/epiccash_wallet.dart b/lib/services/coins/epiccash/epiccash_wallet.dart index fcf728fb8..77d1bbad2 100644 --- a/lib/services/coins/epiccash/epiccash_wallet.dart +++ b/lib/services/coins/epiccash/epiccash_wallet.dart @@ -978,7 +978,8 @@ class EpicCashWallet extends CoinServiceAPI { await _secureStore.write(key: '${_walletId}_wallet', value: walletOpen); if ((DB.instance.get(boxName: walletId, key: "id")) == null) { - debugPrint("Exception was thrown"); + //todo: check if print needed + // debugPrint("Exception was thrown"); throw Exception( "Attempted to initialize an existing wallet using an unknown wallet ID!"); } @@ -1023,8 +1024,9 @@ class EpicCashWallet extends CoinServiceAPI { const double overestimateSecondsPerBlock = 61; int chosenSeconds = secondsSinceEpoch - epicCashFirstBlock; int approximateHeight = chosenSeconds ~/ overestimateSecondsPerBlock; - debugPrint( - "approximate height: $approximateHeight chosen_seconds: $chosenSeconds"); + //todo: check if print needed + // debugPrint( + // "approximate height: $approximateHeight chosen_seconds: $chosenSeconds"); int height = approximateHeight; if (height < 0) { height = 0; @@ -1229,6 +1231,7 @@ class EpicCashWallet extends CoinServiceAPI { realfee = (Decimal.parse(txObject["fee"].toString())).toBigInt().toInt(); } catch (e, s) { + //todo: come back to this debugPrint("$e $s"); } @@ -2183,6 +2186,7 @@ class EpicCashWallet extends CoinServiceAPI { try { confirmations = currentChainHeight - txHeight; } catch (e, s) { + //todo: come back to this debugPrint("$e $s"); } midSortedTx["confirmations"] = confirmations; diff --git a/lib/services/coins/firo/firo_wallet.dart b/lib/services/coins/firo/firo_wallet.dart index 7445d718a..ca3d5b586 100644 --- a/lib/services/coins/firo/firo_wallet.dart +++ b/lib/services/coins/firo/firo_wallet.dart @@ -284,7 +284,8 @@ Future> isolateRestore( coin.anonymitySetId != setId; }, orElse: () => {}); if (duplicateCoin.isNotEmpty) { - debugPrint("removing duplicate: $duplicateCoin"); + //todo: check if print needed + // debugPrint("removing duplicate: $duplicateCoin"); lelantusCoins.remove(duplicateCoin); } lelantusCoins.add({ @@ -325,7 +326,8 @@ Future> isolateRestore( coin.anonymitySetId != setId; }, orElse: () => {}); if (duplicateCoin.isNotEmpty) { - debugPrint("removing duplicate: $duplicateCoin"); + //todo: check if print needed + // debugPrint("removing duplicate: $duplicateCoin"); lelantusCoins.remove(duplicateCoin); } lelantusCoins.add({ @@ -1231,6 +1233,7 @@ class FiroWallet extends CoinServiceAPI { return txid; } catch (e, s) { + //todo: come back to this debugPrint("$e $s"); return txData["txid"] as String; // don't throw anything here or it will tell the user that th tx @@ -1487,6 +1490,7 @@ class FiroWallet extends CoinServiceAPI { satoshisBeingUsed - satoshiAmountToSend - 1, ], // dust limit is the minimum amount a change output should be ))["vSize"] as int; + //todo: check if print needed debugPrint("vSizeForOneOutput $vSizeForOneOutput"); debugPrint("vSizeForTwoOutPuts $vSizeForTwoOutPuts"); @@ -2666,7 +2670,8 @@ class FiroWallet extends CoinServiceAPI { /// Builds and signs a transaction Future> buildMintTransaction(List utxosToUse, int satoshisPerRecipient, List> mintsMap) async { - debugPrint(utxosToUse.toString()); + //todo: check if print needed + // debugPrint(utxosToUse.toString()); List addressesToDerive = []; // Populating the addresses to derive diff --git a/lib/services/coins/manager.dart b/lib/services/coins/manager.dart index 8054fe168..c850358eb 100644 --- a/lib/services/coins/manager.dart +++ b/lib/services/coins/manager.dart @@ -48,6 +48,7 @@ class Manager with ChangeNotifier { if (_isActiveWallet != isActive) { _isActiveWallet = isActive; _currentWallet.onIsActiveWalletChanged?.call(isActive); + //todo: check if print needed debugPrint( "wallet ID: ${_currentWallet.walletId} is active set to: $isActive"); } else { diff --git a/lib/services/coins/monero/monero_wallet.dart b/lib/services/coins/monero/monero_wallet.dart index 6f1e49ee5..91a6c5ad3 100644 --- a/lib/services/coins/monero/monero_wallet.dart +++ b/lib/services/coins/monero/monero_wallet.dart @@ -457,7 +457,8 @@ class MoneroWallet extends CoinServiceAPI { if (isActive || shouldAutoSync) { timer ??= Timer.periodic(const Duration(seconds: 60), (timer) async { - debugPrint("run timer"); + //todo: check if print needed + // debugPrint("run timer"); //TODO: check for new data and refresh if needed. if monero even needs this // chain height check currently broken // if ((await chainHeight) != (await storedChainHeight)) { @@ -471,7 +472,8 @@ class MoneroWallet extends CoinServiceAPI { }); moneroAutosaveTimer ??= Timer.periodic(const Duration(seconds: 93), (timer) async { - debugPrint("run monero timer"); + //todo: check if print needed + // debugPrint("run monero timer"); if (isActive) { await walletBase?.save(); GlobalEventBus.instance.fire(UpdatedInBackgroundEvent( @@ -724,6 +726,7 @@ class MoneroWallet extends CoinServiceAPI { walletBase?.close(); walletBase = wallet as MoneroWalletBase; } catch (e, s) { + //todo: come back to this debugPrint(e.toString()); debugPrint(s.toString()); } @@ -826,7 +829,8 @@ class MoneroWallet extends CoinServiceAPI { level: LogLevel.Info); if ((DB.instance.get(boxName: walletId, key: "id")) == null) { - debugPrint("Exception was thrown"); + //todo: check if print is needed + // debugPrint("Exception was thrown"); throw Exception( "Attempted to initialize an existing wallet using an unknown wallet ID!"); } @@ -847,7 +851,8 @@ class MoneroWallet extends CoinServiceAPI { try { password = await keysStorage?.getWalletPassword(walletName: _walletId); } catch (e, s) { - debugPrint("Exception was thrown $e $s"); + //todo: check if print needed + // debugPrint("Exception was thrown $e $s"); throw Exception("Password not found $e, $s"); } walletBase = (await walletService?.openWallet(_walletId, password!)) @@ -1125,7 +1130,8 @@ class MoneroWallet extends CoinServiceAPI { for (var element in walletBase!.balance!.entries) { bal = bal + element.value.fullBalance; } - debugPrint("balances: $transactionBalance $bal"); + //todo: check if print needed + // debugPrint("balances: $transactionBalance $bal"); if (isActive) { String am = moneroAmountToString(amount: bal); @@ -1153,7 +1159,8 @@ class MoneroWallet extends CoinServiceAPI { password = await keysStorage?.getWalletPassword(walletName: _walletId); } catch (e, s) { - debugPrint("Exception was thrown $e $s"); + //todo: check if print needed + // debugPrint("Exception was thrown $e $s"); throw Exception("Password not found $e, $s"); } walletBase = (await walletService?.openWallet(_walletId, password!)) diff --git a/lib/services/coins/wownero/wownero_wallet.dart b/lib/services/coins/wownero/wownero_wallet.dart index 72580ea4a..9e152d9e6 100644 --- a/lib/services/coins/wownero/wownero_wallet.dart +++ b/lib/services/coins/wownero/wownero_wallet.dart @@ -458,7 +458,8 @@ class WowneroWallet extends CoinServiceAPI { if (isActive || shouldAutoSync) { timer ??= Timer.periodic(const Duration(seconds: 60), (timer) async { - debugPrint("run timer"); + //todo: check if print needed + // debugPrint("run timer"); //TODO: check for new data and refresh if needed. if wownero even needs this // chain height check currently broken // if ((await chainHeight) != (await storedChainHeight)) { @@ -472,7 +473,8 @@ class WowneroWallet extends CoinServiceAPI { }); wowneroAutosaveTimer ??= Timer.periodic(const Duration(seconds: 93), (timer) async { - debugPrint("run wownero timer"); + //todo: check if print needed + // debugPrint("run wownero timer"); if (isActive) { await walletBase?.save(); GlobalEventBus.instance.fire(UpdatedInBackgroundEvent( @@ -828,7 +830,8 @@ class WowneroWallet extends CoinServiceAPI { level: LogLevel.Info); if ((DB.instance.get(boxName: walletId, key: "id")) == null) { - debugPrint("Exception was thrown"); + //todo: check if print needed + // debugPrint("Exception was thrown"); throw Exception( "Attempted to initialize an existing wallet using an unknown wallet ID!"); } @@ -849,7 +852,8 @@ class WowneroWallet extends CoinServiceAPI { try { password = await keysStorage?.getWalletPassword(walletName: _walletId); } catch (e, s) { - debugPrint("Exception was thrown $e $s"); + //todo: check if print needed + // debugPrint("Exception was thrown $e $s"); throw Exception("Password not found $e, $s"); } walletBase = (await walletService?.openWallet(_walletId, password!)) @@ -1046,6 +1050,7 @@ class WowneroWallet extends CoinServiceAPI { await DB.instance .put(boxName: walletId, key: "isFavorite", value: false); } catch (e, s) { + //todo: come back to this debugPrint(e.toString()); debugPrint(s.toString()); } @@ -1146,7 +1151,8 @@ class WowneroWallet extends CoinServiceAPI { for (var element in walletBase!.balance!.entries) { bal = bal + element.value.fullBalance; } - debugPrint("balances: $transactionBalance $bal"); + //todo: check if print needed + // debugPrint("balances: $transactionBalance $bal"); if (isActive) { String am = wowneroAmountToString(amount: bal); @@ -1174,8 +1180,10 @@ class WowneroWallet extends CoinServiceAPI { password = await keysStorage?.getWalletPassword(walletName: _walletId); } catch (e, s) { - debugPrint("Exception was thrown $e $s"); - throw Exception("Password not found $e, $s"); + //todo: check if print needed + // debugPrint("Exception was thrown $e $s"); + throw Exception("Password not fou" + "*nd $e, $s"); } walletBase = (await walletService?.openWallet(_walletId, password!)) as WowneroWalletBase?; @@ -1499,7 +1507,8 @@ class WowneroWallet extends CoinServiceAPI { await (awaitPendingTransaction!) as PendingWowneroTransaction; int realfee = Format.decimalAmountToSatoshis( Decimal.parse(pendingWowneroTransaction.feeFormatted), coin); - debugPrint("fee? $realfee"); + //todo: check if print needed + // debugPrint("fee? $realfee"); Map txData = { "pendingWowneroTransaction": pendingWowneroTransaction, "fee": realfee, diff --git a/lib/services/debug_service.dart b/lib/services/debug_service.dart index c63e22cb2..6557fc96e 100644 --- a/lib/services/debug_service.dart +++ b/lib/services/debug_service.dart @@ -60,6 +60,7 @@ class DebugService extends ChangeNotifier { await isar.writeTxn(() async => await isar.logs.clear()); notifyListeners(); } catch (e, s) { + //todo: come back to this debugPrint("$e, $s"); } } diff --git a/lib/services/wallets.dart b/lib/services/wallets.dart index da9f70a63..faed86f75 100644 --- a/lib/services/wallets.dart +++ b/lib/services/wallets.dart @@ -30,7 +30,8 @@ class Wallets extends ChangeNotifier { @override dispose() { - debugPrint("Wallets dispose was called!!"); + //todo: check if print needed + // debugPrint("Wallets dispose was called!!"); super.dispose(); } @@ -145,7 +146,8 @@ class Wallets extends ChangeNotifier { static int _count = 0; Future load(Prefs prefs) async { - debugPrint("++++++++++++++ Wallets().load() called: ${++_count} times"); + //todo: check if print needed + // debugPrint("++++++++++++++ Wallets().load() called: ${++_count} times"); if (hasLoaded) { return; } @@ -315,8 +317,9 @@ class Wallets extends ChangeNotifier { final isVerified = await walletsService.isMnemonicVerified(walletId: walletId); - debugPrint( - "LOADING RESTORED WALLET: ${manager.walletName} ${manager.walletId} IS VERIFIED: $isVerified"); + //todo: check if print needed + // debugPrint( + // "LOADING RESTORED WALLET: ${manager.walletName} ${manager.walletId} IS VERIFIED: $isVerified"); if (isVerified) { if (_managerMap[walletId] == null && diff --git a/lib/services/wallets_service.dart b/lib/services/wallets_service.dart index 1371b17b6..7bb37d2a6 100644 --- a/lib/services/wallets_service.dart +++ b/lib/services/wallets_service.dart @@ -236,7 +236,8 @@ class WalletsService extends ChangeNotifier { await DB.instance.deleteAll(boxName: DB.boxNameFavoriteWallets); await DB.instance .addAll(boxName: DB.boxNameFavoriteWallets, values: walletIds); - debugPrint("saveFavoriteWalletIds list: $walletIds"); + //todo: check if print needed + // debugPrint("saveFavoriteWalletIds list: $walletIds"); } Future addFavorite(String walletId) async { diff --git a/lib/utilities/biometrics.dart b/lib/utilities/biometrics.dart index 616461217..cac2ccdf0 100644 --- a/lib/utilities/biometrics.dart +++ b/lib/utilities/biometrics.dart @@ -34,14 +34,16 @@ class Biometrics { final canCheckBiometrics = await localAuth.canCheckBiometrics; final isDeviceSupported = await localAuth.isDeviceSupported(); - debugPrint("canCheckBiometrics: $canCheckBiometrics"); - debugPrint("isDeviceSupported: $isDeviceSupported"); + //todo: check if print needed + // debugPrint("canCheckBiometrics: $canCheckBiometrics"); + // debugPrint("isDeviceSupported: $isDeviceSupported"); if (canCheckBiometrics && isDeviceSupported) { List availableSystems = await localAuth.getAvailableBiometrics(); - debugPrint("availableSystems: $availableSystems"); + //todo: check if print needed + // debugPrint("availableSystems: $availableSystems"); //TODO properly handle caught exceptions if (Platform.isIOS) { diff --git a/pubspec.lock b/pubspec.lock index ffd644d05..f12b25487 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -42,7 +42,7 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "3.3.0" + version: "3.1.11" args: dependency: transitive description: @@ -63,7 +63,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.9.0" + version: "2.8.2" barcode_scan2: dependency: "direct main" description: @@ -190,7 +190,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.2.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" checked_yaml: dependency: transitive description: @@ -211,7 +218,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "1.1.0" code_builder: dependency: transitive description: @@ -281,7 +288,7 @@ packages: name: coverage url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.2.0" cross_file: dependency: transitive description: @@ -435,7 +442,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "1.3.0" ffi: dependency: "direct main" description: @@ -864,21 +871,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.12" + version: "0.12.11" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.5" + version: "0.1.4" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.7.0" mime: dependency: transitive description: @@ -990,7 +997,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.2" + version: "1.8.1" path_drawing: dependency: transitive description: @@ -1366,7 +1373,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.9.0" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -1410,7 +1417,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "1.1.0" string_validator: dependency: "direct main" description: @@ -1424,35 +1431,35 @@ packages: name: sync_http url: "https://pub.dartlang.org" source: hosted - version: "0.3.1" + version: "0.3.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "1.2.0" test: dependency: transitive description: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.21.4" + version: "1.21.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.12" + version: "0.4.9" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.4.16" + version: "0.4.13" time: dependency: transitive description: @@ -1501,7 +1508,7 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.1" + version: "1.3.0" universal_io: dependency: transitive description: @@ -1585,7 +1592,7 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "9.0.0" + version: "8.2.2" wakelock: dependency: "direct main" description: