diff --git a/lib/pages/send_view/confirm_transaction_view.dart b/lib/pages/send_view/confirm_transaction_view.dart index 152437c23..356750adf 100644 --- a/lib/pages/send_view/confirm_transaction_view.dart +++ b/lib/pages/send_view/confirm_transaction_view.dart @@ -26,7 +26,6 @@ import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/sub import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/providers/wallet/public_private_balance_state_provider.dart'; import 'package:stackwallet/route_generator.dart'; -import 'package:stackwallet/services/coins/epiccash/epiccash_wallet.dart'; import 'package:stackwallet/services/coins/firo/firo_wallet.dart'; import 'package:stackwallet/services/mixins/paynym_wallet_interface.dart'; import 'package:stackwallet/themes/stack_colors.dart'; @@ -37,6 +36,7 @@ import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/util.dart'; +import 'package:stackwallet/wallets/example/libepiccash.dart'; import 'package:stackwallet/widgets/background.dart'; import 'package:stackwallet/widgets/conditional_parent.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; @@ -89,11 +89,9 @@ class _ConfirmTransactionViewState late final FocusNode _noteFocusNode; late final TextEditingController noteController; - late final FocusNode _onChainNoteFocusNode; late final TextEditingController onChainNoteController; - Future _attemptSend(BuildContext context) async { final manager = ref.read(walletsChangeNotifierProvider).getManager(walletId); @@ -283,7 +281,8 @@ class _ConfirmTransactionViewState _onChainNoteFocusNode = FocusNode(); onChainNoteController = TextEditingController(); - onChainNoteController.text = transactionInfo["onChainNote"] as String? ?? ""; + onChainNoteController.text = + transactionInfo["onChainNote"] as String? ?? ""; super.initState(); } @@ -885,23 +884,22 @@ class _ConfirmTransactionViewState ).copyWith( suffixIcon: onChainNoteController.text.isNotEmpty ? Padding( - padding: - const EdgeInsets.only(right: 0), - child: UnconstrainedBox( - child: Row( - children: [ - TextFieldIconButton( - child: const XIcon(), - onTap: () async { - setState(() { - onChainNoteController.text = ""; - }); - }, + padding: const EdgeInsets.only(right: 0), + child: UnconstrainedBox( + child: Row( + children: [ + TextFieldIconButton( + child: const XIcon(), + onTap: () async { + setState(() { + onChainNoteController.text = ""; + }); + }, + ), + ], + ), ), - ], - ), - ), - ) + ) : null, ), ), @@ -911,7 +909,8 @@ class _ConfirmTransactionViewState height: 12, ), Text( - (coin == Coin.epicCash) ? "Local Note (optional)" + (coin == Coin.epicCash) + ? "Local Note (optional)" : "Note (optional)", style: STextStyles.desktopTextExtraSmall(context).copyWith( diff --git a/lib/services/coins/epiccash/epiccash_wallet.dart b/lib/services/coins/epiccash/epiccash_wallet.dart index ac07ef816..67ecce654 100644 --- a/lib/services/coins/epiccash/epiccash_wallet.dart +++ b/lib/services/coins/epiccash/epiccash_wallet.dart @@ -788,11 +788,11 @@ class EpicCashWallet extends CoinServiceAPI level: LogLevel.Info, ); - int nextScannedBlock = int.parse(await epiccash.LibEpiccash.scanOutputs( + int nextScannedBlock = await epiccash.LibEpiccash.scanOutputs( wallet: wallet!, startHeight: lastScannedBlock, numberOfBlocks: scanChunkSize, - )); + ); // update local cache await epicUpdateLastScannedBlock(nextScannedBlock); diff --git a/lib/wallets/example/libepiccash.dart b/lib/wallets/example/libepiccash.dart index 106eebeb4..30e0aa087 100644 --- a/lib/wallets/example/libepiccash.dart +++ b/lib/wallets/example/libepiccash.dart @@ -179,12 +179,12 @@ abstract class LibEpiccash { /// /// Scan Epic outputs /// - static Future scanOutputs({ + static Future scanOutputs({ required String wallet, required int startHeight, required int numberOfBlocks, }) async { - return await m.protect(() async { + return int.parse(await m.protect(() async { try { return await compute(_scanOutputsWrapper, ( wallet: wallet, @@ -194,7 +194,7 @@ abstract class LibEpiccash { } catch (e) { throw ("Error getting scanning outputs : ${e.toString()}"); } - }); + })); } ///