alpha-wallet-ios
alpha-wallet-ios copied to clipboard
Move logic out of coordinators so they are primarily navigation/glue code between screens
We have very fat coordinators.
Where possible, we should move logic out of coordinator, starting with those that can grouped together easily, eg. into something like AddCustomChain and supporting code in the same file.
Refactor bit by bit. Avoid huge PRs.
AssetDefinitionStoreCoordinatorDelegate is used for showing errors and adding new scripts. AssetDefinitionStoreCoordinator appears to be used mainly for importing scripts and not navigation.
PromptBackupCoordinator is used in AppCoordinator but is not stored in the coordinators variable. It's sort of left hanging there.
walletAddressesStore
.didRemoveWalletPublisher
.receive(on: RunLoop.main)
.sink { [weak self] account in
guard let `self` = self else { return }
self.config.deleteWalletName(forAccount: account.address)
PromptBackupCoordinator(keystore: self.keystore, wallet: account, config: self.config, analyticsCoordinator: self.analyticsService).deleteWallet()
TransactionsTracker.resetFetchingState(account: account, config: self.config)
Erc1155TokenIdsFetcher.deleteForWallet(account.address)
DatabaseMigration.removeRealmFiles(account: account)
self.legacyFileBasedKeystore.delete(wallet: account)
self.localStore.removeStore(forWallet: account)
}.store(in: &cancelable)
@eviltofu Would you help to update this list, with a short sentence and if there is one, link to the comment?
Refer to #6606