From 7c681bc9239f550796894d025a26005d772baa1a Mon Sep 17 00:00:00 2001 From: Ivan Grachev Date: Fri, 9 Jul 2021 20:13:59 +0300 Subject: [PATCH] Fix activating browser after connection --- Encrypted Ink/Agent.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Encrypted Ink/Agent.swift b/Encrypted Ink/Agent.swift index 1c430e7e..286907cc 100644 --- a/Encrypted Ink/Agent.swift +++ b/Encrypted Ink/Agent.swift @@ -250,10 +250,11 @@ class Agent: NSObject { private func connectWallet(session: WCSession, account: Account) { let windowController = Window.showNew() + let window = windowController.window windowController.contentViewController = WaitingViewController.withReason("Connecting") - WalletConnect.shared.connect(session: session, address: account.address) { [weak windowController] _ in - if windowController?.window?.isVisible == true { + WalletConnect.shared.connect(session: session, address: account.address) { [weak window] _ in + if window?.isVisible == true { Window.closeAllAndActivateBrowser() } }