The current account disabling flow uses state.client.id while calling repository.blockAccount(state.client.id). However, blocking an account should require the actual account ID instead of the client ID.
Current Code:
private fun handleDisableAccount() {
mutableStateFlow.update {
it.copy(dialogState = DialogState.Loading)
}
// TODO:: this shouldn't work, we need account id to block account
viewModelScope.launch {
val result = repository.blockAccount(state.client.id)
sendAction(DisableAccountResult(result))
}
}
Suggested Fix
Update the disable account implementation to use the appropriate account identifier instead of the client ID. Also verify related API/request models if needed.
The current account disabling flow uses
state.client.idwhile callingrepository.blockAccount(state.client.id). However, blocking an account should require the actual account ID instead of the client ID.Current Code:
Suggested Fix
Update the disable account implementation to use the appropriate account identifier instead of the client ID. Also verify related API/request models if needed.