gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] branch master updated (9453c61 -> eb37a73)


From: gnunet
Subject: [taler-taler-ios] branch master updated (9453c61 -> eb37a73)
Date: Fri, 01 Mar 2024 10:23:26 +0100

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 9453c61  Bump version to 0.9.4 (11)
     new 898b6d9  direct withdrawal in empty wallet
     new eb37a73  Bump version to 0.9.4 (12)

The 2 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          |  8 +++---
 TalerWallet1/Model/Model+Settings.swift        |  9 +++---
 TalerWallet1/Views/Main/WalletEmptyView.swift  | 38 ++++++++++++++++++++------
 TalerWallet1/Views/Settings/SettingsView.swift |  6 ++--
 TestFlight/WhatToTest.en-US.txt                |  5 ++++
 5 files changed, 46 insertions(+), 20 deletions(-)

diff --git a/TalerWallet.xcodeproj/project.pbxproj 
b/TalerWallet.xcodeproj/project.pbxproj
index 31b80f7..796ddda 100644
--- a/TalerWallet.xcodeproj/project.pbxproj
+++ b/TalerWallet.xcodeproj/project.pbxproj
@@ -1353,7 +1353,7 @@
                                CODE_SIGN_ENTITLEMENTS = 
"$(TARGET_NAME).entitlements";
                                CODE_SIGN_IDENTITY = "Apple Development";
                                CODE_SIGN_STYLE = Automatic;
-                               CURRENT_PROJECT_VERSION = 11;
+                               CURRENT_PROJECT_VERSION = 12;
                                DEVELOPMENT_TEAM = GUDDQ9428Y;
                                ENABLE_PREVIEWS = YES;
                                GENERATE_INFOPLIST_FILE = YES;
@@ -1395,7 +1395,7 @@
                                CODE_SIGN_ENTITLEMENTS = 
"$(TARGET_NAME).entitlements";
                                CODE_SIGN_IDENTITY = "Apple Development";
                                CODE_SIGN_STYLE = Automatic;
-                               CURRENT_PROJECT_VERSION = 11;
+                               CURRENT_PROJECT_VERSION = 12;
                                DEVELOPMENT_TEAM = GUDDQ9428Y;
                                ENABLE_PREVIEWS = YES;
                                GENERATE_INFOPLIST_FILE = YES;
@@ -1554,7 +1554,7 @@
                                CODE_SIGN_ENTITLEMENTS = 
"$(TARGET_NAME).entitlements";
                                CODE_SIGN_IDENTITY = "Apple Development";
                                CODE_SIGN_STYLE = Automatic;
-                               CURRENT_PROJECT_VERSION = 11;
+                               CURRENT_PROJECT_VERSION = 12;
                                DEVELOPMENT_TEAM = GUDDQ9428Y;
                                ENABLE_PREVIEWS = YES;
                                GENERATE_INFOPLIST_FILE = YES;
@@ -1596,7 +1596,7 @@
                                CODE_SIGN_ENTITLEMENTS = 
"$(TARGET_NAME).entitlements";
                                CODE_SIGN_IDENTITY = "Apple Development";
                                CODE_SIGN_STYLE = Automatic;
-                               CURRENT_PROJECT_VERSION = 11;
+                               CURRENT_PROJECT_VERSION = 12;
                                DEVELOPMENT_TEAM = GUDDQ9428Y;
                                ENABLE_PREVIEWS = YES;
                                GENERATE_INFOPLIST_FILE = YES;
diff --git a/TalerWallet1/Model/Model+Settings.swift 
b/TalerWallet1/Model/Model+Settings.swift
index eb3b019..a727679 100644
--- a/TalerWallet1/Model/Model+Settings.swift
+++ b/TalerWallet1/Model/Model+Settings.swift
@@ -33,13 +33,12 @@ fileprivate struct WithdrawTestBalanceRequest: 
WalletBackendFormattedRequest {
     }
 }
 extension WalletModel {
-    @MainActor func loadTestKudosM(test: Bool)
+    @MainActor func loadTestKudosM(test: Bool, amount: Amount)
     async throws {          // M for MainActor
-        let amount = Amount(currency:  test ? TESTCURRENCY : DEMOCURRENCY, 
cent: 1100)
         let request = WithdrawTestBalanceRequest(amount: amount,
-//                                                 bankBaseUrl: test ? 
TESTBANK : DEMOBANK,
-                                                 corebankApiBaseUrl: test ? 
TESTBANK : DEMOBANK,
-                                                 exchangeBaseUrl: test ? 
TESTEXCHANGE : DEMOEXCHANGE)
+//                                             bankBaseUrl: test ? TESTBANK : 
DEMOBANK,
+                                     corebankApiBaseUrl: test ? TESTBANK : 
DEMOBANK,
+                                        exchangeBaseUrl: test ? TESTEXCHANGE : 
DEMOEXCHANGE)
         let response = try await sendRequest(request, ASYNCDELAY)
     }
 } // loadTestKudosM()
