     func txDeleted(_ txHash: UInt256, notifyUser: Bool, recommendRescan: Bool) {
         if notifyUser {
             if recommendRescan {
-                Store.perform(action: WalletChange(self.currency).setRecommendScan(recommendRescan))
-            }
-        }
-        requestTxUpdate()
+                DispatchQueue.main.async { [weak self] in
+                    guard let myself = self else { return }
+                    Store.perform(action: WalletChange(myself.currency).setRecommendScan(recommendRescan)) }
+            }
+        }
+        DispatchQueue.main.async { [weak self] in
+            self?.requestTxUpdate()
+        }
         db?.txDeleted(txHash, notifyUser: notifyUser, recommendRescan: true)
     }
 

    }

    func txStatusUpdate() {
        requestTxUpdate()
    }

    func saveBlocks(_ replace: Bool, _ blocks: [BRBlockRef?]) {

    func syncStarted() {
        DispatchQueue.main.async() {
            self.db?.setDBFileAttributes()
            //endBackgroundTask()
            //startBackgroundTask()
            self.progressTimer = Timer.scheduledTimer(timeInterval: self.progressUpdateInterval, target: self, selector: #selector(self.updateProgress), userInfo: nil, repeats: true)
