[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 121/204: TransactionById
From: |
gnunet |
Subject: |
[taler-taler-ios] 121/204: TransactionById |
Date: |
Thu, 05 Dec 2024 23:51: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 fa8436c1128f994bcf266d59e6ab7f1f5947b3c7
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sat Nov 9 11:39:02 2024 +0100
TransactionById
---
TalerWallet1/Model/WalletModel.swift | 11 +++--------
TalerWallet1/Views/Actions/Banking/ManualWithdrawDone.swift | 3 ++-
TalerWallet1/Views/Actions/Peer2peer/P2PReadyV.swift | 3 ++-
TalerWallet1/Views/Balances/BalancesSectionView.swift | 3 ++-
TalerWallet1/Views/Sheets/Payment/PaymentDone.swift | 3 ++-
TalerWallet1/Views/Sheets/Refund/RefundURIView.swift | 4 ++--
.../Sheets/WithdrawBankIntegrated/WithdrawAcceptDone.swift | 3 ++-
7 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/TalerWallet1/Model/WalletModel.swift
b/TalerWallet1/Model/WalletModel.swift
index be2965b..1154273 100644
--- a/TalerWallet1/Model/WalletModel.swift
+++ b/TalerWallet1/Model/WalletModel.swift
@@ -109,17 +109,12 @@ fileprivate struct GetTransactionById:
WalletBackendFormattedRequest {
}
extension WalletModel {
- func getTransactionByIdT(_ transactionId: String, viewHandles: Bool =
false)
- async throws -> Transaction { // T for any Thread
- // might be called from a background thread itself
+ /// get the specified transaction from Wallet-Core. No networking involved
+ nonisolated func getTransactionById(_ transactionId: String, viewHandles:
Bool = false)
+ async throws -> Transaction {
let request = GetTransactionById(transactionId: transactionId)
return try await sendRequest(request, ASYNCDELAY, viewHandles:
viewHandles)
}
- /// get the specified transaction from Wallet-Core. No networking involved
- @MainActor func getTransactionByIdM(_ transactionId: String, viewHandles:
Bool = false)
- async throws -> Transaction { // M for MainActor
- return try await getTransactionByIdT(transactionId, viewHandles:
viewHandles) // call GetTransactionById on main thread
- }
}
// MARK: -
/// The info returned from Wallet-core init
diff --git a/TalerWallet1/Views/Actions/Banking/ManualWithdrawDone.swift
b/TalerWallet1/Views/Actions/Banking/ManualWithdrawDone.swift
index e64b82f..161319d 100644
--- a/TalerWallet1/Views/Actions/Banking/ManualWithdrawDone.swift
+++ b/TalerWallet1/Views/Actions/Banking/ManualWithdrawDone.swift
@@ -25,8 +25,9 @@ struct ManualWithdrawDone: View {
let navTitle = String(localized: "Wire Transfer")
+ @MainActor
func reloadOneAction(_ transactionId: String, viewHandles: Bool) async
throws -> Transaction {
- return try await model.getTransactionByIdT(transactionId, viewHandles:
viewHandles)
+ return try await model.getTransactionById(transactionId, viewHandles:
viewHandles)
}
@MainActor
diff --git a/TalerWallet1/Views/Actions/Peer2peer/P2PReadyV.swift
b/TalerWallet1/Views/Actions/Peer2peer/P2PReadyV.swift
index 09e4461..a7cce5e 100644
--- a/TalerWallet1/Views/Actions/Peer2peer/P2PReadyV.swift
+++ b/TalerWallet1/Views/Actions/Peer2peer/P2PReadyV.swift
@@ -31,8 +31,9 @@ struct P2PReadyV: View {
let navTitle = String(localized: "P2P Ready")
@State private var transactionId: String? = nil
+ @MainActor
func reloadOneAction(_ transactionId: String, viewHandles: Bool) async
throws -> Transaction {
- return try await model.getTransactionByIdT(transactionId, viewHandles:
viewHandles)
+ return try await model.getTransactionById(transactionId, viewHandles:
viewHandles)
}
@MainActor
diff --git a/TalerWallet1/Views/Balances/BalancesSectionView.swift
b/TalerWallet1/Views/Balances/BalancesSectionView.swift
index 1d5f13a..4a95b70 100644
--- a/TalerWallet1/Views/Balances/BalancesSectionView.swift
+++ b/TalerWallet1/Views/Balances/BalancesSectionView.swift
@@ -44,8 +44,9 @@ struct BalancesSectionView {
private static func className() -> String {"\(self)"}
+ @MainActor
func reloadOneAction(_ transactionId: String, _ viewHandles: Bool) async
throws -> Transaction {
- return try await model.getTransactionByIdT(transactionId, viewHandles:
viewHandles)
+ return try await model.getTransactionById(transactionId, viewHandles:
viewHandles)
}
@State private var sectionID = UUID()
diff --git a/TalerWallet1/Views/Sheets/Payment/PaymentDone.swift
b/TalerWallet1/Views/Sheets/Payment/PaymentDone.swift
index 5dcc6f0..e92dcfe 100644
--- a/TalerWallet1/Views/Sheets/Payment/PaymentDone.swift
+++ b/TalerWallet1/Views/Sheets/Payment/PaymentDone.swift
@@ -19,8 +19,9 @@ struct PaymentDone: View {
@State var paymentDone: Bool = false
+ @MainActor
func reloadOneAction(_ transactionId: String, viewHandles: Bool) async
throws -> Transaction {
- return try await model.getTransactionByIdT(transactionId, viewHandles:
viewHandles)
+ return try await model.getTransactionById(transactionId, viewHandles:
viewHandles)
}
@MainActor
diff --git a/TalerWallet1/Views/Sheets/Refund/RefundURIView.swift
b/TalerWallet1/Views/Sheets/Refund/RefundURIView.swift
index 1f7d600..67c5be6 100644
--- a/TalerWallet1/Views/Sheets/Refund/RefundURIView.swift
+++ b/TalerWallet1/Views/Sheets/Refund/RefundURIView.swift
@@ -25,7 +25,7 @@ struct RefundURIView: View {
@MainActor
func reloadOneAction(_ transactionId: String, viewHandles: Bool) async
throws -> Transaction {
- return try await model.getTransactionByIdT(transactionId, viewHandles:
viewHandles)
+ return try await model.getTransactionById(transactionId, viewHandles:
viewHandles)
}
@MainActor
@@ -33,7 +33,7 @@ struct RefundURIView: View {
symLog.log(".task")
if let result = try? await model.startRefundForUri(url:
url.absoluteString) {
refundTransactionId = result
- transaction = try? await model.getTransactionByIdM(result)
+ transaction = try? await model.getTransactionById(result)
}
}
diff --git
a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptDone.swift
b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptDone.swift
index 3339f4c..eeda397 100644
--- a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptDone.swift
+++ b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptDone.swift
@@ -25,8 +25,9 @@ struct WithdrawAcceptDone: View {
let navTitle = String(localized: "Authorize at Bank", comment: "Nav title")
+ @MainActor
func reloadOneAction(_ transactionId: String, viewHandles: Bool) async
throws -> Transaction {
- let response = try await model.getTransactionByIdT(transactionId,
viewHandles: viewHandles)
+ let response = try await model.getTransactionById(transactionId,
viewHandles: viewHandles)
transaction = response
return response
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 109/204: loadBalances, (continued)
- [taler-taler-ios] 109/204: loadBalances, gnunet, 2024/12/05
- [taler-taler-ios] 106/204: Use NavLink, gnunet, 2024/12/05
- [taler-taler-ios] 113/204: PendingOperations (unused), gnunet, 2024/12/05
- [taler-taler-ios] 114/204: Pay, gnunet, 2024/12/05
- [taler-taler-ios] 110/204: deposit, gnunet, 2024/12/05
- [taler-taler-ios] 122/204: Yellow for confirm, gnunet, 2024/12/05
- [taler-taler-ios] 119/204: cleanup, gnunet, 2024/12/05
- [taler-taler-ios] 120/204: Withdraw, gnunet, 2024/12/05
- [taler-taler-ios] 116/204: Settings, gnunet, 2024/12/05
- [taler-taler-ios] 112/204: P2P, gnunet, 2024/12/05
- [taler-taler-ios] 121/204: TransactionById,
gnunet <=
- [taler-taler-ios] 123/204: fake currency, gnunet, 2024/12/05
- [taler-taler-ios] 108/204: inputAccessory 'return', gnunet, 2024/12/05
- [taler-taler-ios] 124/204: move DB to AppSupport, gnunet, 2024/12/05
- [taler-taler-ios] 111/204: exchange, gnunet, 2024/12/05
- [taler-taler-ios] 118/204: demoHints, gnunet, 2024/12/05
- [taler-taler-ios] 126/204: cleanup, gnunet, 2024/12/05
- [taler-taler-ios] 128/204: less logging, gnunet, 2024/12/05
- [taler-taler-ios] 129/204: currencyInfo, gnunet, 2024/12/05
- [taler-taler-ios] 131/204: wire fee, gnunet, 2024/12/05
- [taler-taler-ios] 115/204: Refund, gnunet, 2024/12/05