essentiaone / essentia-bridges-api-ios

Bridges API wrapper for iOS application.
MIT License
10 stars 4 forks source link

EtherScanInfo should have a public initializer #27

Closed mousehaohao closed 5 years ago

mousehaohao commented 5 years ago

Hi Team, when I use this pod library, the default initializer is not work for etherscaninfo, the error message is "'EtherScanInfo' initializer is inaccessible due to 'internal' protection level". so I think it should be have a public initializer for this class. this code seems works:

public struct EtherScanInfo {
    public init(url: String, apiKey: String) {
        self.url = url
        self.apiKey = apiKey
    }
    public let url: String
    public let apiKey: String
}
impul commented 5 years ago

Hi, @mousehaohao. You are right. I will fix this asap. For now you can use CryptoWallet class Example:

let cryptoWallet = CryptoWallet(
            bridgeApiUr: bridgeUrl,
            etherScanApiKey: apiKey)

And then you will be able to use

cryptoWallet.ethereum
impul commented 5 years ago

@mousehaohao, fixed at 0.4.5