Merge pull request #852 from AlphaWallet/remove-build-warnings

Remove build warnings
pull/859/head
James Sangalli 6 years ago committed by GitHub
commit 7f3e894831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      AlphaWallet/AppCoordinator.swift
  2. 2
      AlphaWallet/AssetDefinition/AssetDefinitionDiskBackingStore.swift
  3. 2
      AlphaWallet/AssetDefinition/Coordinators/AssetDefinitionStoreCoordinator.swift
  4. 2
      AlphaWallet/EtherClient/OpenSea.swift
  5. 2
      AlphaWallet/Market/Coordinators/UniversalLinkCoordinator.swift
  6. 2
      AlphaWallet/Tokens/Coordinators/TokensCoordinator.swift
  7. 4
      AlphaWallet/Tokens/Types/TokensDataStore.swift
  8. 2
      AlphaWallet/Tokens/ViewControllers/TokensViewController.swift
  9. 2
      AlphaWallet/Tokens/ViewModels/OpenSea/OpenSeaNonFungibleTokenDisplayHelper.swift
  10. 2
      AlphaWallet/Transfer/ViewControllers/RequestViewController.swift
  11. 2
      AlphaWallet/Transfer/ViewControllers/SendViewController.swift
  12. 2
      AlphaWallet/Transfer/ViewModels/ConfirmSignMessageViewControllerViewModel.swift

