[#614] Fix error handling when calling wipe (#615)

Closes #614
This commit is contained in:
Michal Fousek 2023-03-03 18:58:25 +01:00 committed by GitHub
parent 5d64d0b064
commit 11e8e5c7b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -253,11 +253,10 @@ extension RootReducer {
return EffectTask(value: .nukeWalletFailed)
}
return wipePublisher
.catchToEffect()
.receive(on: mainQueue)
.replaceEmpty(with: .success(Void()))
.replaceEmpty(with: Void())
.map { _ in return RootReducer.Action.nukeWalletSucceeded }
.replaceError(with: RootReducer.Action.nukeWalletFailed)
.receive(on: mainQueue)
.eraseToEffect()
.cancellable(id: SynchronizerCancelId.self, cancelInFlight: true)