mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
commit
aaba3a0933
51 changed files with 162 additions and 112 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 265d83e1adb3ca161e700214a9353bc044d16557
|
||||
Subproject commit db928e6f11844138ce87de2b8c1abe3305ec589e
|
|
@ -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();
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -92,8 +92,9 @@ class _NameYourWalletViewState extends ConsumerState<NameYourWalletView> {
|
|||
|
||||
@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<NameYourWalletView> {
|
|||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
textEditingController.text =
|
||||
await _generateRandomWalletName();
|
||||
textEditingController.text = await _generateRandomWalletName();
|
||||
setState(() {
|
||||
_nextEnabled = true;
|
||||
_showDiceIcon = false;
|
||||
|
|
|
@ -203,8 +203,9 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
|
|||
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<RestoreWalletView> {
|
|||
}
|
||||
|
||||
Future<void> pasteMnemonic() async {
|
||||
debugPrint("restoreWalletPasteButton tapped");
|
||||
//todo: check if print needed
|
||||
// debugPrint("restoreWalletPasteButton tapped");
|
||||
final ClipboardData? data =
|
||||
await widget.clipboard.getData(Clipboard.kTextPlain);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,8 @@ class BuyView extends StatefulWidget {
|
|||
class _BuyViewState extends State<BuyView> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
debugPrint("BUILD: BuyView");
|
||||
//todo: check if print needed
|
||||
// debugPrint("BUILD: BuyView");
|
||||
return SafeArea(
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
|
|
|
@ -1182,7 +1182,8 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
|||
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<ExchangeForm> {
|
|||
(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
|
||||
|
|
|
@ -109,7 +109,8 @@ class _ExchangeViewState extends ConsumerState<ExchangeView> {
|
|||
.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<ExchangeView> {
|
|||
.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;
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -157,9 +157,10 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
|
|||
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");
|
||||
|
|
|
@ -257,7 +257,8 @@ class _HomeViewState extends ConsumerState<HomeView> {
|
|||
height: 20,
|
||||
),
|
||||
onPressed: () {
|
||||
debugPrint("main view settings tapped");
|
||||
//todo: check if print needed
|
||||
// debugPrint("main view settings tapped");
|
||||
Navigator.of(context)
|
||||
.pushNamed(GlobalSettingsView.routeName);
|
||||
},
|
||||
|
|
|
@ -34,7 +34,8 @@ class _HomeViewButtonBarState extends ConsumerState<HomeViewButtonBar> {
|
|||
|
||||
@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,
|
||||
|
|
|
@ -122,6 +122,7 @@ class _GenerateUriQrCodeViewState extends State<GenerateUriQrCodeView> {
|
|||
text: "Receive URI QR Code");
|
||||
}
|
||||
} catch (e) {
|
||||
//todo: comeback to this
|
||||
debugPrint(e.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -234,7 +234,8 @@ class _TransactionsListState extends ConsumerState<TransactionsList> {
|
|||
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);
|
||||
|
|
|
@ -77,7 +77,8 @@ class _TransactionDetailsViewState extends ConsumerState<AllTransactionsView> {
|
|||
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<AllTransactionsView> {
|
|||
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
|
||||
|
|
|
@ -529,7 +529,8 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
|||
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(
|
||||
|
|
|
@ -346,7 +346,8 @@ class _DesktopTradeRowCardState extends ConsumerState<DesktopTradeRowCard> {
|
|||
.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;
|
||||
|
|
|
@ -106,7 +106,8 @@ class _DesktopTradeHistoryState extends ConsumerState<DesktopTradeHistory> {
|
|||
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<DesktopTradeHistory> {
|
|||
.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;
|
||||
|
|
|
@ -11,7 +11,6 @@ final favoritesProvider =
|
|||
(ref) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint("favoritesProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return favorites;
|
||||
|
|
|
@ -7,8 +7,6 @@ final localeServiceChangeNotifierProvider =
|
|||
ChangeNotifierProvider<LocaleService>((_) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint(
|
||||
"localeServiceChangeNotifierProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return LocaleService();
|
||||
|
|
|
@ -8,8 +8,6 @@ final nodeServiceChangeNotifierProvider =
|
|||
ChangeNotifierProvider<NodeService>((ref) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint(
|
||||
"nodeServiceChangeNotifierProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return NodeService(secureStorageInterface: ref.read(secureStoreProvider));
|
||||
|
|
|
@ -11,7 +11,6 @@ final nonFavoritesProvider =
|
|||
(ref) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint("nonFavoritesProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return nonFavorites;
|
||||
|
|
|
@ -6,7 +6,6 @@ int _count = 0;
|
|||
final prefsChangeNotifierProvider = ChangeNotifierProvider<Prefs>((_) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint("prefsChangeNotifierProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return Prefs.instance;
|
||||
|
|
|
@ -9,8 +9,6 @@ final priceAnd24hChangeNotifierProvider =
|
|||
ChangeNotifierProvider<PriceService>((ref) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint(
|
||||
"priceAnd24hChangeNotifierProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
final currency =
|
||||
|
|
|
@ -9,7 +9,6 @@ int _count = 0;
|
|||
final walletsChangeNotifierProvider = ChangeNotifierProvider<Wallets>((ref) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint("walletsChangeNotifierProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
final walletsService = ref.read(walletsServiceChangeNotifierProvider);
|
||||
|
|
|
@ -9,8 +9,6 @@ final walletsServiceChangeNotifierProvider =
|
|||
ChangeNotifierProvider<WalletsService>((ref) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint(
|
||||
"walletsServiceChangeNotifierProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return WalletsService(
|
||||
|
|
|
@ -8,8 +8,6 @@ final addWalletSelectedCoinStateProvider =
|
|||
StateProvider.autoDispose<Coin?>((_) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint(
|
||||
"addWalletSelectedCoinStateProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -6,7 +6,6 @@ int _count = 0;
|
|||
final checkBoxStateProvider = StateProvider.autoDispose<bool>((_) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint("checkBoxStateProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -6,7 +6,6 @@ int _count = 0;
|
|||
final homeViewPageIndexStateProvider = StateProvider<int>((_) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint("homeViewPageIndexStateProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -6,7 +6,6 @@ int _count = 0;
|
|||
final previewTxButtonStateProvider = StateProvider.autoDispose<bool>((_) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint("previewTxButtonStateProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -6,8 +6,6 @@ int _count = 0;
|
|||
final verifyMnemonicCorrectWordStateProvider = StateProvider<String>((_) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint(
|
||||
"verifyMnemonicCorrectWordStateProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return "";
|
||||
|
|
|
@ -6,8 +6,6 @@ int _count = 0;
|
|||
final verifyMnemonicWordIndexStateProvider = StateProvider<int>((_) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint(
|
||||
"verifyMnemonicWordIndexStateProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -7,8 +7,6 @@ final verifyMnemonicSelectedWordStateProvider =
|
|||
StateProvider.autoDispose<String>((_) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint(
|
||||
"verifyMnemonicSelectedWordStateProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return "";
|
||||
|
|
|
@ -8,8 +8,6 @@ final notesServiceChangeNotifierProvider =
|
|||
ChangeNotifierProvider.family<NotesService, String>((_, walletId) {
|
||||
if (kDebugMode) {
|
||||
_count++;
|
||||
debugPrint(
|
||||
"notesServiceChangeNotifierProvider instantiation count: $_count");
|
||||
}
|
||||
|
||||
return NotesService(walletId: walletId);
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -991,7 +991,8 @@ class EpicCashWallet extends CoinServiceAPI {
|
|||
await _secureStore.write(key: '${_walletId}_wallet', value: walletOpen);
|
||||
|
||||
if ((DB.instance.get<dynamic>(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!");
|
||||
}
|
||||
|
@ -1036,8 +1037,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;
|
||||
|
@ -1242,6 +1244,7 @@ class EpicCashWallet extends CoinServiceAPI {
|
|||
realfee =
|
||||
(Decimal.parse(txObject["fee"].toString())).toBigInt().toInt();
|
||||
} catch (e, s) {
|
||||
//todo: come back to this
|
||||
debugPrint("$e $s");
|
||||
}
|
||||
|
||||
|
@ -2203,6 +2206,7 @@ class EpicCashWallet extends CoinServiceAPI {
|
|||
try {
|
||||
confirmations = currentChainHeight - txHeight;
|
||||
} catch (e, s) {
|
||||
//todo: come back to this
|
||||
debugPrint("$e $s");
|
||||
}
|
||||
midSortedTx["confirmations"] = confirmations;
|
||||
|
|
|
@ -284,7 +284,8 @@ Future<Map<String, dynamic>> 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<Map<String, dynamic>> 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({
|
||||
|
@ -1197,6 +1199,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
|
||||
|
@ -1453,6 +1456,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");
|
||||
|
||||
|
@ -2632,7 +2636,8 @@ class FiroWallet extends CoinServiceAPI {
|
|||
/// Builds and signs a transaction
|
||||
Future<Map<String, dynamic>> buildMintTransaction(List<UtxoObject> utxosToUse,
|
||||
int satoshisPerRecipient, List<Map<String, dynamic>> mintsMap) async {
|
||||
debugPrint(utxosToUse.toString());
|
||||
//todo: check if print needed
|
||||
// debugPrint(utxosToUse.toString());
|
||||
List<String> addressesToDerive = [];
|
||||
|
||||
// Populating the addresses to derive
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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<dynamic>(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!))
|
||||
|
|
|
@ -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<dynamic>(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<dynamic>(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<String, dynamic> txData = {
|
||||
"pendingWowneroTransaction": pendingWowneroTransaction,
|
||||
"fee": realfee,
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<void> 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 &&
|
||||
|
|
|
@ -236,7 +236,8 @@ class WalletsService extends ChangeNotifier {
|
|||
await DB.instance.deleteAll<String>(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<void> addFavorite(String walletId) async {
|
||||
|
|
|
@ -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<BiometricType> availableSystems =
|
||||
await localAuth.getAvailableBiometrics();
|
||||
|
||||
debugPrint("availableSystems: $availableSystems");
|
||||
//todo: check if print needed
|
||||
// debugPrint("availableSystems: $availableSystems");
|
||||
|
||||
//TODO properly handle caught exceptions
|
||||
if (Platform.isIOS) {
|
||||
|
|
45
pubspec.lock
45
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:
|
||||
|
|
|
@ -11,7 +11,7 @@ description: Stack Wallet
|
|||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
version: 1.5.24+97
|
||||
version: 1.5.25+98
|
||||
|
||||
environment:
|
||||
sdk: ">=2.17.0 <3.0.0"
|
||||
|
|
Loading…
Reference in a new issue