From 49fc3745a6c952794133a2377e24b5992c0b78db Mon Sep 17 00:00:00 2001 From: Ivan Grachev Date: Thu, 25 Aug 2022 22:12:48 +0300 Subject: [PATCH] Suggest adding an account on macOS when there are no matching --- Tokenary macOS/Screens/AccountsListViewController.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tokenary macOS/Screens/AccountsListViewController.swift b/Tokenary macOS/Screens/AccountsListViewController.swift index 957fcbd5..5d0e0a9a 100644 --- a/Tokenary macOS/Screens/AccountsListViewController.swift +++ b/Tokenary macOS/Screens/AccountsListViewController.swift @@ -10,6 +10,7 @@ class AccountsListViewController: NSViewController { private var cellModels = [CellModel]() private var network = EthereumChain.ethereum private var didCallCompletion = false + private var didAppear = false var selectAccountAction: SelectAccountAction? var newWalletId: String? var getBackToRect: CGRect? @@ -95,6 +96,13 @@ class AccountsListViewController: NSViewController { blinkNewWalletCellIfNeeded() view.window?.delegate = self promptSafariForLegacyUsersIfNeeded() + + if !didAppear { + didAppear = true + if let coin = selectAccountAction?.coinType, walletsManager.suggestedAccounts(coin: coin).isEmpty, !wallets.isEmpty { + Alert.showWithMessage(String(format: Strings.addAccountToConnect, arguments: [coin.name]), style: .informational) + } + } } private func promptSafariForLegacyUsersIfNeeded() {