Files
Dmitry Bespalov dd4d864d4f GH-3355 added a protected confiuration tooling
- Added new SecureConfig package that encrypts/decrypts configuration in a JSON-based file
- Added tooling to the project to read the encrypted config files at runtime
- Documented how to add the config files in README
- Removed variables from .xcconfig files and from info.plist
- Replaced info.plist-based variables with protected config variables
- Removed unused 'enfroce ssl pinning' build variable
- Temporary enabled archiving to test the pipeline
2023-10-10 18:28:08 +02:00

35 lines
840 B
Swift

//
// CurrenciesRequest.swift
// Multisig
//
// Created by Mouaz on 8/1/23.
// Copyright © 2023 Gnosis Ltd. All rights reserved.
//
import Foundation
struct CurrenciesRequest: JSONRequest {
var httpMethod: String { "GET" }
var urlPath: String {
"/v3/currencies"
}
var query: String? {
"apiKey=\(App.configuration.protected[.MOONPAY_API_KEY])"
}
typealias ResponseType = [MoonpayModels.Currency]
}
extension MoonpayService {
@discardableResult
func asyncCurrenciesRequest(completion: @escaping (Result<CurrenciesRequest.ResponseType, Error>) -> Void) -> URLSessionTask? {
asyncExecute(request: CurrenciesRequest(), completion: completion)
}
func syncCurrenciesRequest() throws -> [MoonpayModels.Currency] {
try execute(request: CurrenciesRequest())
}
}