trustwallet / trust-wallet-ios

:iphone: Trust - Ethereum Wallet and Web3 DApp Browser for iOS
https://trustwallet.com
GNU General Public License v3.0
1.54k stars 719 forks source link

remove redundant method #835

Closed aki-mizu closed 6 years ago

aki-mizu commented 6 years ago

This method is not being used anywhere. A possible leftover from previous refactoring?

vikmeup commented 6 years ago

@darlhz Do you have a script to run and see all unused variables and methods? Xcode not doing a great job on this

aki-mizu commented 6 years ago

@vikmeup the method name was changed to this one in a81afedfa36431352e3391d988b546633cf247a7 func tickers(with tokenPrices: [TokenPrice]) -> Promise<[CoinTicker]> No, I was just studying the code. I was also curious if there's any script can check that :)

vikmeup commented 6 years ago

@darlhz I will on check on this, I had 4 days long refactor 😄 trying to make tests happy

vikmeup commented 6 years ago

@darlhz this methods has been used by TokensViewModel

aki-mizu commented 6 years ago

@vikmeup Hi :) I'm sorry if I misunderstood the code. I rechecked the source code it seems the method used in TokensViewModel is in line 144 tokensNetwork.tickers(with: prices) which is a method defined in NetworkProtocol, but the method func tickers(with tokenPrices: [TokenPrice], completion: @escaping (_ tickers: [CoinTicker]?) -> Void) isn't defined in NetworkProtocol, instead tickers(with tokenPrices: [TokenPrice]) -> Promise<[CoinTicker]> is being defined and used. Could you please tell me which line the mentioned method is being used?

vikmeup commented 6 years ago

@darlhz you are right! merged that in