mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-24 19:25:52 +00:00
mb order status fixes
This commit is contained in:
parent
54bc340c17
commit
58227c40be
4 changed files with 35 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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":
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue