[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 04/05: dismiss sheet even earlyer on bank-integrated w
From: |
gnunet |
Subject: |
[taler-taler-ios] 04/05: dismiss sheet even earlyer on bank-integrated withdrawals |
Date: |
Tue, 04 Jul 2023 17:06:16 +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 7d11a003dae8b8afaf14c3e2e6c331e7380f6302
Author: Marc Stibane <marc@taler.net>
AuthorDate: Tue Jul 4 16:27:11 2023 +0200
dismiss sheet even earlyer on bank-integrated withdrawals
---
TalerWallet1/Backend/Transaction.swift | 2 +-
.../Views/Transactions/TransactionDetailView.swift | 29 +++++++++++++---------
2 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/TalerWallet1/Backend/Transaction.swift
b/TalerWallet1/Backend/Transaction.swift
index 92007b6..08caed2 100644
--- a/TalerWallet1/Backend/Transaction.swift
+++ b/TalerWallet1/Backend/Transaction.swift
@@ -40,8 +40,8 @@ enum TransactionMinorState: String, Codable {
case repurchase
case bankRegisterReserve = "bank-register-reserve"
case bankConfirmTransfer = "bank-confirm-transfer"
- case withdrawCoins = "withdraw-coins"
case exchangeWaitReserve = "exchange-wait-reserve"
+ case withdrawCoins = "withdraw-coins"
case abortingBank = "aborting-bank"
case refused
case withdraw
diff --git a/TalerWallet1/Views/Transactions/TransactionDetailView.swift
b/TalerWallet1/Views/Transactions/TransactionDetailView.swift
index 5afa92b..6c35345 100644
--- a/TalerWallet1/Views/Transactions/TransactionDetailView.swift
+++ b/TalerWallet1/Views/Transactions/TransactionDetailView.swift
@@ -105,8 +105,12 @@ struct TransactionDetailView: View {
doneAction() // if this view is in a sheet
this action will dissmiss it
} else if newMajor == .pending {
if let newMinor {
- if newMinor == .withdrawCoins { //
coin-withdrawal has started
- symLog.log("newTxState.minor ==
withdrawCoins => dismiss sheet")
+ if newMinor == .exchangeWaitReserve { // user
did confirm on bank website
+// symLog.log("newTxState.minor ==
exchangeWaitReserve => change Buttons")
+ symLog.log("newTxState.minor ==
exchangeWaitReserve => dismiss sheet")
+ doneAction() // if this view is in
a sheet this action will dissmiss it
+ } else if newMinor == .withdrawCoins { //
coin-withdrawal has started
+ symLog.log("newTxState.minor ==
withdrawCoins => dismiss sheet")
doneAction() // if this view is in
a sheet this action will dissmiss it
} else {
symLog.log("ignoring newTxState:
\(newMajor):\(newMinor)")
@@ -172,24 +176,25 @@ struct TransactionDetailView: View {
ManualDetails(common: common, details:
withdrawalDetails)
case .bankIntegrated: // "Confirm with
bank"
- VStack {
+ let confirmed =
withdrawalDetails.confirmed ?? false
+ if !confirmed {
if let confirmationUrl =
withdrawalDetails.bankConfirmationUrl {
if let destination = URL(string:
confirmationUrl) {
- // Show Hint that User should
Confirm on bank website
- Text("Waiting for bank
confirmation")
-
.multilineTextAlignment(.leading)
- .listRowSeparator(.hidden)
- Link("Confirm with bank",
destination: destination)
-
.buttonStyle(TalerButtonStyle(type: .prominent, narrow: false, aligned:
.center))
- .padding(.horizontal)
-
+ VStack { // Show Hint that
User should Confirm on bank website
+ Text("Waiting for bank
confirmation")
+
.multilineTextAlignment(.leading)
+
.listRowSeparator(.hidden)
+ Link("Confirm with bank",
destination: destination)
+
.buttonStyle(TalerButtonStyle(type: .prominent, narrow: false, aligned:
.center))
+ .padding(.horizontal)
+ }
}
}
}
}
} // ManualDetails or Confirm with bank
ThreeAmountsSheet(common: common, topTitle:
String(localized: "Chosen amount to withdraw:"),
- baseURL:
withdrawalTransaction.details.exchangeBaseUrl, large: true)
+ baseURL: details.exchangeBaseUrl,
large: false)
case .payment(let paymentTransaction):
let details = paymentTransaction.details
let info = details.info
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.