commit 78183fec534191e98f22c1e470413d4f286794fe parent fa8d6071fee05b2541bb75405ac86090046ee100 Author: Marc Stibane <marc@taler.net> Date: Thu, 18 Jul 2024 14:42:26 +0200 cleanup Diffstat:
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/TalerWallet1/Views/Banking/ExchangeRowView.swift b/TalerWallet1/Views/Banking/ExchangeRowView.swift @@ -60,7 +60,7 @@ struct ExchangeRowView: View { amountToTransfer: $amountToTransfer) } .task { - if controller.hasInfo(for: currency) == nil { + if controller.info(for: currency) == nil { symLog.log("fetching info for \(currency)") // FIXME: remove fake ScopeInfo once the REAL one is in exchange.scopeInfo let scopeInfo = exchange.scopeInfo diff --git a/TalerWallet1/Views/Banking/ManualWithdraw.swift b/TalerWallet1/Views/Banking/ManualWithdraw.swift @@ -41,7 +41,8 @@ struct ManualWithdraw: View { Group { if let exchange { - let currency = exchange.scopeInfo.currency + let scopeInfo = exchange.scopeInfo + let currency = scopeInfo.currency let currencyInfo = controller.info(for: currency, controller.currencyTicker) let currencySymbol = currencyInfo.specs.altUnitNames?[0] ?? currency let navTitle = String(localized: "NavTitle_Withdraw (currency)", diff --git a/TalerWallet1/Views/Peer2peer/SendAmount.swift b/TalerWallet1/Views/Peer2peer/SendAmount.swift @@ -124,11 +124,11 @@ struct SendAmount: View { computeFee: computeFeeSend) .background(NavigationLink(destination: shortcutDestination, isActive: $shortcutSelected) { EmptyView() }.frame(width: 0).opacity(0).hidden() - ) + ) // shortcutDestination .background(NavigationLink(destination: inputDestination, isActive: $buttonSelected) { EmptyView() }.frame(width: 0).opacity(0).hidden() - ) - } // ScrollVStack + ) // inputDestination + } // ScrollView .frame(maxWidth: .infinity, alignment: .leading) // .scrollBounceBehavior(.basedOnSize) needs iOS 16.4 .background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all)) diff --git a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift @@ -88,11 +88,11 @@ struct WithdrawURIView: View { .task { await loadExchange(defaultBaseUrl) } - } + } // load defaultBaseUrl let acceptDestination = WithdrawAcceptView(stack: stack.push(), url: url, amountToTransfer: $amountToTransfer, exchange: $exchange) - if amountIsEditable { // amountToTransfer.isZero { + if amountIsEditable { ScrollView { let shortcutDestination = LazyView { WithdrawAcceptView(stack: stack.push(), url: url, @@ -102,7 +102,6 @@ struct WithdrawURIView: View { // TODO: input amount, then let amountLabel = minimalistic ? String(localized: "Amount:") : String(localized: "Amount to withdraw:") - AmountInputV(stack: stack.push(), url: nil, amountAvailable: amountAvailable, amountToTransfer: $amountToTransfer, @@ -117,21 +116,21 @@ struct WithdrawURIView: View { computeFee: computeFeeWithdraw) .background(NavigationLink(destination: shortcutDestination, isActive: $shortcutSelected) { EmptyView() }.frame(width: 0).opacity(0).hidden() - ) + ) // shortcutDestination .background(NavigationLink(destination: acceptDestination, isActive: $buttonSelected) { EmptyView() }.frame(width: 0).opacity(0).hidden() - ) + ) // acceptDestination } } else { acceptDestination - } + } // directly show the accept view } .navigationTitle(navTitle) .onAppear() { symLog.log("onAppear") DebugViewC.shared.setSheetID(SHEET_WITHDRAWAL) } - // agePicker.setAges(ages: details?.ageRestrictionOptions) +// agePicker.setAges(ages: details?.ageRestrictionOptions) } else { // TODO: error // symLog.log("no exchangeBaseUrl or no exchange") } @@ -157,7 +156,7 @@ struct WithdrawURIView: View { } // TODO: amount = nil ==> show amount input - } + } // getWithdrawalDetailsForUriM } } }