Skip to content
Merged
5 changes: 1 addition & 4 deletions app/controllers/idv/document_capture_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def show
end

def update
flow_session['redo_document_capture'] = nil # done with this redo
idv_session.redo_document_capture = nil # done with this redo
result = handle_stored_result
analytics.idv_doc_auth_document_capture_submitted(**result.to_h.merge(analytics_arguments))
Expand Down Expand Up @@ -56,7 +55,6 @@ def confirm_hybrid_handoff_complete
end

def confirm_document_capture_needed
return if flow_session['redo_document_capture']
return if idv_session.redo_document_capture

pii = flow_session['pii_from_doc'] # hash with indifferent access
Expand All @@ -76,8 +74,7 @@ def analytics_arguments
step: 'document_capture',
analytics_id: 'Doc Auth',
irs_reproofing: irs_reproofing?,
redo_document_capture:
idv_session.redo_document_capture || flow_session[:redo_document_capture],
redo_document_capture: idv_session.redo_document_capture,
}.compact.merge(ab_test_analytics_buckets)
end

Expand Down
1 change: 0 additions & 1 deletion app/controllers/idv/hybrid_handoff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ def confirm_hybrid_handoff_needed
end

def setup_for_redo
flow_session[:redo_document_capture] = true
idv_session.redo_document_capture = true

# If we previously skipped hybrid handoff for the user (because they're on a mobile
Expand Down
3 changes: 0 additions & 3 deletions app/controllers/idv/in_person/verify_info_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ def update
success = shared_update

if success
# Mark the FSM verify step completed. This is for the 50/50 state
flow_session['Idv::Steps::InPerson::VerifyStep'] = true

redirect_to idv_in_person_verify_info_url
end
end
Expand Down
1 change: 0 additions & 1 deletion app/controllers/idv/link_sent_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def confirm_hybrid_handoff_complete
end

def confirm_document_capture_needed
return if flow_session['redo_document_capture']
return if idv_session.redo_document_capture

pii = flow_session['pii_from_doc'] # hash with indifferent access
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/idv/verify_info_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def update

if success
# Don't allow the user to go back to document capture after verifying
if flow_session['redo_document_capture'] || idv_session.redo_document_capture
flow_session.delete('redo_document_capture')
if idv_session.redo_document_capture
idv_session.redo_document_capture = nil
idv_session.flow_path ||= 'standard'
end
Expand Down
11 changes: 1 addition & 10 deletions spec/controllers/idv/document_capture_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,7 @@
end

context 'redo_document_capture' do
it 'adds redo_document_capture to analytics using flow_session' do
flow_session[:redo_document_capture] = true

get :show

analytics_args[:redo_document_capture] = true
expect(@analytics).to have_logged_event(analytics_name, analytics_args)
end

it 'adds redo_document_capture to analytics using idv_session' do
it 'adds redo_document_capture to analytics' do
subject.idv_session.redo_document_capture = true

get :show
Expand Down
1 change: 0 additions & 1 deletion spec/controllers/idv/link_sent_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
user: user,
cancelled_at: session_canceled_at,
)
flow_session['document_capture_session_uuid'] = document_capture_session.uuid
allow(document_capture_session).to receive(:load_result).and_return(load_result)
allow(subject).to receive(:document_capture_session).and_return(document_capture_session)
end
Expand Down