@ -163,7 +163,7 @@ class AppCoordinator: NSObject, Coordinator {
WalletCoordinator(keystore: keystore).createInitialWallet() WalletCoordinator(keystore: keystore).createInitialWallet()
} }
func handleUniversalLink(url: URL) -> Bool { @discardableResult func handleUniversalLink(url: URL) -> Bool {
createInitialWallet() createInitialWallet()
closeWelcomeWindow() closeWelcomeWindow()
guard let ethPrice = self.ethPrice, let ethBalance = self.ethBalance else { return false } guard let ethPrice = self.ethPrice, let ethBalance = self.ethBalance else { return false }

@ -83,7 +83,7 @@ class AssetDefinitionDiskBackingStore: AssetDefinitionBackingStore {
directoryWatcher = DirectoryContentsWatcher.Local(path: directory.path) directoryWatcher = DirectoryContentsWatcher.Local(path: directory.path)
do { do {
try directoryWatcher?.start { [weak self] results in try directoryWatcher?.start { [weak self] results in
guard let strongSelf = self else { return } guard self != nil else { return }
switch results { switch results {
case .noChanges: case .noChanges:
break break

@ -109,7 +109,7 @@ class AssetDefinitionStoreCoordinator: Coordinator {
directoryWatcher = DirectoryContentsWatcher.Local(path: directory.path) directoryWatcher = DirectoryContentsWatcher.Local(path: directory.path)
do { do {
try directoryWatcher?.start { [weak self] results in try directoryWatcher?.start { [weak self] results in
guard let strongSelf = self else { return } guard self != nil else { return }
switch results { switch results {
case .noChanges: case .noChanges:
break break

@ -72,7 +72,7 @@ class OpenSea {
headers: ["X-API-KEY": Constants.openseaAPIKEY] headers: ["X-API-KEY": Constants.openseaAPIKEY]
).responseJSON { response in ).responseJSON { response in
guard let data = response.data, let json = try? JSON(data: data) else { guard let data = response.data, let json = try? JSON(data: data) else {
completion(.failure(AnyError(OpenSeaError(localizedDescription: "Error calling \(Constants.openseaAPI) API: \(response.error)")))) completion(.failure(AnyError(OpenSeaError(localizedDescription: "Error calling \(Constants.openseaAPI) API: \(String(describing: response.error))"))))
return return
} }
DispatchQueue.global(qos: .userInitiated).async { DispatchQueue.global(qos: .userInitiated).async {

@ -395,7 +395,7 @@ class UniversalLinkCoordinator: Coordinator {
} }
} }
guard let vc = strongSelf.importTokenViewController, case .ready(var viewModel) = vc.state else { return } guard let vc = strongSelf.importTokenViewController, case .ready = vc.state else { return }
// TODO handle http response // TODO handle http response
print(result) print(result)
if successful { if successful {

@ -97,7 +97,7 @@ class TokensCoordinator: Coordinator {
let contractsToAdd = detectedContracts - alreadyAddedContracts - deletedContracts - hiddenContracts - delegateContracts let contractsToAdd = detectedContracts - alreadyAddedContracts - deletedContracts - hiddenContracts - delegateContracts
var contractsPulled = 0 var contractsPulled = 0
var hasRefreshedAfterAddingAllContracts = false var hasRefreshedAfterAddingAllContracts = false
DispatchQueue.global().async { [weak strongSelf] in DispatchQueue.global().async { [weak self] in
guard let strongSelf = self else { return } guard let strongSelf = self else { return }
for eachContract in contractsToAdd { for eachContract in contractsToAdd {
strongSelf.addToken(for: eachContract) { strongSelf.addToken(for: eachContract) {

@ -222,7 +222,7 @@ class TokensDataStore {
var knownToBeNotERC721 = false var knownToBeNotERC721 = false
var knownToBeNotERC875 = false var knownToBeNotERC875 = false
getIsERC875ContractCoordinator.getIsERC875Contract(for: address!) { [weak self] result in getIsERC875ContractCoordinator.getIsERC875Contract(for: address!) { [weak self] result in
guard let strongSelf = self else { return } guard self != nil else { return }
switch result { switch result {
case .success(let isERC875): case .success(let isERC875):
if isERC875 { if isERC875 {
@ -240,7 +240,7 @@ class TokensDataStore {
} }
getIsERC721ContractCoordinator.getIsERC721Contract(for: address!) { [weak self] result in getIsERC721ContractCoordinator.getIsERC721Contract(for: address!) { [weak self] result in
guard let strongSelf = self else { return } guard self != nil else { return }
switch result { switch result {
case .success(let isERC721): case .success(let isERC721):
if isERC721 { if isERC721 {

@ -144,7 +144,7 @@ class TokensViewController: UIViewController {
tableView.reloadData() tableView.reloadData()
} }
if viewModel.shouldShowCollectiblesCollectionView { if viewModel.shouldShowCollectiblesCollectionView {
var contractsForCollectibles = contractsForCollectiblesFromViewModel() let contractsForCollectibles = contractsForCollectiblesFromViewModel()
if contractsForCollectibles != currentCollectiblesContractsDisplayed { if contractsForCollectibles != currentCollectiblesContractsDisplayed {
currentCollectiblesContractsDisplayed = contractsForCollectibles currentCollectiblesContractsDisplayed = contractsForCollectibles
collectiblesCollectionView.reloadData() collectiblesCollectionView.reloadData()

@ -502,8 +502,6 @@ enum OpenSeaNonFungibleTokenDisplayHelper: String {
return "exp" return "exp"
case .bc: case .bc:
return "generation" return "generation"
case .bc:
return nil
case .cbt: case .cbt:
return "generation" return "generation"
case .ck: case .ck:

@ -155,7 +155,7 @@ class RequestViewController: UIViewController {
DispatchQueue.global(qos: .background).async { [weak self] in DispatchQueue.global(qos: .background).async { [weak self] in
guard let strongSelf = self else { return } guard let strongSelf = self else { return }
let image = strongSelf.generateQRCode(from: string) let image = strongSelf.generateQRCode(from: string)
DispatchQueue.main.async { [weak self] in DispatchQueue.main.async {
strongSelf.imageView.image = image strongSelf.imageView.image = image
} }
} }

@ -353,7 +353,7 @@ class SendViewController: UIViewController, CanScanQRCode, TokenVerifiableStatus
// EIP67 format not being used much yet, use hex value for now // EIP67 format not being used much yet, use hex value for now
// let string = "ethereum:\(account.address.address)?value=\(value)" // let string = "ethereum:\(account.address.address)?value=\(value)"
let image = strongSelf.generateQRCode(from: string) let image = strongSelf.generateQRCode(from: string)
DispatchQueue.main.async { [weak self] in DispatchQueue.main.async {
strongSelf.imageView.image = image strongSelf.imageView.image = image
} }
} }

@ -78,7 +78,7 @@ struct ConfirmSignMessageViewControllerViewModel {
return data.hexEncoded return data.hexEncoded
} }
return message return message
case .typedMessage(let (typedData)): case .typedMessage:
return nil return nil
} }
} }

Loading…
Cancel
Save