taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit d9b0137ccfc630e308fbce520f04cf47033ca88c
parent 834f11840acf469d1651aa373f9aa1cbce2156e5
Author: Marc Stibane <marc@taler.net>
Date:   Thu, 19 Dec 2024 08:13:15 +0100

terms for tx

Diffstat:
MTalerWallet1/Model/WalletModel.swift | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/TalerWallet1/Model/WalletModel.swift b/TalerWallet1/Model/WalletModel.swift @@ -98,20 +98,22 @@ extension WalletModel { fileprivate struct GetTransactionById: WalletBackendFormattedRequest { typealias Response = Transaction func operation() -> String { "getTransactionById" } - func args() -> Args { Args(transactionId: transactionId) } + func args() -> Args { Args(transactionId: transactionId, includeContractTerms: withTerms) } var transactionId: String + var withTerms: Bool? struct Args: Encodable { var transactionId: String + var includeContractTerms: Bool? } } extension WalletModel { /// get the specified transaction from Wallet-Core. No networking involved - nonisolated func getTransactionById(_ transactionId: String, viewHandles: Bool = false) + nonisolated func getTransactionById(_ transactionId: String, withTerms: Bool? = nil, viewHandles: Bool = false) async throws -> Transaction { - let request = GetTransactionById(transactionId: transactionId) + let request = GetTransactionById(transactionId: transactionId, withTerms: withTerms) return try await sendRequest(request, ASYNCDELAY, viewHandles: viewHandles) } }