[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] branch master updated (16eefa4 -> 30caf4d)
From: |
gnunet |
Subject: |
[taler-taler-ios] branch master updated (16eefa4 -> 30caf4d) |
Date: |
Thu, 03 Oct 2024 07:41:46 +0200 |
This is an automated email from the git hooks/post-receive script.
marc-stibane pushed a change to branch master
in repository taler-ios.
from 16eefa4 German localization
new 107a2f6 German localization
new 9525345 ExchangeDeleted
new 102444f debugging
new df49c9c deleteExchange
new f8bce80 layout
new d39029b German localization
new 30caf4d Bump version to 0.13.3 (0.13.5)
The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
TalerWallet.xcodeproj/project.pbxproj | 16 ++---
TalerWallet1/Backend/WalletCore.swift | 3 +
TalerWallet1/Controllers/Controller.swift | 7 +-
TalerWallet1/Controllers/PublicConstants.swift | 1 +
TalerWallet1/Localizable.xcstrings | 20 ++++++
TalerWallet1/Taler_Wallet InfoPlist.xcstrings | 24 +++++++
TalerWallet1/Views/Banking/ExchangeListView.swift | 78 +++++++++++-----------
.../Views/Banking/ExchangeSectionView.swift | 32 +++++++--
.../Views/HelperViews/TransactionButton.swift | 7 +-
TalerWallet1/Views/Peer2peer/SendAmount.swift | 2 +-
.../WithdrawAcceptView.swift | 2 +-
.../WithdrawBankIntegrated/WithdrawURIView.swift | 2 +-
TestFlight/WhatToTest.en-US.txt | 6 ++
13 files changed, 142 insertions(+), 58 deletions(-)
diff --git a/TalerWallet.xcodeproj/project.pbxproj
b/TalerWallet.xcodeproj/project.pbxproj
index 8da3aa6..49fec93 100644
--- a/TalerWallet.xcodeproj/project.pbxproj
+++ b/TalerWallet.xcodeproj/project.pbxproj
@@ -1486,7 +1486,7 @@
CODE_SIGN_ENTITLEMENTS =
"$(TARGET_NAME).entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 0.13.4;
+ CURRENT_PROJECT_VERSION = 0.13.5;
DEVELOPMENT_TEAM = GUDDQ9428Y;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
@@ -1504,7 +1504,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 0.13.2;
+ MARKETING_VERSION = 0.13.3;
PRODUCT_BUNDLE_IDENTIFIER =
"com.taler-systems.talerwallet-1";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1528,7 +1528,7 @@
CODE_SIGN_ENTITLEMENTS =
"$(TARGET_NAME).entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 0.13.4;
+ CURRENT_PROJECT_VERSION = 0.13.5;
DEVELOPMENT_TEAM = GUDDQ9428Y;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
@@ -1546,7 +1546,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 0.13.2;
+ MARKETING_VERSION = 0.13.3;
PRODUCT_BUNDLE_IDENTIFIER =
"com.taler-systems.talerwallet-1";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1693,7 +1693,7 @@
CODE_SIGN_ENTITLEMENTS =
"$(TARGET_NAME).entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 0.13.4;
+ CURRENT_PROJECT_VERSION = 0.13.5;
DEVELOPMENT_TEAM = GUDDQ9428Y;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
@@ -1711,7 +1711,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 0.13.2;
+ MARKETING_VERSION = 0.13.3;
PRODUCT_BUNDLE_IDENTIFIER =
"com.taler-systems.talerwallet-2";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1735,7 +1735,7 @@
CODE_SIGN_ENTITLEMENTS =
"$(TARGET_NAME).entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 0.13.4;
+ CURRENT_PROJECT_VERSION = 0.13.5;
DEVELOPMENT_TEAM = GUDDQ9428Y;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
@@ -1753,7 +1753,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 0.13.2;
+ MARKETING_VERSION = 0.13.3;
PRODUCT_BUNDLE_IDENTIFIER =
"com.taler-systems.talerwallet-2";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
diff --git a/TalerWallet1/Backend/WalletCore.swift
b/TalerWallet1/Backend/WalletCore.swift
index bcf1011..d170d11 100644
--- a/TalerWallet1/Backend/WalletCore.swift
+++ b/TalerWallet1/Backend/WalletCore.swift
@@ -323,6 +323,9 @@ extension WalletCore {
case Notification.Name.ExchangeAdded.rawValue:
symLog.log(anyPayload)
postNotification(.ExchangeAdded)
+ case Notification.Name.ExchangeDeleted.rawValue:
+ symLog.log(anyPayload)
+ postNotification(.ExchangeDeleted)
case Notification.Name.ReserveNotYetFound.rawValue:
if let reservePub = payload.reservePub {
let userInfo = ["reservePub" : reservePub]
diff --git a/TalerWallet1/Controllers/Controller.swift
b/TalerWallet1/Controllers/Controller.swift
index 3ecdba3..5fd5960 100755
--- a/TalerWallet1/Controllers/Controller.swift
+++ b/TalerWallet1/Controllers/Controller.swift
@@ -132,7 +132,7 @@ class Controller: ObservableObject {
return info
}
}
- logger.log(" ❗️ no info for \(currency)")
+// logger.log(" ❗️ no info for \(currency)")
return nil
}
func info(for currency: String, _ ticker: Int) -> CurrencyInfo {
@@ -148,7 +148,7 @@ class Controller: ObservableObject {
return true
}
}
- logger.log(" ❗️ no info for \(currency)")
+// logger.log(" ❗️ no info for \(currency)")
return false
}
@@ -159,6 +159,7 @@ class Controller: ObservableObject {
return exchange1
}
if let exchange2 = try? await model.getExchangeByUrl(url: baseUrl)
{
+// logger.log(" ❗️ will add \(baseUrl)")
exchanges.append(exchange2)
return exchange2
}
@@ -169,7 +170,7 @@ class Controller: ObservableObject {
func updateInfo(_ scope: ScopeInfo, model: WalletModel) async {
if let info = try? await model.getCurrencyInfoM(scope: scope) {
await setInfo(info)
- logger.log(" ❗️info set for \(scope.currency)")
+// logger.log(" ❗️info set for \(scope.currency)")
}
}
diff --git a/TalerWallet1/Controllers/PublicConstants.swift
b/TalerWallet1/Controllers/PublicConstants.swift
index 0f78d76..b2901c5 100644
--- a/TalerWallet1/Controllers/PublicConstants.swift
+++ b/TalerWallet1/Controllers/PublicConstants.swift
@@ -93,6 +93,7 @@ extension Notification.Name {
static let Idle = Notification.Name("idle")
static let BalanceChange = Notification.Name("balance-change")
static let ExchangeAdded = Notification.Name("exchange-added")
+ static let ExchangeDeleted = Notification.Name("exchange-deleted")
static let ExchangeStateTransition =
Notification.Name(ExchangeTransition.TransitionType.transition.rawValue)
static let TransactionStateTransition =
Notification.Name(TransactionTransition.TransitionType.transition.rawValue)
static let TransactionDone = Notification.Name("transaction-done")
diff --git a/TalerWallet1/Localizable.xcstrings
b/TalerWallet1/Localizable.xcstrings
index f7a37a5..2d1321f 100755
--- a/TalerWallet1/Localizable.xcstrings
+++ b/TalerWallet1/Localizable.xcstrings
@@ -6759,6 +6759,16 @@
}
}
},
+ "This payment provider is in use. Delete anyway?" : {
+ "localizations" : {
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Dieser Zahlungsdienst ist in Verwendung. Trotzdem
löschen?"
+ }
+ }
+ }
+ },
"This request will be cancelled if it doesn't get paid in time, or when
you abort the operation." : {
"localizations" : {
"de" : {
@@ -8260,6 +8270,16 @@
}
}
},
+ "You will loose all %@ of this payment provider" : {
+ "localizations" : {
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Sie verlieren alle %@ dieses Zahlungsdienstes"
+ }
+ }
+ }
+ },
"Your bank's wire fee: %@" : {
"localizations" : {
"de" : {
diff --git a/TalerWallet1/Taler_Wallet InfoPlist.xcstrings
b/TalerWallet1/Taler_Wallet InfoPlist.xcstrings
index 25d82e2..130ab42 100644
--- a/TalerWallet1/Taler_Wallet InfoPlist.xcstrings
+++ b/TalerWallet1/Taler_Wallet InfoPlist.xcstrings
@@ -5,6 +5,12 @@
"comment" : "Bundle display name",
"extractionState" : "extracted_with_value",
"localizations" : {
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Taler Wallet"
+ }
+ },
"en" : {
"stringUnit" : {
"state" : "new",
@@ -23,6 +29,12 @@
"comment" : "Bundle name",
"extractionState" : "extracted_with_value",
"localizations" : {
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Taler_Wallet"
+ }
+ },
"en" : {
"stringUnit" : {
"state" : "new",
@@ -41,6 +53,12 @@
"comment" : "Privacy - Camera Usage Description",
"extractionState" : "extracted_with_value",
"localizations" : {
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "QR-Codes scannen"
+ }
+ },
"en" : {
"stringUnit" : {
"state" : "new",
@@ -59,6 +77,12 @@
"comment" : "Copyright (human-readable)",
"extractionState" : "extracted_with_value",
"localizations" : {
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "© Taler-Systems.com"
+ }
+ },
"en" : {
"stringUnit" : {
"state" : "new",
diff --git a/TalerWallet1/Views/Banking/ExchangeListView.swift
b/TalerWallet1/Views/Banking/ExchangeListView.swift
index 9a0343e..f2deefd 100644
--- a/TalerWallet1/Views/Banking/ExchangeListView.swift
+++ b/TalerWallet1/Views/Banking/ExchangeListView.swift
@@ -27,6 +27,7 @@ struct ExchangeListView: View {
if let _ = try? await model.addExchange(url: exchange) {
symLog.log("added: \(exchange)")
announce("added: \(exchange)")
+ NotificationCenter.default.post(name: .ExchangeAdded, object:
nil, userInfo: nil)
}
}
}
@@ -84,7 +85,7 @@ struct ExchangeListCommonV {
func reloadExchanges() async -> Void {
if let exc = try? await model.listExchangesM() {
- exchanges = exc
+ withAnimation { exchanges = exc }
}
}
}
@@ -96,56 +97,57 @@ extension ExchangeListCommonV: View {
let _ = symLog?.vlog() // just to get the # to compare it with
.onAppear & onDisappear
#endif
let sortedExchanges = exchanges.sorted { $0 < $1 }
+ let sortedList = List(sortedExchanges, id: \.self) { exchange in
+ ExchangeSectionView(stack: stack.push(),
+ balances: $balances,
+ exchange: exchange,
+// depositIBAN: $depositIBAN,
+// accountHolder: $accountHolder,
+ amountToTransfer: $amountToTransfer) //
does still have the wrong currency
+ }
+
+ let emptyList = List {
+ Section {
+ Text("There are no Payment Services yet.")
+ .talerFont(.title3)
+ }
+ Section {
+ Text("Use the Add button to add a service.")
+ .talerFont(.body)
+ .listRowSeparator(.hidden)
+ Text("You can also scan a withdrawal QR code from your bank on
the Balances tab to automatically add a payment service.")
+ .talerFont(.body)
+ }
+ }
+
// TODO: Balances for amountAvailable for Deposit
Group {
- List(sortedExchanges, id: \.self) { exchange in
- ExchangeSectionView(stack: stack.push(),
- balances: $balances,
- exchange: exchange,
-// depositIBAN: $depositIBAN,
-// accountHolder: $accountHolder,
- amountToTransfer: $amountToTransfer) //
does still have the wrong currency
+ if exchanges.isEmpty {
+ emptyList
+ } else {
+ sortedList
}
+ }
+ .listStyle(myListStyle.style).anyView
//#if REFRESHABLE
- .refreshable {
- symLog?.log("refreshing")
- await reloadExchanges()
- }
-//#endif
- .listStyle(myListStyle.style).anyView
+ .refreshable {
+ symLog?.log("refreshing")
+ await reloadExchanges()
}
+//#endif
.onAppear() {
DebugViewC.shared.setViewID(VIEW_BANKING, stack: stack.push())
}
- .overlay {
- if exchanges.isEmpty {
- List {
- Section {
- Text("There are no Payment Services yet.")
- .talerFont(.title3)
- }
- Section {
- Text("Use the Add button to add a service.")
- .talerFont(.body)
- .listRowSeparator(.hidden)
- Text("You can also scan a withdrawal QR code from your
bank on the Balances tab to automatically add a payment service.")
- .talerFont(.body)
- }
- }
-//#if REFRESHABLE
- .refreshable {
- symLog?.log("refreshing")
- await reloadExchanges()
- }
-//#endif
- .listStyle(myListStyle.style).anyView
- }
- }
.onNotification(.ExchangeAdded) { notification in
// doesn't need to be received on main thread because we just
reload in the background anyway
symLog?.log(".onNotification(.ExchangeAdded) ==> reloading
exchanges")
Task { await reloadExchanges() } // runs on MainActor
}
+ .onNotification(.ExchangeDeleted) { notification in
+ // doesn't need to be received on main thread because we just
reload in the background anyway
+ symLog?.log(".onNotification(.ExchangeDeleted) ==> reloading
exchanges")
+ Task { await reloadExchanges() } // runs on MainActor
+ }
.task {
symLog?.log(".task")
await reloadExchanges()
diff --git a/TalerWallet1/Views/Banking/ExchangeSectionView.swift
b/TalerWallet1/Views/Banking/ExchangeSectionView.swift
index 2e5a9c3..852a0a2 100755
--- a/TalerWallet1/Views/Banking/ExchangeSectionView.swift
+++ b/TalerWallet1/Views/Banking/ExchangeSectionView.swift
@@ -1,14 +1,19 @@
/*
- * This file is part of GNU Taler, ©2022-23 Taler Systems S.A.
+ * This file is part of GNU Taler, ©2022-24 Taler Systems S.A.
* See LICENSE.md
*/
+/**
+ * @author Marc Stibane
+ */
import SwiftUI
import taler_swift
+import SymLog
/// This view shows the currency name in an exchange section
/// currency
/// [Deposit Coins] [Withdraw Coins]
struct ExchangeSectionView: View {
+ private let symLog = SymLogV(0)
let stack: CallStack
@Binding var balances: [Balance]
let exchange: Exchange
@@ -47,10 +52,14 @@ struct ExchangeSectionView: View {
private func deleteExchange() {
disabled = true // don't try this more than once
+ let doPurge = purge
Task { // runs on MainActor
- if let _ = try? await model.deleteExchange(url:
exchange.exchangeBaseUrl, purge: purge) {
-// symLog.log("\(executed) \(transactionId)")
+ let baseUrl = exchange.exchangeBaseUrl
+ if let _ = try? await model.deleteExchange(url: baseUrl, purge:
doPurge, viewHandles: !doPurge) {
+ symLog.log("deleted \(baseUrl.trimURL())")
didDelete = true // change button text
+ NotificationCenter.default.post(name: .ExchangeDeleted,
object: nil, userInfo: nil)
+ NotificationCenter.default.post(name: .BalanceChange, object:
nil, userInfo: nil)
} else {
purge = true
disabled = false
@@ -92,15 +101,29 @@ struct ExchangeSectionView: View {
.accessibilityElement(children: .combine)
.accessibilityLabel(bankingHint + " " + linkTitle)
.padding(.top)
+ .listRowSeparator(.hidden)
}
let buttonTitle = String(localized: "Exchange.Delete",
defaultValue: "Delete Payment Provider", comment: "Action button")
- WarningButton(warningText: String(localized: "Are you sure you
want to delete this payment provider?"),
+ let warningText1 = String(localized: "Are you sure you want to
delete this payment provider?")
+ let warningText2 = String(localized: "This payment provider is in
use. Delete anyway?")
+ WarningButton(warningText: warningText1,
buttonTitle: buttonTitle,
buttonIcon: "trash",
role: .destructive,
disabled: $disabled,
action: deleteExchange)
+ .padding(.top)
+ .alert(warningText2, isPresented: $purge, actions: {
+ Button("Cancel", role: .cancel) {
+ purge = false
+ }
+ Button(buttonTitle) {
+ deleteExchange()
+ purge = false
+ }
+ }, message: { Text("You will loose all \(currency) of this
payment provider") }
+ )
} header: {
BarGraphHeader(stack: stack.push(),
scopeInfo: scopeInfo,
@@ -109,6 +132,7 @@ struct ExchangeSectionView: View {
shouldReloadBalances: $shouldReloadBalances)
}
.task(id: controller.currencyTicker) {
+ symLog.log("task \(didDelete ? 1 : 0)")
currencyInfo = controller.info(for: currency,
controller.currencyTicker)
currencyName = currencyInfo.scope.currency
currencySymbol = currencyInfo.altUnitSymbol ?? currencyName
diff --git a/TalerWallet1/Views/HelperViews/TransactionButton.swift
b/TalerWallet1/Views/HelperViews/TransactionButton.swift
index 32a3560..ce6429b 100755
--- a/TalerWallet1/Views/HelperViews/TransactionButton.swift
+++ b/TalerWallet1/Views/HelperViews/TransactionButton.swift
@@ -1,7 +1,10 @@
/*
- * This file is part of GNU Taler, ©2022-23 Taler Systems S.A.
+ * This file is part of GNU Taler, ©2022-24 Taler Systems S.A.
* See LICENSE.md
*/
+/**
+ * @author Marc Stibane
+ */
import SwiftUI
import taler_swift
import AVFoundation
@@ -34,9 +37,9 @@ struct WarningButton: View {
Image(systemName: buttonIcon)
}
}
+ .frame(maxWidth: .infinity)
}
.talerFont(.title2)
- .frame(maxWidth: .infinity)
.buttonStyle(.bordered)
.controlSize(.large)
.disabled(disabled)
diff --git a/TalerWallet1/Views/Peer2peer/SendAmount.swift
b/TalerWallet1/Views/Peer2peer/SendAmount.swift
index 9d0ff0c..83fca23 100644
--- a/TalerWallet1/Views/Peer2peer/SendAmount.swift
+++ b/TalerWallet1/Views/Peer2peer/SendAmount.swift
@@ -11,7 +11,7 @@ import SymLog
// Called when tapping "Send Coins" in the balances list
struct SendAmount: View {
- private let symLog = SymLogV()
+ private let symLog = SymLogV(0)
let stack: CallStack
@Binding var currencyInfo: CurrencyInfo
diff --git
a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift
b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift
index 684f0fe..b0abdb7 100644
--- a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift
+++ b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift
@@ -10,7 +10,7 @@ import taler_swift
import SymLog
struct WithdrawAcceptView: View {
- private let symLog = SymLogV()
+ private let symLog = SymLogV(0)
let stack: CallStack
@Binding var currencyInfo: CurrencyInfo
let navTitle = String(localized: "Withdrawal")
diff --git
a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
index 1e60f2e..80cdb80 100755
--- a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
+++ b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
@@ -13,7 +13,7 @@ import SymLog
// We show the user the bank-integrated withdrawal details in a sheet - but
first the ToS must be accepted.
// After the user confirmed the withdrawal, we show a button to return to the
bank website to authorize (2FA)
struct WithdrawURIView: View {
- private let symLog = SymLogV()
+ private let symLog = SymLogV(0)
let stack: CallStack
// the URL from the bank website
diff --git a/TestFlight/WhatToTest.en-US.txt b/TestFlight/WhatToTest.en-US.txt
index 3238905..624f181 100644
--- a/TestFlight/WhatToTest.en-US.txt
+++ b/TestFlight/WhatToTest.en-US.txt
@@ -1,3 +1,9 @@
+Version 0.13.3 (wallet-core 0.13.5)
+
+• Swipe left to delete transactions
+- bugfix for deleting payment providers
+
+
Version 0.13.2 (wallet-core 0.13.4)
- bugfix for deposit
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] branch master updated (16eefa4 -> 30caf4d),
gnunet <=
- [taler-taler-ios] 01/07: German localization, gnunet, 2024/10/03
- [taler-taler-ios] 04/07: deleteExchange, gnunet, 2024/10/03
- [taler-taler-ios] 02/07: ExchangeDeleted, gnunet, 2024/10/03
- [taler-taler-ios] 03/07: debugging, gnunet, 2024/10/03
- [taler-taler-ios] 07/07: Bump version to 0.13.3 (0.13.5), gnunet, 2024/10/03
- [taler-taler-ios] 05/07: layout, gnunet, 2024/10/03
- [taler-taler-ios] 06/07: German localization, gnunet, 2024/10/03