Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Blockchain by (4.1k points)

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 {
    let conv = Double.init(result!) / Double(10000000000000000)

    DispatchQueue.main.async {
      self.showCount.text = conv.description
} catch {
  print("error, no count")

1 Answer

0 votes
by (14.4k points)

You are getting nil values because the network codes are syncing. 

Fix that and your code will work just fine. 

Related questions

0 votes
1 answer
asked Jul 18, 2019 in Blockchain by Abhishek_31 (12.8k points)
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94k users

Browse Categories