Clarify behaviour on WC connection result

This commit is contained in:
Ivan Grachev 2021-07-09 20:04:26 +03:00
parent 75e5ce7554
commit c42d97b967

View File

@ -249,16 +249,14 @@ class Agent: NSObject {
}
private func connectWallet(session: WCSession, account: Account) {
WalletConnect.shared.connect(session: session, address: account.address) { [weak self] connected in
if connected {
Window.closeAllAndActivateBrowser()
} else {
self?.showErrorMessage("Failed to connect")
}
}
let windowController = Window.showNew()
windowController.contentViewController = WaitingViewController.withReason("Connecting")
WalletConnect.shared.connect(session: session, address: account.address) { [weak windowController] _ in
if windowController?.window?.isVisible == true {
Window.closeAllAndActivateBrowser()
}
}
}
}