Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions app/controllers/idv/cancellations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ def reset_doc_auth
end

def cancel_document_capture_session
# Goal: reset the Idv::Steps::LinkSentStep but we don't have access to the
# flow_session from here (because this is the mobile session and that is only
# on the desktop session)
document_capture_session&.update(cancelled_at: Time.zone.now)
end

Expand Down
2 changes: 1 addition & 1 deletion app/services/idv/steps/link_sent_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def handle_document_verification_failure(get_results_response)
end

def render_document_capture_cancelled
failure(I18n.t('errors.doc_auth.document_capture_cancelled'))
mark_steps_incomplete
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arguably we could remove link_sent from HYBRID_FLOW_STEPS since it's not having any effect here anyways, but I don't think it hurts anything to keep.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! I have no desire to touch this code any more than is absolutely needed, gonna leave as-is for now

redirect_to idv_url
failure(I18n.t('errors.doc_auth.document_capture_cancelled'))
end

def render_step_incomplete_error
Expand Down
4 changes: 0 additions & 4 deletions app/services/idv/steps/send_link_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ def formatted_destination_phone

def update_document_capture_session_requested_at(session_uuid)
document_capture_session = DocumentCaptureSession.find_by(uuid: session_uuid)
if document_capture_session.cancelled_at
# See note at CancellationsController#cancel_document_capture_session
flow_session.delete(Idv::Steps::LinkSentStep.name)
end
return unless document_capture_session
document_capture_session.update!(
requested_at: Time.zone.now,
Expand Down