Fixing completionHandler return type

pull/86/head
Oguzhan Gungor 7 years ago
parent ea4ab893ee
commit ed2dccafd6
  1. 8
      Trust/Tokens/Coordinators/ClaimOrderCoordinator.swift

@ -25,18 +25,18 @@ class ClaimOrderCoordinator {
v: UInt8,
r: String,
s: String,
completion: @escaping (Any) -> Void//Result<Void, AnyError>) -> Void
) {
completion: @escaping (Result<Any, AnyError>) -> Void
) {
let request = ClaimStormBirdOrder(expiry: expiry, indices: indices, v: v, r: r, s: s)
web3.request(request: request) { result in
switch result {
//TODO handle cases for UI
case .success(let res):
print(res)
completion(res)
completion(.success(res))
case .failure(let err):
print(err)
completion(err)
completion(.failure(AnyError(err)))
}
}
}

Loading…
Cancel
Save