Back
I'm trying to get my AION balance using Pocket AION plugin in my iOS app, but I get "Query response is nil without errors". The code I have is
do { try? PocketAion.eth.getBalance(address: publicKey, subnetwork: "32", blockTag: BlockTag.init(block: .LATEST), handler: { (result, error) in if error != nil { print(error!) return } let conv = Double.init(result!) / Double(10000000000000000) DispatchQueue.main.async { self.showCount.text = conv.description } })} catch { print("error, no count")}
do { try? PocketAion.eth.getBalance(address: publicKey, subnetwork: "32", blockTag: BlockTag.init(block: .LATEST), handler: { (result, error) in if error != nil { print(error!) return } let conv = Double.init(result!) / Double(10000000000000000)
DispatchQueue.main.async { self.showCount.text = conv.description } })} catch { print("error, no count")}
You are getting nil values because the network codes are syncing.
Fix that and your code will work just fine.
30.9k questions
32.9k answers
500 comments
665 users