Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
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 {
      print(error!)
      return
    }
    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.7k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...