blockchainethereumblockchain-walleterc20erc721walletxdaidappdecentralizederc1155erc875iosswifttokens
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
834 B
25 lines
834 B
// Copyright SIX DAY LLC. All rights reserved.
|
|
|
|
import Alamofire
|
|
import Foundation
|
|
import Moya
|
|
|
|
struct TrustProviderFactory {
|
|
static let policies: [String: ServerTrustPolicy] = [
|
|
:
|
|
// Disabled until: https://github.com/TrustWallet/trust-wallet-ios/pull/129#issuecomment-353718512
|
|
// "trustwalletapp.com": .pinPublicKeys(
|
|
// publicKeys: ServerTrustPolicy.publicKeys(in: Bundle.main),
|
|
// validateCertificateChain: true,
|
|
// validateHost: true
|
|
// ),
|
|
]
|
|
|
|
static func makeProvider() -> MoyaProvider<TrustService> {
|
|
let manager = Manager(
|
|
configuration: URLSessionConfiguration.default,
|
|
serverTrustPolicyManager: ServerTrustPolicyManager(policies: policies)
|
|
)
|
|
return MoyaProvider<TrustService>(manager: manager)
|
|
}
|
|
}
|
|
|