diff --git a/Shared/Ethereum/Networks.swift b/Shared/Ethereum/Networks.swift index f203003b..03642b06 100644 --- a/Shared/Ethereum/Networks.swift +++ b/Shared/Ethereum/Networks.swift @@ -18,6 +18,10 @@ struct Networks { return allBundledDict[id] } + static let pinned: [EthereumNetwork] = { + return [1, 7777777, 10, 8453, 42161].compactMap { Networks.withChainId($0) } + }() + static let allMainnets: [EthereumNetwork] = { return allBundled.filter { !$0.isTestnet } }() diff --git a/Shared/Strings.swift b/Shared/Strings.swift index 57bcd108..dc860b4b 100644 --- a/Shared/Strings.swift +++ b/Shared/Strings.swift @@ -96,5 +96,6 @@ struct Strings { static let pleaseGetANewOne = "please get a new one" static let notNow = "not now" static let done = "Done" + static let pinned = "Pinned" } diff --git a/Shared/Views/NetworksListView.swift b/Shared/Views/NetworksListView.swift index 9178fca0..8a333dad 100644 --- a/Shared/Views/NetworksListView.swift +++ b/Shared/Views/NetworksListView.swift @@ -6,6 +6,7 @@ struct NetworksListView: View { private let mainnets = Networks.allMainnets private let testnets = Networks.allTestnets + private let pinned = Networks.pinned @Environment(\.presentationMode) var presentationMode @State private var selectedChainId: Int? @@ -16,6 +17,7 @@ struct NetworksListView: View { NavigationView { VStack { List { + networkSection(networks: pinned, title: Strings.pinned) networkSection(networks: mainnets) networkSection(networks: testnets, title: Strings.testnets) }