Avoid showing error messages for transactions

pull/2/head
Michael Scoff 7 years ago
parent af0aabe90b
commit 8947bd5439
  1. 2
      Trust/Accounts/Coordinators/AccountsCoordinator.swift
  2. 6
      Trust/Transactions/Coordinators/TransactionDataCoordinator.swift

@ -61,10 +61,10 @@ class AccountsCoordinator: Coordinator {
let controller = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
controller.popoverPresentationController?.sourceView = sender
controller.popoverPresentationController?.sourceRect = sender.centerRect
let actionTitle = NSLocalizedString("wallets.backup.alertSheet.title", value: "Backup Keystore", comment: "The title of the backup button in the wallet's action sheet")
switch account.type {
case .real(let account):
let actionTitle = NSLocalizedString("wallets.backup.alertSheet.title", value: "Backup Keystore", comment: "The title of the backup button in the wallet's action sheet")
let backupKeystoreAction = UIAlertAction(title: actionTitle, style: .default) { _ in
let coordinator = BackupCoordinator(
navigationController: self.navigationController,

@ -116,11 +116,13 @@ class TransactionDataCoordinator {
}
func handleError(error: Error) {
delegate?.didUpdate(result: .failure(TransactionError.failedToFetch))
//delegate?.didUpdate(result: .failure(TransactionError.failedToFetch))
// Avoid showing an error on failed request, instead show cached transactions.
handleUpdateItems()
}
func handleUpdateItems() {
delegate?.didUpdate(result: .success(self.storage.objects))
delegate?.didUpdate(result: .success(storage.objects))
}
func stop() {

Loading…
Cancel
Save