diff --git a/AlphaWallet/AssetDefinition/AssetDefinitionBackingStore.swift b/AlphaWallet/AssetDefinition/AssetDefinitionBackingStore.swift index 2bddea297..d82d33095 100644 --- a/AlphaWallet/AssetDefinition/AssetDefinitionBackingStore.swift +++ b/AlphaWallet/AssetDefinition/AssetDefinitionBackingStore.swift @@ -6,7 +6,7 @@ protocol AssetDefinitionBackingStore { var delegate: AssetDefinitionBackingStoreDelegate? { get set } subscript(contract: String) -> String? { get set } - func lastModifiedDataOfCachedAssetDefinitionFile(forContract contract: String) -> Date? + func lastModifiedDateOfCachedAssetDefinitionFile(forContract contract: String) -> Date? func forEachContractWithXML(_ body: (String) -> Void) func isOfficial(contract: String) -> Bool } diff --git a/AlphaWallet/AssetDefinition/AssetDefinitionDiskBackingStore.swift b/AlphaWallet/AssetDefinition/AssetDefinitionDiskBackingStore.swift index 6a950d3a6..8473e7843 100644 --- a/AlphaWallet/AssetDefinition/AssetDefinitionDiskBackingStore.swift +++ b/AlphaWallet/AssetDefinition/AssetDefinitionDiskBackingStore.swift @@ -58,7 +58,7 @@ class AssetDefinitionDiskBackingStore: AssetDefinitionBackingStore { return isOfficial } - func lastModifiedDataOfCachedAssetDefinitionFile(forContract contract: String) -> Date? { + func lastModifiedDateOfCachedAssetDefinitionFile(forContract contract: String) -> Date? { let path = localURLOfXML(for: contract) guard let lastModified = try? path.resourceValues(forKeys: [.contentModificationDateKey]) else { return nil diff --git a/AlphaWallet/AssetDefinition/AssetDefinitionDiskBackingStoreWithOverrides.swift b/AlphaWallet/AssetDefinition/AssetDefinitionDiskBackingStoreWithOverrides.swift index 6440722fe..8bfef323c 100644 --- a/AlphaWallet/AssetDefinition/AssetDefinitionDiskBackingStoreWithOverrides.swift +++ b/AlphaWallet/AssetDefinition/AssetDefinitionDiskBackingStoreWithOverrides.swift @@ -35,9 +35,9 @@ class AssetDefinitionDiskBackingStoreWithOverrides: AssetDefinitionBackingStore return officialStore.isOfficial(contract: contract) } - func lastModifiedDataOfCachedAssetDefinitionFile(forContract contract: String) -> Date? { + func lastModifiedDateOfCachedAssetDefinitionFile(forContract contract: String) -> Date? { //Even with an override, we just want to fetch the latest official version. Doesn't imply we'll use the official version - return officialStore.lastModifiedDataOfCachedAssetDefinitionFile(forContract: contract) + return officialStore.lastModifiedDateOfCachedAssetDefinitionFile(forContract: contract) } func forEachContractWithXML(_ body: (String) -> Void) { diff --git a/AlphaWallet/AssetDefinition/AssetDefinitionInMemoryBackingStore.swift b/AlphaWallet/AssetDefinition/AssetDefinitionInMemoryBackingStore.swift index dde2f9501..ec72a91a7 100644 --- a/AlphaWallet/AssetDefinition/AssetDefinitionInMemoryBackingStore.swift +++ b/AlphaWallet/AssetDefinition/AssetDefinitionInMemoryBackingStore.swift @@ -16,7 +16,7 @@ class AssetDefinitionInMemoryBackingStore: AssetDefinitionBackingStore { } } - func lastModifiedDataOfCachedAssetDefinitionFile(forContract contract: String) -> Date? { + func lastModifiedDateOfCachedAssetDefinitionFile(forContract contract: String) -> Date? { return nil } diff --git a/AlphaWallet/AssetDefinition/AssetDefinitionStore.swift b/AlphaWallet/AssetDefinition/AssetDefinitionStore.swift index 5a8c5e061..717207997 100644 --- a/AlphaWallet/AssetDefinition/AssetDefinitionStore.swift +++ b/AlphaWallet/AssetDefinition/AssetDefinitionStore.swift @@ -107,13 +107,13 @@ class AssetDefinitionStore { return URL(string: Constants.repoServer)?.appendingPathComponent(name) } - private func lastModifiedDataOfCachedAssetDefinitionFile(forContract contract: String) -> Date? { - return backingStore.lastModifiedDataOfCachedAssetDefinitionFile(forContract: contract) + private func lastModifiedDateOfCachedAssetDefinitionFile(forContract contract: String) -> Date? { + return backingStore.lastModifiedDateOfCachedAssetDefinitionFile(forContract: contract) } private func httpHeadersWithLastModifiedTimestamp(forContract contract: String) -> HTTPHeaders { var result = httpHeaders - if let lastModified = lastModifiedDataOfCachedAssetDefinitionFile(forContract: contract) { + if let lastModified = lastModifiedDateOfCachedAssetDefinitionFile(forContract: contract) { result["IF-Modified-Since"] = string(fromLastModifiedDate: lastModified) return result } else {