From ea47e41d9097632a8fab190950eeeff4b61310dc Mon Sep 17 00:00:00 2001 From: likho Date: Wed, 2 Aug 2023 13:30:06 +0200 Subject: [PATCH] Allow cancelling incoming txs for Epiccash --- lib/pages/wallet_view/sub_widgets/tx_icon.dart | 3 ++- .../transaction_views/transaction_details_view.dart | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/pages/wallet_view/sub_widgets/tx_icon.dart b/lib/pages/wallet_view/sub_widgets/tx_icon.dart index d86ad6e8d..46972c49b 100644 --- a/lib/pages/wallet_view/sub_widgets/tx_icon.dart +++ b/lib/pages/wallet_view/sub_widgets/tx_icon.dart @@ -35,6 +35,7 @@ class TxIcon extends ConsumerWidget { String _getAssetName( bool isCancelled, bool isReceived, bool isPending, IThemeAssets assets) { + if (!isReceived && transaction.subType == TransactionSubType.mint) { if (isCancelled) { return Assets.svg.anonymizeFailed; @@ -47,7 +48,7 @@ class TxIcon extends ConsumerWidget { if (isReceived) { if (isCancelled) { - return assets.receive; + return assets.receiveCancelled; } if (isPending) { return assets.receivePending; diff --git a/lib/pages/wallet_view/transaction_views/transaction_details_view.dart b/lib/pages/wallet_view/transaction_views/transaction_details_view.dart index 2b1ba62c4..88d0d8b1a 100644 --- a/lib/pages/wallet_view/transaction_views/transaction_details_view.dart +++ b/lib/pages/wallet_view/transaction_views/transaction_details_view.dart @@ -358,8 +358,6 @@ class _TransactionDetailsViewState final currentHeight = ref.watch(walletsChangeNotifierProvider .select((value) => value.getManager(walletId).currentHeight)); - print("THIS TRANSACTION IS $_transaction"); - return ConditionalParent( condition: !isDesktop, builder: (child) => Background( @@ -1584,8 +1582,7 @@ class _TransactionDetailsViewState coin.requiredConfirmations, ) == false && - _transaction.isCancelled == false && - _transaction.type == TransactionType.outgoing) + _transaction.isCancelled == false) ? ConditionalParent( condition: isDesktop, builder: (child) => Padding(