Fix: Add / Hide Tokens crash #5291

pull/5292/head
Hwee-Boon Yar 2 years ago
parent 53cd15879a
commit b83dc725ce
  1. 2
      Podfile.lock
  2. 1
      modules/AlphaWalletFoundation/AlphaWalletFoundation.podspec
  3. 2
      modules/AlphaWalletFoundation/AlphaWalletFoundation/Core/Tokens/PopularTokens/PopularTokensCollection.swift

@ -307,7 +307,7 @@ SPEC CHECKSUMS:
AlphaWalletAddress: 62a69f5ccc7d6d17abf878c4274f4c3d5fdc97ba
AlphaWalletCore: 451c8a4dfdba1d3b59a3ac47bf0dcabcf1f4c049
AlphaWalletENS: a93a871ad5d8a8c78cd87b60eb59fccf4b23e841
AlphaWalletFoundation: 0a4febb19ae6231165d4a2d432161529de3a27be
AlphaWalletFoundation: 53981b803199dd6d0537cbc341772c68a260105c
AlphaWalletGoBack: 935efdbd98fa80039f2a350cde5b3a50cea46564
AlphaWalletOpenSea: 11ccb06ae0200dadc2b3f7c3e223f407ac3a22b4
AlphaWalletWeb3Provider: 7ca1e1c1dc841dc1915f970daace48bf34931655

@ -19,6 +19,7 @@ Pod::Spec.new do |spec|
spec.platform = :ios, "13.0"
spec.source = { :git => 'git@github.com:AlphaWallet/alpha-wallet-ios.git', :tag => "#{spec.version}" }
spec.source_files = 'AlphaWalletFoundation/**/*.{h,m,swift}'
spec.resources = ['AlphaWalletFoundation/Core/Tokens/PopularTokens/known_contract.json']
spec.pod_target_xcconfig = { 'SWIFT_OPTIMIZATION_LEVEL' => '-Owholemodule' }
spec.dependency 'BigInt', '~> 3.1'

@ -94,7 +94,7 @@ public class PopularTokensCollection: NSObject, PopularTokensCollectionType {
}
public class LocalPopularTokensCollection: NSObject, PopularTokensCollectionType {
private let tokensURL: URL = URL(fileURLWithPath: Bundle.main.path(forResource: "known_contract", ofType: "json")!)
lazy private var tokensURL: URL = URL(fileURLWithPath: Bundle(for: self.classForCoder).path(forResource: "known_contract", ofType: "json")!)
private let queue = DispatchQueue.global()
private static var tokens: [PopularToken]? = .none

Loading…
Cancel
Save