mirror of
https://github.com/luxfi/safe-ios.git
synced 2026-10-30 15:19:20 +00:00
- 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
35 lines
840 B
Swift
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())
|
|
}
|
|
}
|