Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #8462: Custom Networks list not updated when opened via browser s…
Browse files Browse the repository at this point in the history
…ettings (#8464)

Update chain list when custom networks list is opened to handle case when opened via browser settings.
  • Loading branch information
StephenHeaps authored Nov 27, 2023
1 parent 93406c3 commit e9ad206
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/BraveWallet/Crypto/Stores/NetworkStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public class NetworkStore: ObservableObject, WalletObserverStore {
self.isSwapSupported = await swapService.isSwapSupported(chain.chainId)
}

@MainActor private func updateChainList() async {
@MainActor func updateChainList() async {
// fetch all networks for all coin types
self.allChains = await rpcService.allNetworksForSupportedCoins(respectTestnetPreference: false)

Expand Down
3 changes: 3 additions & 0 deletions Sources/BraveWallet/Settings/CustomNetworkListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ struct CustomNetworkListView: View {
}
.navigationViewStyle(StackNavigationViewStyle())
}
.task {
await networkStore.updateChainList()
}
}
}

Expand Down

0 comments on commit e9ad206

Please sign in to comment.