mirror of
https://github.com/lil-org/wallet.git
synced 2025-01-04 02:24:39 +03:00
Do not show Ethereum networks list on Solana and NEAR account requests on iOS
This commit is contained in:
parent
a07ade8d9d
commit
c0cfc976e4
@ -91,5 +91,6 @@ struct Strings {
|
||||
static let disconnect = "Disconnect"
|
||||
static let switchAccount = "Switch Account"
|
||||
static let switchAccountTwoLines = "Switch\nAccount"
|
||||
static let unknownNetwork = "Unknown network ⚠️"
|
||||
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ class AccountsListViewController: UIViewController, DataStateContainer {
|
||||
}
|
||||
updatePrimaryButton()
|
||||
|
||||
if let network = selectAccountAction.network, self.network != network {
|
||||
if let network = selectAccountAction.initialNetwork, self.network != network {
|
||||
selectNetwork(network)
|
||||
}
|
||||
|
||||
@ -261,6 +261,15 @@ class AccountsListViewController: UIViewController, DataStateContainer {
|
||||
}
|
||||
|
||||
@IBAction func networkButtonTapped(_ sender: Any) {
|
||||
guard selectAccountAction?.coinType == nil || selectAccountAction?.coinType == .ethereum else {
|
||||
let networkName = selectAccountAction?.coinType?.name ?? Strings.unknownNetwork
|
||||
let alert = UIAlertController(title: networkName, message: nil, preferredStyle: .alert)
|
||||
let okAction = UIAlertAction(title: Strings.ok, style: .default)
|
||||
alert.addAction(okAction)
|
||||
present(alert, animated: true)
|
||||
return
|
||||
}
|
||||
|
||||
let actionSheet = UIAlertController(title: Strings.selectNetwork, message: nil, preferredStyle: .actionSheet)
|
||||
actionSheet.popoverPresentationController?.sourceView = networkButton
|
||||
for network in EthereumChain.allMainnets {
|
||||
|
Loading…
Reference in New Issue
Block a user