mb order status fixes

This commit is contained in:
julian 2023-03-03 11:56:21 -06:00
parent 54bc340c17
commit 58227c40be
4 changed files with 35 additions and 7 deletions

View file

@ -116,9 +116,16 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
}
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;
}
}

View file

@ -290,11 +290,21 @@ class _DesktopTradeRowCardState extends ConsumerState<DesktopTradeRowCard> {
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) {

View file

@ -1603,6 +1603,7 @@ class StackColors extends ThemeExtension<StackColors> {
return const Color(0xFFD3A90F);
case "Finished":
case "finished":
case "Completed":
return accentColorGreen;
case "Failed":
case "failed":

View file

@ -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) {