diff --git a/TalerWallet1/Views/Main/WalletEmptyView.swift 
b/TalerWallet1/Views/Main/WalletEmptyView.swift
index ff72980..0a4f3e0 100644
--- a/TalerWallet1/Views/Main/WalletEmptyView.swift
+++ b/TalerWallet1/Views/Main/WalletEmptyView.swift
@@ -7,6 +7,7 @@
  */
 import SwiftUI
 import SymLog
+import taler_swift
 
 /// This view shows hints if a wallet is empty
 /// It is the very first thing the user sees after installing the app
@@ -14,7 +15,10 @@ import SymLog
 struct WalletEmptyView: View {
     private let symLog = SymLogV(0)
     let stack: CallStack
+
+    @EnvironmentObject private var model: WalletModel
     @AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic
+    @State private var withDrawDisabled = false
 
     var body: some View {
         List {
@@ -23,21 +27,37 @@ struct WalletEmptyView: View {
                     .talerFont(.title3)
             }
             Section {
-                Text("You can register an account in the demo bank, then 
withdraw some digital cash to experience how to pay with the money of the 
future.")
+                Text("Use the QR code scan button to start a withdrawal if 
your bank already supports Taler payments.")
                     .talerFont(.body)
                     .listRowSeparator(.hidden)
-                let title = String(localized: "LinkTitle_Test_Money", 
defaultValue: "Get demo money")
-                Link(title, destination: URL(string: DEMOBANK)!)
-                    .buttonStyle(TalerButtonStyle(type: .prominent, narrow: 
false, aligned: .center))
-                    .padding(.vertical)
-                    .accessibilityHint("Will go to the demo bank website.")
+                Text("You can also add a payment service manually on the 
Banking tab.")
+                    .talerFont(.body)
             }
             Section {
-                Text("Use the QR code scan button to start a withdrawal if 
your bank already supports Taler payments.")
+                Text("Demo: get digital cash to experience how to pay with the 
money of the future.")
+//                Text("You can register an account in the demo bank, then 
withdraw some digital cash to experience how to pay with the money of the 
future.")
                     .talerFont(.body)
                     .listRowSeparator(.hidden)
-                Text("You can also add a payment service manually on the 
Banking tab.")
-                    .talerFont(.body)
+                let title = String(localized: "LinkTitle_Test_Money", 
defaultValue: "Get demo money")
+                Button(title) {
+                    withDrawDisabled = true    // don't run twice
+                    Task { // runs on MainActor
+                        let amount = Amount(currency:  DEMOCURRENCY, cent: 
2500)
+                        symLog.log("Withdraw KUDOS")
+                        do {
+                            try await model.loadTestKudosM(test: false, 
amount: amount)
+                        } catch {    // TODO: show error
+                            symLog.log(error.localizedDescription)
+                        }
+                    }
+                }
+                .buttonStyle(TalerButtonStyle(type: .prominent, narrow: false, 
disabled: withDrawDisabled, aligned: .center))
+                .disabled(withDrawDisabled)
+
+//                Link(title, destination: URL(string: DEMOBANK)!)
+//                    .buttonStyle(TalerButtonStyle(type: .prominent, narrow: 
false, aligned: .center))
+//                    .padding(.vertical)
+//                    .accessibilityHint("Will go to the demo bank website.")
             }
         }
         .listStyle(myListStyle.style).anyView
diff --git a/TalerWallet1/Views/Settings/SettingsView.swift 
b/TalerWallet1/Views/Settings/SettingsView.swift
index 8e2ba06..b77a3be 100644
--- a/TalerWallet1/Views/Settings/SettingsView.swift
+++ b/TalerWallet1/Views/Settings/SettingsView.swift
@@ -153,7 +153,8 @@ struct SettingsView: View {
                                 Task { // runs on MainActor
                                     symLog.log("Withdraw KUDOS")
                                     do {
-                                        try await model.loadTestKudosM(test: 
false)
+                                        let amount = Amount(currency:  
DEMOCURRENCY, cent: 1100)
+                                        try await model.loadTestKudosM(test: 
false, amount: amount)
                                     } catch {    // TODO: show error
                                         symLog.log(error.localizedDescription)
                                     }
@@ -170,7 +171,8 @@ struct SettingsView: View {
                                 Task { // runs on MainActor
                                     symLog.log("Withdraw TESTKUDOS")
                                     do {
-                                        try await model.loadTestKudosM(test: 
true)
+                                        let amount = Amount(currency:  
TESTCURRENCY, cent: 1100)
+                                        try await model.loadTestKudosM(test: 
true, amount: amount)
                                     } catch {    // TODO: show error
                                         symLog.log(error.localizedDescription)
                                     }
diff --git a/TestFlight/WhatToTest.en-US.txt b/TestFlight/WhatToTest.en-US.txt
index 592c67e..68a0720 100644
--- a/TestFlight/WhatToTest.en-US.txt
+++ b/TestFlight/WhatToTest.en-US.txt
@@ -1,3 +1,8 @@
+Version 0.9.4 (12)
+
+• Direct withdrawal of 25 KUDOS when the wallet is empty, no need to register 
a bank account first
+
+
 Version 0.9.4 (11)
 
 • New views for empty wallet (Balances) and zero payment providers (Banking)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]