Refactoring [skip ci]

This commit is contained in:
Ali
2021-07-05 00:48:11 +04:00
parent 58217226c0
commit 4893e41de2
56 changed files with 783 additions and 840 deletions

View File

@@ -274,7 +274,7 @@ func createPasswordController(context: AccountContext, createPasswordContext: Cr
state.saving = true
return state
}
saveDisposable.set((updateTwoStepVerificationPassword(network: context.account.network, currentPassword: currentPassword, updatedPassword: .password(password: state.passwordText, hint: state.hintText, email: email))
saveDisposable.set((context.engine.auth.updateTwoStepVerificationPassword(currentPassword: currentPassword, updatedPassword: .password(password: state.passwordText, hint: state.hintText, email: email))
|> deliverOnMainQueue).start(next: { update in
switch update {
case .none:
@@ -356,7 +356,7 @@ func createPasswordController(context: AccountContext, createPasswordContext: Cr
return state
}
saveDisposable.set((updateTwoStepVerificationPassword(network: context.account.network, currentPassword: currentPassword, updatedPassword: .none)
saveDisposable.set((context.engine.auth.updateTwoStepVerificationPassword(currentPassword: currentPassword, updatedPassword: .none)
|> deliverOnMainQueue).start(next: { _ in
updateState { state in
var state = state