[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 24/36: Exchange needs Balance for Deposit
From: |
gnunet |
Subject: |
[taler-taler-ios] 24/36: Exchange needs Balance for Deposit |
Date: |
Mon, 13 Nov 2023 21:27:29 +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 04db105e38c6120fa7445aedc93ae7134974d3d4
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sun Nov 12 17:13:01 2023 +0100
Exchange needs Balance for Deposit
---
TalerWallet1/Views/Exchange/ExchangeListView.swift | 13 +++++++------
TalerWallet1/Views/Main/MainView.swift | 2 +-
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/TalerWallet1/Views/Exchange/ExchangeListView.swift
b/TalerWallet1/Views/Exchange/ExchangeListView.swift
index 48186e3..8d34c3e 100644
--- a/TalerWallet1/Views/Exchange/ExchangeListView.swift
+++ b/TalerWallet1/Views/Exchange/ExchangeListView.swift
@@ -10,7 +10,7 @@ import SymLog
struct ExchangeListView: View {
private let symLog = SymLogV(0)
let stack: CallStack
-// @Binding var balances: [Balance]
+ @Binding var balances: [Balance]
let navTitle: String
#if TABBAR // Taler Wallet
#else // GNU Taler
@@ -46,7 +46,7 @@ struct ExchangeListView: View {
let addTitleStr = String(localized: "Add Exchange", comment: "title of
the addExchange alert")
let addButtonStr = String(localized: "Add", comment: "button in the
addExchange alert")
if #available(iOS 16.0, *) {
- ExchangeListCommonV(symLog: symLog, stack: stack.push())
+ ExchangeListCommonV(symLog: symLog, stack: stack.push(), balances:
$balances)
.navigationTitle(navTitle)
.navigationBarItems(leading: hamburger, trailing: plusButton)
.alert(addTitleStr, isPresented: $showAlert) {
@@ -60,7 +60,7 @@ struct ExchangeListView: View {
Text("Please enter the exchange URL")
}
} else { // iOS 15 cannot have a textfield in an alert, so we must
- ExchangeListCommonV(symLog: symLog, stack: stack.push())
+ ExchangeListCommonV(symLog: symLog, stack: stack.push(), balances:
$balances)
.navigationTitle(navTitle)
.navigationBarItems(leading: hamburger, trailing: plusButton)
.textFieldAlert(isPresented: $showAlert,
@@ -76,7 +76,7 @@ struct ExchangeListView: View {
struct ExchangeListCommonV: View {
let symLog: SymLogV?
let stack: CallStack
-// @Binding var balances: [Balance]
+ @Binding var balances: [Balance]
@EnvironmentObject private var model: WalletModel
@@ -97,7 +97,7 @@ struct ExchangeListCommonV: View {
//Text("Exchanges...")
Content(symLog: symLog,
stack: stack.push(),
-// balances: $balances,
+ balances: $balances,
exchanges: $exchanges,
amountToTransfer: $amountToTransfer,
reloadExchanges: reloadExchanges)
@@ -119,7 +119,7 @@ extension ExchangeListCommonV {
let symLog: SymLogV?
let stack: CallStack
@AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic
-// @Binding var balances: [Balance]
+ @Binding var balances: [Balance]
@Binding var exchanges: [Exchange]
@Binding var amountToTransfer: Amount // does still have the
wrong currency
var reloadExchanges: () async -> Void
@@ -142,6 +142,7 @@ extension ExchangeListCommonV {
var body: some View {
let dict = currenciesDict(exchanges)
+ // TODO: Balances for amountAvailable for Deposit
let sortedDict = dict.sorted{ $0.key < $1.key}
Group { // necessary for .backslide transition (bug in SwiftUI)
List(sortedDict, id: \.key) { key, value in
diff --git a/TalerWallet1/Views/Main/MainView.swift
b/TalerWallet1/Views/Main/MainView.swift
index fbfcc59..2e85f78 100644
--- a/TalerWallet1/Views/Main/MainView.swift
+++ b/TalerWallet1/Views/Main/MainView.swift
@@ -190,7 +190,7 @@ extension MainView {
NavigationView {
ExchangeListView(stack: stack.push(exchangesTitle),
-// balances: $balances,
+ balances: $balances,
navTitle: exchangesTitle)
}.navigationViewStyle(.stack)
.tabItem {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 04/36: DD51 fractional base, (continued)
- [taler-taler-ios] 04/36: DD51 fractional base, gnunet, 2023/11/13
- [taler-taler-ios] 05/36: fix tests, gnunet, 2023/11/13
- [taler-taler-ios] 03/36: Exchange with scopeInfo, gnunet, 2023/11/13
- [taler-taler-ios] 02/36: Transaction, L10N, gnunet, 2023/11/13
- [taler-taler-ios] 19/36: amountToTransfer Pending, gnunet, 2023/11/13
- [taler-taler-ios] 23/36: amountToTransfer Exchange, gnunet, 2023/11/13
- [taler-taler-ios] 14/36: Debugging: Delay currency info, gnunet, 2023/11/13
- [taler-taler-ios] 27/36: Debugging, gnunet, 2023/11/13
- [taler-taler-ios] 30/36: Bugfix, gnunet, 2023/11/13
- [taler-taler-ios] 12/36: DD51 Currency rendering, gnunet, 2023/11/13
- [taler-taler-ios] 24/36: Exchange needs Balance for Deposit,
gnunet <=
- [taler-taler-ios] 21/36: amountToTransfer Send, gnunet, 2023/11/13
- [taler-taler-ios] 07/36: Amount(currency:cent:), gnunet, 2023/11/13
- [taler-taler-ios] 06/36: RequestPurpose, gnunet, 2023/11/13
- [taler-taler-ios] 01/36: Startup Chime, gnunet, 2023/11/13
- [taler-taler-ios] 18/36: amountToTransfer Transactions, gnunet, 2023/11/13
- [taler-taler-ios] 17/36: amountToTransfer Balances, gnunet, 2023/11/13
- [taler-taler-ios] 09/36: cleanup, zero, gnunet, 2023/11/13
- [taler-taler-ios] 29/36: less logging, gnunet, 2023/11/13
- [taler-taler-ios] 13/36: once at very first startup, gnunet, 2023/11/13
- [taler-taler-ios] 15/36: About with explicit link to taler.net, gnunet, 2023/11/13