gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 06/08: Confirm later instead of Done for bank-integrat


From: gnunet
Subject: [taler-taler-ios] 06/08: Confirm later instead of Done for bank-integrated withdrawals
Date: Mon, 03 Jul 2023 10:27:42 +0200

This is an automated email from the git hooks/post-receive script.

marc-stibane pushed a commit to branch master
in repository taler-ios.

commit 6a9057d59fe665b1c72b52dfc179470c591e93cf
Author: Marc Stibane <marc@taler.net>
AuthorDate: Mon Jul 3 09:45:36 2023 +0200

    Confirm later instead of Done for bank-integrated withdrawals
---
 TalerWallet1/Backend/Transaction.swift                      | 9 +++++++++
 TalerWallet1/Views/Transactions/TransactionDetailView.swift | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/TalerWallet1/Backend/Transaction.swift 
b/TalerWallet1/Backend/Transaction.swift
index cf323aa..92007b6 100644
--- a/TalerWallet1/Backend/Transaction.swift
+++ b/TalerWallet1/Backend/Transaction.swift
@@ -414,6 +414,15 @@ enum Transaction: Decodable, Hashable, Identifiable {
     var isResumable  : Bool { common.txActions.contains(.resume) }
     var isSuspendable: Bool { common.txActions.contains(.suspend) }
 
+    var shouldConfirm: Bool {
+        switch self {
+            case .withdrawal(let withdrawalTransaction):
+                let details = withdrawalTransaction.details.withdrawalDetails
+                return details.type == .bankIntegrated // && 
details.bankConfirmationUrl != nil
+            default:
+                return false
+        }
+    }
     var common: TransactionCommon {
         switch self {
             case .dummy(let dummyTransaction):
diff --git a/TalerWallet1/Views/Transactions/TransactionDetailView.swift 
b/TalerWallet1/Views/Transactions/TransactionDetailView.swift
index 865e2d8..5afa92b 100644
--- a/TalerWallet1/Views/Transactions/TransactionDetailView.swift
+++ b/TalerWallet1/Views/Transactions/TransactionDetailView.swift
@@ -89,8 +89,8 @@ struct TransactionDetailView: View {
             .listStyle(myListStyle.style).anyView
                 .safeAreaInset(edge: .bottom) {
                     if let doneAction {
-                        Button("Done", action: doneAction)
-                            .buttonStyle(TalerButtonStyle(type: .prominent))
+                        Button(transaction.shouldConfirm ? "Confirm later" : 
"Done", action: doneAction)
+                            .buttonStyle(TalerButtonStyle(type: 
transaction.shouldConfirm ? .bordered : .prominent))
                             .padding(.horizontal)
                     }
                 }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]