[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 75/204: cleanup
From: |
gnunet |
Subject: |
[taler-taler-ios] 75/204: cleanup |
Date: |
Thu, 05 Dec 2024 23:50:43 +0100 |
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 9dd6a9c4be80bd02c0389bcf7300dd97cd95ea7c
Author: Marc Stibane <marc@taler.net>
AuthorDate: Fri Oct 18 17:02:49 2024 +0200
cleanup
---
.../Views/Settings/Exchange/ExchangeRowView.swift | 23 --------------
.../Settings/Exchange/ExchangeSectionView.swift | 36 ++++++++++------------
2 files changed, 16 insertions(+), 43 deletions(-)
diff --git a/TalerWallet1/Views/Settings/Exchange/ExchangeRowView.swift
b/TalerWallet1/Views/Settings/Exchange/ExchangeRowView.swift
index 259a0d1..0fe7bd3 100644
--- a/TalerWallet1/Views/Settings/Exchange/ExchangeRowView.swift
+++ b/TalerWallet1/Views/Settings/Exchange/ExchangeRowView.swift
@@ -14,10 +14,6 @@ struct ExchangeRowView: View {
let stack: CallStack
@Binding var currencyInfo: CurrencyInfo
let exchange: Exchange
-// @Binding var depositIBAN: String
-// @Binding var accountHolder: String
- let amountAvailable: Amount?
- let currency: String // this is the currency to be
used
@Binding var amountToTransfer: Amount // does still have the wrong
currency
@Environment(\.sizeCategory) var sizeCategory
@@ -53,23 +49,6 @@ struct ExchangeRowView: View {
}
.listRowSeparator(.hidden)
-// DepositWithdrawV(stack: stack.push(),
-// currencyInfo: $currencyInfo,
-// scopeInfo: exchange.scopeInfo,
-// amountAvailable: amountAvailable,
-// amountToTransfer: $amountToTransfer)
- }
- .task {
- 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
- ?? ScopeInfo(type: .global, currency: currency)
- if let info = try? await model.getCurrencyInfoM(scope:
scopeInfo, delay: delay) {
-// logger.info("got info: \(scope.currency, privacy:
.public)")
- await controller.setInfo(info)
- }
- }
}
}
}
@@ -105,8 +84,6 @@ fileprivate struct ExchangeRow_Previews: PreviewProvider {
ExchangeRowView(stack: CallStack("Preview"),
currencyInfo: $currencyInfoL,
exchange: exchange1,
- amountAvailable: Amount(currency: LONGCURRENCY, cent: 5000),
// 50,00
- currency: LONGCURRENCY,
// depositIBAN: $depositIBAN,
// accountHolder: $accountHolder,
amountToTransfer: $amountToPreview)
diff --git a/TalerWallet1/Views/Settings/Exchange/ExchangeSectionView.swift
b/TalerWallet1/Views/Settings/Exchange/ExchangeSectionView.swift
index 8e25492..b7c5254 100755
--- a/TalerWallet1/Views/Settings/Exchange/ExchangeSectionView.swift
+++ b/TalerWallet1/Views/Settings/Exchange/ExchangeSectionView.swift
@@ -32,22 +32,22 @@ struct ExchangeSectionView: View {
@State private var showAlert: Bool = false
@State private var purge: Bool = false
- func amountAvailable(_ exchange: Exchange?, currency: String?) -> Amount? {
- if let exchange {
- for balance in balances {
- if let baseUrl = balance.scopeInfo.url {
- if baseUrl == exchange.exchangeBaseUrl {
- return balance.available
- }
- } else if let currency {
- if currency == balance.scopeInfo.currency {
- return balance.available
- }
- }
- }
- }
- return nil
- }
+// func amountAvailable(_ exchange: Exchange?, currency: String?) ->
Amount? {
+// if let exchange {
+// for balance in balances {
+// if let baseUrl = balance.scopeInfo.url {
+// if baseUrl == exchange.exchangeBaseUrl {
+// return balance.available
+// }
+// } else if let currency {
+// if currency == balance.scopeInfo.currency {
+// return balance.available
+// }
+// }
+// }
+// }
+// return nil
+// }
private func deleteExchange() {
disabled = true // don't try this more than once
@@ -81,10 +81,6 @@ struct ExchangeSectionView: View {
ExchangeRowView(stack: stack.push(),
currencyInfo: $currencyInfo,
exchange: exchange,
- amountAvailable: amountAvailable(exchange, currency:
currency),
-// depositIBAN: $depositIBAN,
-// accountHolder: $accountHolder,
- currency: currencyName, // TODO:
(balance.available) amount.isZero to disable Deposit-button
amountToTransfer: $amountToTransfer) // does still have
the wrong currency
.listRowSeparator(.hidden)
// }
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 84/204: cleanup, (continued)
- [taler-taler-ios] 84/204: cleanup, gnunet, 2024/12/05
- [taler-taler-ios] 53/204: DualHeightSheet, gnunet, 2024/12/05
- [taler-taler-ios] 71/204: pickerStyle, gnunet, 2024/12/05
- [taler-taler-ios] 70/204: Reorg, gnunet, 2024/12/05
- [taler-taler-ios] 69/204: Reorg, gnunet, 2024/12/05
- [taler-taler-ios] 73/204: Published balances, gnunet, 2024/12/05
- [taler-taler-ios] 78/204: use info(for:scope), gnunet, 2024/12/05
- [taler-taler-ios] 85/204: ScopePicker, gnunet, 2024/12/05
- [taler-taler-ios] 87/204: cleanup, gnunet, 2024/12/05
- [taler-taler-ios] 77/204: info2, gnunet, 2024/12/05
- [taler-taler-ios] 75/204: cleanup,
gnunet <=
- [taler-taler-ios] 80/204: scope from balance, gnunet, 2024/12/05
- [taler-taler-ios] 79/204: -Binding, gnunet, 2024/12/05
- [taler-taler-ios] 81/204: iterate over balances, gnunet, 2024/12/05
- [taler-taler-ios] 82/204: cleanup, gnunet, 2024/12/05
- [taler-taler-ios] 90/204: Onboarding, gnunet, 2024/12/05
- [taler-taler-ios] 100/204: Minimalistic date, gnunet, 2024/12/05
- [taler-taler-ios] 93/204: cleanup, gnunet, 2024/12/05
- [taler-taler-ios] 103/204: add amount, gnunet, 2024/12/05
- [taler-taler-ios] 76/204: CurrencySpecification, gnunet, 2024/12/05
- [taler-taler-ios] 88/204: cleanup, gnunet, 2024/12/05