taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 88c5ecb0f744bc21b3cf65f8822fde3af8cf40fb
parent 4be72e065a561975052d57f446e64f822a2252f9
Author: Marc Stibane <marc@taler.net>
Date:   Sun, 30 Mar 2025 21:59:28 +0200

cleanup

Diffstat:
MTalerWallet1/Views/Actions/Peer2peer/SendAmountView.swift | 38--------------------------------------
MTalerWallet1/Views/HelperViews/AmountInputV.swift | 1-
MTalerWallet1/Views/Transactions/TransactionSummaryV.swift | 4++--
3 files changed, 2 insertions(+), 41 deletions(-)

diff --git a/TalerWallet1/Views/Actions/Peer2peer/SendAmountView.swift b/TalerWallet1/Views/Actions/Peer2peer/SendAmountView.swift @@ -181,43 +181,5 @@ struct SendAmountView: View { DebugViewC.shared.setViewID(VIEW_P2P_SEND, stack: stack.push()) symLog.log("❗️ onAppear") } - .onDisappear { - symLog.log("❗️ onDisappear") - } -// .task(id: amountToTransfer.value) { -// if exchange == nil { -// if let url = scopeInfo.url { -// exchange = try? await model.getExchangeByUrl(url: url) -// } -// } -// do { -// insufficient = try amountToTransfer > amountAvailable -// } catch { -// print("Yikes❗️ insufficient failed❗️") -// insufficient = true -// } -// -// if insufficient { -// announce("\(amountVoiceOver), \(insufficientLabel2)") -// } else if amountToTransfer.isZero { -// feeStr = EMPTYSTRING -// } else { -// if let ppCheck = try? await model.checkPeerPushDebitM(amountToTransfer) { -// // TODO: set from exchange -//// agePicker.setAges(ages: peerPushCheck?.ageRestrictionOptions) -// if let feeAmount = fee(ppCheck: ppCheck) { -// feeStr = feeAmount.formatted(currencyInfo, isNegative: false) -// let feeLabel = feeLabel(feeStr) -// announce("\(amountVoiceOver), \(feeLabel)") -// } else { -// feeStr = EMPTYSTRING -// announce(amountVoiceOver) -// } -// peerPushCheck = ppCheck -// } else { -// peerPushCheck = nil -// } -// } -// } } // body } diff --git a/TalerWallet1/Views/HelperViews/AmountInputV.swift b/TalerWallet1/Views/HelperViews/AmountInputV.swift @@ -86,7 +86,6 @@ struct AmountInputV: View { var body: some View { let currency = amountToTransfer.currencyStr -// let insufficientLabel = String(localized: "You don't have enough \(currency).") VStack(alignment: .trailing) { CurrencyInputView(scope: scope, amount: $amountToTransfer, diff --git a/TalerWallet1/Views/Transactions/TransactionSummaryV.swift b/TalerWallet1/Views/Transactions/TransactionSummaryV.swift @@ -43,7 +43,7 @@ struct TransactionSummaryV: View { @EnvironmentObject private var model: WalletModel @Environment(\.colorScheme) private var colorScheme @Environment(\.colorSchemeContrast) private var colorSchemeContrast - @Environment(\.presentationMode) var presentationMode: Binding<PresentationMode> + @Environment(\.dismiss) var dismiss // call dismiss() to pop back @AppStorage("minimalistic") var minimalistic: Bool = false @AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic #if DEBUG @@ -93,7 +93,7 @@ struct TransactionSummaryV: View { if hasDone { // if this view is in a sheet then dissmiss the whole sheet dismissTop(stack.push()) } else { // on a NavigationStack just pop - presentationMode.wrappedValue.dismiss() + dismiss() } }