[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 04/30: cleanup, debugging
From: |
gnunet |
Subject: |
[taler-taler-ios] 04/30: cleanup, debugging |
Date: |
Sun, 19 Nov 2023 23:53:28 +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 6fec1ca046dba916cd83e2bbf44e937f2a35b1f9
Author: Marc Stibane <marc@taler.net>
AuthorDate: Fri Nov 17 14:45:24 2023 +0100
cleanup, debugging
---
TalerWallet1/Backend/WalletCore.swift | 2 +-
TalerWallet1/Views/Balances/BalancesSectionView.swift | 19 +++++++++----------
TalerWallet1/Views/Exchange/ManualWithdraw.swift | 6 ++++--
TalerWallet1/Views/Peer2peer/RequestPayment.swift | 5 +++--
TalerWallet1/Views/Peer2peer/SendAmount.swift | 2 ++
TalerWallet1/Views/Settings/SettingsView.swift | 3 +++
.../WithdrawBankIntegrated/WithdrawURIView.swift | 2 +-
TalerWallet1/Views/Transactions/ManualDetailsV.swift | 10 +++++-----
8 files changed, 28 insertions(+), 21 deletions(-)
diff --git a/TalerWallet1/Backend/WalletCore.swift
b/TalerWallet1/Backend/WalletCore.swift
index 350f194..636102f 100644
--- a/TalerWallet1/Backend/WalletCore.swift
+++ b/TalerWallet1/Backend/WalletCore.swift
@@ -133,7 +133,7 @@ extension WalletCore {
}
do {
let jsonData = try JSONEncoder().encode(result)
- symLog.log(result)
+ symLog.log("id:\(requestId) \(result)")
// logger.info(result) TODO: log result
completion(requestId, timeSent, jsonData, nil)
} catch { // JSON encoding of response.result failed / should
never happen
diff --git a/TalerWallet1/Views/Balances/BalancesSectionView.swift
b/TalerWallet1/Views/Balances/BalancesSectionView.swift
index 5d58670..0578b0d 100644
--- a/TalerWallet1/Views/Balances/BalancesSectionView.swift
+++ b/TalerWallet1/Views/Balances/BalancesSectionView.swift
@@ -44,21 +44,18 @@ struct BalancesSectionView {
let currency = balance.scopeInfo.currency
transactions = await model.transactionsT(stack.push(), currency:
currency)
completedTransactions = WalletModel.completedTransactions(transactions)
-// sectionID = UUID()
}
func reloadPending(_ stack: CallStack) async -> () {
let currency = balance.scopeInfo.currency
transactions = await model.transactionsT(stack.push(), currency:
currency)
pendingTransactions = WalletModel.pendingTransactions(transactions)
-// sectionID = UUID()
}
func reloadIncomplete(_ stack: CallStack) async -> () {
let currency = balance.scopeInfo.currency
transactions = await model.transactionsT(stack.push(), currency:
currency)
incompleteTransactions =
WalletModel.incompleteTransactions(transactions)
-// sectionID = UUID()
}
}
@@ -78,13 +75,14 @@ extension BalancesSectionView: View {
.accessibilityFont(.body)
.multilineTextAlignment(.leading)
}
- BalancesNavigationLinksView(stack: stack.push(),
- balance: balance,
- amountToTransfer: $amountToTransfer, //
does still have the wrong currency
- summary: $summary,
- completedTransactions: $completedTransactions,
- reloadAllAction: reloadCompleted,
- reloadOneAction: reloadOneAction)
+ BalancesNavigationLinksView(symLog: symLog,
+ stack: stack.push(),
+ balance: balance,
+ amountToTransfer: $amountToTransfer, //
does still have the wrong currency
+ summary: $summary,
+ completedTransactions: $completedTransactions,
+ reloadAllAction: reloadCompleted,
+ reloadOneAction: reloadOneAction)
if pendingTransactions.count > 0 {
BalancesPendingRowView(symLog: symLog,
stack: stack.push(),
@@ -213,6 +211,7 @@ fileprivate struct BalancesPendingRowView: View {
} // BalancesPendingRowView
fileprivate struct BalancesNavigationLinksView: View {
+ let symLog: SymLogV?
let stack: CallStack
let balance: Balance
// let sectionCount: Int
diff --git a/TalerWallet1/Views/Exchange/ManualWithdraw.swift
b/TalerWallet1/Views/Exchange/ManualWithdraw.swift
index 505b55d..e371df4 100644
--- a/TalerWallet1/Views/Exchange/ManualWithdraw.swift
+++ b/TalerWallet1/Views/Exchange/ManualWithdraw.swift
@@ -37,8 +37,10 @@ struct ManualWithdraw: View {
: String(localized: "Amount
to withdraw:"),
shortcutLabel: String(localized: "Withdraw",
comment: "VoiceOver: Withdraw $50,$25,$10,$5 shortcut buttons"))
let someCoins = SomeCoins(details: withdrawalAmountDetails)
- QuiteSomeCoins(someCoins: someCoins, shouldShowFee: true,
- currency: currency, amountEffective:
withdrawalAmountDetails?.amountEffective)
+ QuiteSomeCoins(someCoins: someCoins,
+ shouldShowFee: true, // TODO: set to
false if we never charge withdrawal fees
+ currency: currency,
+ amountEffective:
withdrawalAmountDetails?.amountEffective)
Text(exchange.exchangeBaseUrl.trimURL())
.multilineTextAlignment(.center)
.accessibilityFont(.body)
diff --git a/TalerWallet1/Views/Peer2peer/RequestPayment.swift
b/TalerWallet1/Views/Peer2peer/RequestPayment.swift
index a41b72e..18cc280 100644
--- a/TalerWallet1/Views/Peer2peer/RequestPayment.swift
+++ b/TalerWallet1/Views/Peer2peer/RequestPayment.swift
@@ -35,7 +35,8 @@ struct RequestPayment: View {
shortcutLabel: String(localized: "Request", comment:
"VoiceOver: Request $50,$25,$10,$5 shortcut buttons"))
let someCoins = SomeCoins(details: peerPullCheck)
- QuiteSomeCoins(someCoins: someCoins, shouldShowFee: true,
+ QuiteSomeCoins(someCoins: someCoins,
+ shouldShowFee: true, // always true since the
requester pays fees
currency: currency,
amountEffective: peerPullCheck?.amountEffective)
@@ -72,7 +73,7 @@ struct RequestPayment: View {
if !amountToTransfer.isZero {
do {
let ppCheck = try await
model.checkPeerPullCreditM(amountToTransfer, exchangeBaseUrl: nil)
- peerPullCheck = ppCheck
+ peerPullCheck = ppCheck // redraw
// TODO: set from exchange
// agePicker.setAges(ages:
peerPushCheck?.ageRestrictionOptions)
} catch { // TODO: error
diff --git a/TalerWallet1/Views/Peer2peer/SendAmount.swift
b/TalerWallet1/Views/Peer2peer/SendAmount.swift
index 7437004..5759aea 100644
--- a/TalerWallet1/Views/Peer2peer/SendAmount.swift
+++ b/TalerWallet1/Views/Peer2peer/SendAmount.swift
@@ -43,9 +43,11 @@ struct SendAmount: View {
let _ = symLog.vlog() // just to get the # to compare it with
.onAppear & onDisappear
#endif
let currency = amountAvailable.currencyStr
+ let _ = symLog.log("currency: \(currency)")
let currencyInfo = controller.info(for: currency,
controller.currencyTicker)
let navTitle = String(localized: "Send \(currency)", comment: "Send
currency, Dialog Title")
let available = amountAvailable.string(currencyInfo)
+ let _ = symLog.log("available: \(available)")
let current = amountToTransfer.string(currencyInfo)
let insufficientLabel = String(localized: "You don't have enough
\(currency).")
let insufficientLabel2 = String(localized: "but you only have
\(available) to send.")
diff --git a/TalerWallet1/Views/Settings/SettingsView.swift
b/TalerWallet1/Views/Settings/SettingsView.swift
index ae34f61..ebcd544 100644
--- a/TalerWallet1/Views/Settings/SettingsView.swift
+++ b/TalerWallet1/Views/Settings/SettingsView.swift
@@ -99,6 +99,9 @@ struct SettingsView: View {
SettingsItem(name: aboutStr, id1: "about",
description: hideDescriptions ? nil :
String(localized: "More info about this app...")) {}
}
+#if DEBUG
+ Text("https://bank.taler.grothoff.org/")
+#endif
// SettingsToggle(name: String(localized: "More Contrast"),
value: $moreContrast, id1: "contrast",
// description: hideDescriptions ? nil :
String(localized: "If you don't like grey"))
if controller.hapticCapability.supportsHaptics {
diff --git
a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
index a8e5b2d..c3e5ca2 100644
--- a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
+++ b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
@@ -46,7 +46,7 @@ struct WithdrawURIView: View {
baseURL: exchangeBaseUrl)
let someCoins = SomeCoins(details: withdrawalAmountDetails)
QuiteSomeCoins(someCoins: someCoins,
- shouldShowFee: true, // TODO: set to
false if we never charge withdrawal fees
+ shouldShowFee: true, // TODO: set to
false if we never charge withdrawal fees
currency: raw.currencyStr,
amountEffective: effective)
}
diff --git a/TalerWallet1/Views/Transactions/ManualDetailsV.swift
b/TalerWallet1/Views/Transactions/ManualDetailsV.swift
index 44fc7cf..e4400b9 100644
--- a/TalerWallet1/Views/Transactions/ManualDetailsV.swift
+++ b/TalerWallet1/Views/Transactions/ManualDetailsV.swift
@@ -16,10 +16,10 @@ struct ManualDetailsV: View {
let payto = paytoUris[0]
let payURL = URL(string: payto)
let iban = payURL?.iban ?? "unknown IBAN"
- let amount = common.amountRaw.readableDescription
+ let amountStr = common.amountRaw.readableDescription //
TODO: formatter
Group {
- Text(iconOnly ? "Transfer \(amount) to the Exchange."
- : "You need to transfer \(amount) from your
regular bank account to the Exchange.")
+ Text(iconOnly ? "Transfer \(amountStr) to the Exchange."
+ : "You need to transfer \(amountStr) from your
regular bank account to the Exchange.")
Text(iconOnly ? "Step 1: Copy+Paste this subject:"
: "Step 1: Copy this code and paste it into the
subject/purpose field in your banking app or bank website:")
.multilineTextAlignment(.leading)
@@ -55,8 +55,8 @@ struct ManualDetailsV: View {
} .padding(.leading)
.padding(.top, -8)
.listRowSeparator(.hidden)
- Text(iconOnly ? "Step 3: Transfer \(amount)."
- : "Step 3: Finish the wire transfer of \(amount)
in your banking app or website, then this withdrawal will proceed
automatically.")
+ Text(iconOnly ? "Step 3: Transfer \(amountStr)."
+ : "Step 3: Finish the wire transfer of
\(amountStr) in your banking app or website, then this withdrawal will proceed
automatically.")
.multilineTextAlignment(.leading)
.listRowSeparator(.visible)
Text(iconOnly ? "Or use this PayTo-Link:"
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] branch master updated (e79881c -> b01070b), gnunet, 2023/11/19
- [taler-taler-ios] 02/30: Use "nu" (instead of "te") for Null, gnunet, 2023/11/19
- [taler-taler-ios] 04/30: cleanup, debugging,
gnunet <=
- [taler-taler-ios] 05/30: ScrollVStack, cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 01/30: Bugfix: Arithmetic error, gnunet, 2023/11/19
- [taler-taler-ios] 06/30: Notifications, gnunet, 2023/11/19
- [taler-taler-ios] 19/30: tabbed button strings, gnunet, 2023/11/19
- [taler-taler-ios] 18/30: cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 07/30: KYC, gnunet, 2023/11/19
- [taler-taler-ios] 03/30: Dismiss keyboard, gnunet, 2023/11/19
- [taler-taler-ios] 23/30: unify P2P subject, gnunet, 2023/11/19
- [taler-taler-ios] 21/30: fix shortcuts, gnunet, 2023/11/19
- [taler-taler-ios] 26/30: badge for button, gnunet, 2023/11/19