mirror of
https://github.com/lil-org/wallet.git
synced 2024-12-28 23:14:11 +03:00
pin some networks
This commit is contained in:
parent
c6ef3e39ec
commit
748868b444
@ -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 }
|
||||
}()
|
||||
|
@ -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"
|
||||
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user