mirror of
https://github.com/lil-org/tokenary.git
synced 2024-12-02 09:33:49 +03:00
Clarify behaviour on WC connection result
This commit is contained in:
parent
75e5ce7554
commit
c42d97b967
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user