taler-ios

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

commit 6154b92492673d400315f78b8ecd4cef92c0f7cd
parent e77028d251183015f2881da2ca78da5e168d84d6
Author: Marc Stibane <marc@taler.net>
Date:   Wed, 28 Jun 2023 17:57:44 +0200

Decodable

Diffstat:
MTalerWallet1/Model/Model+Exchange.swift | 3+--
MTalerWallet1/Model/Model+Settings.swift | 4++--
MTalerWallet1/Model/Model+Transactions.swift | 10+++++-----
MTalerWallet1/Model/Model+Withdraw.swift | 2+-
4 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/TalerWallet1/Model/Model+Exchange.swift b/TalerWallet1/Model/Model+Exchange.swift @@ -66,6 +66,7 @@ fileprivate struct ListExchanges: WalletBackendFormattedRequest { /// A request to add an exchange. fileprivate struct AddExchange: WalletBackendFormattedRequest { + struct Response: Decodable {} // no result - getting no error back means success func operation() -> String { return "addExchange" } func args() -> Args { return Args(exchangeBaseUrl: exchangeBaseUrl) } @@ -74,8 +75,6 @@ fileprivate struct AddExchange: WalletBackendFormattedRequest { struct Args: Encodable { var exchangeBaseUrl: String } - - struct Response: Decodable {} } // MARK: - extension WalletModel { diff --git a/TalerWallet1/Model/Model+Settings.swift b/TalerWallet1/Model/Model+Settings.swift @@ -16,7 +16,7 @@ fileprivate let DEMO_MERCHANTAUTHTOKEN = "secret-token:sandbox" // MARK: - /// A request to add a test balance to the wallet. fileprivate struct WalletBackendWithdrawTestBalance: WalletBackendFormattedRequest { - typealias Response = String + struct Response: Decodable {} // no result - getting no error back means success func operation() -> String { return "withdrawTestBalance" } func args() -> Args { return Args(amount: amount, bankBaseUrl: bankBaseUrl, @@ -49,7 +49,7 @@ extension WalletModel { // MARK: - /// A request to add a test balance to the wallet. fileprivate struct WalletBackendRunIntegration: WalletBackendFormattedRequest { - struct Response: Decodable {} + struct Response: Decodable {} // no result - getting no error back means success func operation() -> String { return newVersion ? "runIntegrationTestV2" : "runIntegrationTest" } func args() -> Args { return Args(amountToWithdraw: amountToWithdraw, diff --git a/TalerWallet1/Model/Model+Transactions.swift b/TalerWallet1/Model/Model+Transactions.swift @@ -52,7 +52,7 @@ fileprivate struct GetTransactions: WalletBackendFormattedRequest { } /// A request to abort a wallet transaction by ID. struct AbortTransaction: WalletBackendFormattedRequest { - struct Response: Decodable {} + struct Response: Decodable {} // no result - getting no error back means success func operation() -> String { return "abortTransaction" } func args() -> Args { return Args(transactionId: transactionId) } @@ -63,7 +63,7 @@ struct AbortTransaction: WalletBackendFormattedRequest { } /// A request to delete a wallet transaction by ID. struct DeleteTransaction: WalletBackendFormattedRequest { - struct Response: Decodable {} + struct Response: Decodable {} // no result - getting no error back means success func operation() -> String { return "deleteTransaction" } func args() -> Args { return Args(transactionId: transactionId) } @@ -74,7 +74,7 @@ struct DeleteTransaction: WalletBackendFormattedRequest { } /// A request to delete a wallet transaction by ID. struct FailTransaction: WalletBackendFormattedRequest { - struct Response: Decodable {} + struct Response: Decodable {} // no result - getting no error back means success func operation() -> String { return "failTransaction" } func args() -> Args { return Args(transactionId: transactionId) } @@ -85,7 +85,7 @@ struct FailTransaction: WalletBackendFormattedRequest { } /// A request to suspend a wallet transaction by ID. struct SuspendTransaction: WalletBackendFormattedRequest { - struct Response: Decodable {} + struct Response: Decodable {} // no result - getting no error back means success func operation() -> String { return "suspendTransaction" } func args() -> Args { return Args(transactionId: transactionId) } @@ -96,7 +96,7 @@ struct SuspendTransaction: WalletBackendFormattedRequest { } /// A request to suspend a wallet transaction by ID. struct ResumeTransaction: WalletBackendFormattedRequest { - struct Response: Decodable {} + struct Response: Decodable {} // no result - getting no error back means success func operation() -> String { return "resumeTransaction" } func args() -> Args { return Args(transactionId: transactionId) } diff --git a/TalerWallet1/Model/Model+Withdraw.swift b/TalerWallet1/Model/Model+Withdraw.swift @@ -84,7 +84,7 @@ fileprivate struct GetExchangeTermsOfService: WalletBackendFormattedRequest { } /// A request to mark an exchange's terms of service as accepted. fileprivate struct SetExchangeTOSAccepted: WalletBackendFormattedRequest { - struct Response: Decodable {} + struct Response: Decodable {} // no result - getting no error back means success func operation() -> String { return "setExchangeTosAccepted" } func args() -> Args { return Args(exchangeBaseUrl: exchangeBaseUrl, etag: etag) }