diff --git a/lib/pages/exchange_view/trade_details_view.dart b/lib/pages/exchange_view/trade_details_view.dart index 662ed6922..2e9c3d112 100644 --- a/lib/pages/exchange_view/trade_details_view.dart +++ b/lib/pages/exchange_view/trade_details_view.dart @@ -116,9 +116,16 @@ class _TradeDetailsViewState extends ConsumerState { } status = changeNowTransactionStatusFromStringIgnoreCase(statusString); } on ArgumentError catch (_) { - status = ChangeNowTransactionStatus.Failed; - if (statusString == "Processing payment") { - status = ChangeNowTransactionStatus.Sending; + switch (statusString.toLowerCase()) { + case "funds confirming": + case "processing payment": + return Assets.svg.txExchangePending(context); + + case "completed": + return Assets.svg.txExchange(context); + + default: + status = ChangeNowTransactionStatus.Failed; } } 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 7dd6578c3..d4e79c42a 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 @@ -290,11 +290,21 @@ class _DesktopTradeRowCardState extends ConsumerState { ChangeNowTransactionStatus? status; try { if (statusString.toLowerCase().startsWith("waiting")) { - statusString = "waiting"; + statusString = "Waiting"; } status = changeNowTransactionStatusFromStringIgnoreCase(statusString); } on ArgumentError catch (_) { - status = ChangeNowTransactionStatus.Failed; + switch (statusString.toLowerCase()) { + case "funds confirming": + case "processing payment": + return Assets.svg.txExchangePending(context); + + case "completed": + return Assets.svg.txExchange(context); + + default: + status = ChangeNowTransactionStatus.Failed; + } } switch (status) { diff --git a/lib/utilities/theme/stack_colors.dart b/lib/utilities/theme/stack_colors.dart index bc26c3f80..d0ba2cd40 100644 --- a/lib/utilities/theme/stack_colors.dart +++ b/lib/utilities/theme/stack_colors.dart @@ -1603,6 +1603,7 @@ class StackColors extends ThemeExtension { return const Color(0xFFD3A90F); case "Finished": case "finished": + case "Completed": return accentColorGreen; case "Failed": case "failed": diff --git a/lib/widgets/trade_card.dart b/lib/widgets/trade_card.dart index 5a14a0777..f4162fc5e 100644 --- a/lib/widgets/trade_card.dart +++ b/lib/widgets/trade_card.dart @@ -25,11 +25,21 @@ class TradeCard extends ConsumerWidget { ChangeNowTransactionStatus? status; try { if (statusString.toLowerCase().startsWith("waiting")) { - statusString = "waiting"; + statusString = "Waiting"; } status = changeNowTransactionStatusFromStringIgnoreCase(statusString); } on ArgumentError catch (_) { - status = ChangeNowTransactionStatus.Failed; + switch (statusString.toLowerCase()) { + case "funds confirming": + case "processing payment": + return Assets.svg.txExchangePending(context); + + case "completed": + return Assets.svg.txExchange(context); + + default: + status = ChangeNowTransactionStatus.Failed; + } } switch (status) {