Skip to content

Commit

Permalink
[APP-792] Timing fix with bep3 (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwonhyukjoon authored Jul 17, 2023
1 parent 4be6d2e commit ce7fba1
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class HtlcResultViewController: BaseViewController, UITableViewDelegate, UITable
}
}

var mTxFetchCnt = 2
func onUpdateView(_ errorMSg: String) {
self.loadingLayer.isHidden = false
if (!errorMSg.isEmpty) {
Expand Down Expand Up @@ -422,7 +421,9 @@ class HtlcResultViewController: BaseViewController, UITableViewDelegate, UITable
}
return
}
self.onCheckClaimHtlcSwap()
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(6000), execute: {
self.onCheckClaimHtlcSwap()
})

case .failure(let error):
print("onFetchSwapId failure", error , " ", self.mSwapFetchCnt)
Expand Down Expand Up @@ -565,7 +566,9 @@ class HtlcResultViewController: BaseViewController, UITableViewDelegate, UITable
let channel = BaseNetWork.getConnection(htlcToChainConfig)!
let req = Cosmos_Base_Tendermint_V1beta1_GetNodeInfoRequest()
if let response = try? Cosmos_Base_Tendermint_V1beta1_ServiceClient(channel: channel).getNodeInfo(req, callOptions: BaseNetWork.getCallOptions()).response.wait() {
self.onClaimHtlcSwapKava2(auth, response.defaultNodeInfo.network)
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(6000), execute: {
self.onClaimHtlcSwapKava2(auth, response.defaultNodeInfo.network)
})
}
try channel.close().wait()

Expand Down

0 comments on commit ce7fba1

Please sign in to comment.