commit e8db80fcaab3f08dfe9cc5cd5f89b06626dde4b7
parent d4666cebb9a34ad4ee4c042d2ba50afe01ed0b06
Author: Marc Stibane <marc@taler.net>
Date: Wed, 31 Jul 2024 08:22:23 +0200
comments, cleanup
Diffstat:
4 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/TalerWallet1/Model/Transaction.swift b/TalerWallet1/Model/Transaction.swift
@@ -333,7 +333,7 @@ struct TransactionCommon: Decodable, Sendable {
|| type == .scanPushCredit
}
}
-
+// MARK: - Withdrawal
struct WithdrawalDetails: Decodable {
enum WithdrawalType: String, Decodable {
case manual = "manual-transfer"
@@ -361,7 +361,7 @@ struct WithdrawalTransaction : Sendable {
var common: TransactionCommon
var details: WithdrawalTransactionDetails
}
-
+// MARK: - Deposit
struct TrackingState : Decodable {
var wireTransferId: String
var timestampExecuted: Timestamp
@@ -380,7 +380,7 @@ struct DepositTransaction : Sendable {
var common: TransactionCommon
var details: DepositTransactionDetails
}
-
+// MARK: - Payment
struct RefundInfo: Decodable {
var amountEffective: Amount
var amountRaw: Amount
@@ -401,7 +401,7 @@ struct PaymentTransaction : Sendable {
var common: TransactionCommon
var details: PaymentTransactionDetails
}
-
+// MARK: - Refund
struct RefundTransactionDetails: Decodable {
var refundedTransactionId: String
var refundPending: Amount?
@@ -409,11 +409,11 @@ struct RefundTransactionDetails: Decodable {
var amountInvalid: Amount?
var info: OrderShortInfo? // TODO: is this still here?
}
-struct RefundTransaction : Sendable{
+struct RefundTransaction : Sendable {
var common: TransactionCommon
var details: RefundTransactionDetails
}
-
+// MARK: - Refresh
enum RefreshReason: String, Decodable {
case manual
case payMerchant = "pay-merchant"
@@ -476,7 +476,7 @@ struct RefreshTransaction : Sendable {
var common: TransactionCommon
var details: RefreshTransactionDetails
}
-
+// MARK: - P2P
struct P2pShortInfo: Codable, Sendable {
var summary: String
var expiration: Timestamp
@@ -490,7 +490,7 @@ struct P2PTransaction : Sendable {
var common: TransactionCommon
var details: P2PTransactionDetails
}
-
+// MARK: - Recoup
struct RecoupTransactionDetails: Decodable {
var recoupReason: String?
}
@@ -498,7 +498,7 @@ struct RecoupTransaction : Sendable {
var common: TransactionCommon
var details: RecoupTransactionDetails
}
-
+// MARK: - DenomLoss
enum DenomLossEventType: String, Decodable {
case denomExpired = "denom-expired"
case denomVanished = "denom-vanished"
@@ -512,11 +512,11 @@ struct DenomLossTransaction : Sendable {
var common: TransactionCommon
var details: DenomLossTransactionDetails
}
-
-struct DummyTransaction : Sendable{
+// MARK: - Dummy
+struct DummyTransaction : Sendable {
var common: TransactionCommon
}
-
+// MARK: - Transaction
enum Transaction: Decodable, Hashable, Identifiable, Sendable {
case dummy (DummyTransaction)
case withdrawal (WithdrawalTransaction)
diff --git a/TalerWallet1/Views/Peer2peer/RequestPayment.swift b/TalerWallet1/Views/Peer2peer/RequestPayment.swift
@@ -33,9 +33,7 @@ struct RequestPayment: View {
amountShortcut = shortcut
shortcutSelected = true
}
- private func buttonAction() {
- buttonSelected = true
- }
+ private func buttonAction() { buttonSelected = true }
private func feeIsNotZero() -> Bool? {
if let hasNoFees = exchange?.noFees {
diff --git a/TalerWallet1/Views/Peer2peer/SendAmount.swift b/TalerWallet1/Views/Peer2peer/SendAmount.swift
@@ -41,9 +41,7 @@ struct SendAmount: View {
amountShortcut = shortcut
shortcutSelected = true
}
- private func buttonAction() {
- buttonSelected = true
- }
+ private func buttonAction() { buttonSelected = true }
private func feeLabel(_ feeString: String) -> String {
feeString.count > 0 ? String(localized: "+ \(feeString) fee")
diff --git a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawURIView.swift
@@ -11,7 +11,7 @@ import SymLog
// Called either when scanning a QR code or tapping the provided link, both from the bank's website.
// 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 confirm there, too
+// 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()
let stack: CallStack
@@ -57,9 +57,7 @@ struct WithdrawURIView: View {
amountShortcut = shortcut
shortcutSelected = true
}
- private func buttonAction() {
- buttonSelected = true
- }
+ private func buttonAction() { buttonSelected = true }
private func feeLabel(_ feeString: String) -> String {
feeString.count > 0 ? String(localized: "\(feeString) fee")