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
4 changes: 2 additions & 2 deletions app/jobs/resolution_proofing_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def perform(
encrypted_arguments:,
trace_id:,
should_proof_state_id:,
double_address_verification: false,
ipp_enrollment_in_progress: false,
double_address_verification: nil,
ipp_enrollment_in_progress: true,
user_id: nil,
threatmetrix_session_id: nil,
request_ip: nil,
Expand Down
4 changes: 2 additions & 2 deletions app/services/idv/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def proof_resolution(
user_id:,
threatmetrix_session_id:,
request_ip:,
ipp_enrollment_in_progress: false
ipp_enrollment_in_progress: true
)
document_capture_session.create_proofing_session

Expand All @@ -28,7 +28,7 @@ def proof_resolution(
user_id: user_id,
threatmetrix_session_id: threatmetrix_session_id,
request_ip: request_ip,
double_address_verification: ipp_enrollment_in_progress,
ipp_enrollment_in_progress: ipp_enrollment_in_progress,
}

if IdentityConfig.store.ruby_workers_idv_enabled
Expand Down
24 changes: 10 additions & 14 deletions app/services/proofing/resolution/progressive_proofer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ def initialize(instant_verify_ab_test_discriminator = nil)
end

# @param [Hash] applicant_pii keys are symbols and values are strings, confidential user info
# @param [Boolean] double_address_verification flag that indicates if user will have
# both state id address and current residential address verified. Note this value is here as
# a placeholder until it can be replaced with ipp_enrollment_in_progress in ticket LG-353:
# https://cm-jira.usa.gov/browse/LG-11353
# @param [Boolean] ipp_enrollment_in_progress flag that indicates if user will have
# both state id address and current residential address verified
# @param [String] request_ip IP address for request
Expand All @@ -28,13 +24,13 @@ def initialize(instant_verify_ab_test_discriminator = nil)
# @return [ResultAdjudicator] object which contains the logic to determine proofing's result
def proof(
applicant_pii:,
ipp_enrollment_in_progress:,
request_ip:,
should_proof_state_id:,
threatmetrix_session_id:,
timer:,
user_email:,
double_address_verification: false
double_address_verification: nil,
ipp_enrollment_in_progress: true
)
device_profiling_result = proof_with_threatmetrix_if_needed(
applicant_pii: applicant_pii,
Expand All @@ -52,7 +48,7 @@ def proof(
)

applicant_pii_transformed = applicant_pii.clone
if ipp_enrollment_in_progress || double_address_verification
if ipp_enrollment_in_progress
applicant_pii_transformed = with_state_id_address(applicant_pii_transformed)
end

Expand Down Expand Up @@ -115,19 +111,20 @@ def proof_with_threatmetrix_if_needed(
end
end

# rubocop:disable Lint/UnusedMethodArgument
def proof_residential_address_if_needed(
applicant_pii:,
timer:,
double_address_verification: false,
ipp_enrollment_in_progress: false
)
return residential_address_unnecessary_result unless
ipp_enrollment_in_progress || double_address_verification
return residential_address_unnecessary_result unless ipp_enrollment_in_progress

timer.time('residential address') do
resolution_proofer.proof(applicant_pii)
end
end
# rubocop:enable Lint/UnusedMethodArgument
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.

is the linter requiring this b/c the default value of ipp_enrollment_in_progress is now true?

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.

Actually no. It's required because we're passing in double_address_verification as an argument, but not using that value in the method.

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.

ahh ok thank you for clarifying that!


def residential_address_unnecessary_result
Proofing::Resolution::Result.new(
Expand All @@ -141,12 +138,12 @@ def resolution_cannot_pass
)
end

# rubocop:disable Lint/UnusedMethodArgument
def proof_id_address_with_lexis_nexis_if_needed(applicant_pii:, timer:,
residential_instant_verify_result:,
double_address_verification:,
ipp_enrollment_in_progress:)
if applicant_pii[:same_address_as_id] == 'true' &&
(ipp_enrollment_in_progress || double_address_verification)
if applicant_pii[:same_address_as_id] == 'true' && ipp_enrollment_in_progress
return residential_instant_verify_result
end
return resolution_cannot_pass unless residential_instant_verify_result.success?
Expand All @@ -163,14 +160,13 @@ def should_proof_state_id_with_aamva?(ipp_enrollment_in_progress:, same_address_
return false unless should_proof_state_id
# If the user is in double-address-verification and they have changed their address then
# they are not eligible for get-to-yes
# rubocop:disable Layout/LineLength
if !(ipp_enrollment_in_progress || double_address_verification) || same_address_as_id == 'true'
# rubocop:enable Layout/LineLength
if !ipp_enrollment_in_progress || same_address_as_id == 'true'
user_can_pass_after_state_id_check?(instant_verify_result)
else
residential_instant_verify_result.success?
end
end
# rubocop:enable Lint/UnusedMethodArgument

def proof_id_with_aamva_if_needed(
applicant_pii:, timer:,
Expand Down
4 changes: 2 additions & 2 deletions app/services/proofing/resolution/result_adjudicator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def initialize(
ipp_enrollment_in_progress:,
device_profiling_result:,
same_address_as_id:,
double_address_verification: false
double_address_verification: true
)
@resolution_result = resolution_result
@state_id_result = state_id_result
Expand Down Expand Up @@ -90,7 +90,7 @@ def device_profiling_result_and_reason

def resolution_result_and_reason
if !residential_resolution_result.success? && same_address_as_id == 'false' &&
(ipp_enrollment_in_progress || double_address_verification)
ipp_enrollment_in_progress
[false, :fail_resolution_skip_state_id]
elsif resolution_result.success? && state_id_result.success?
[true, :pass_resolution_and_state_id]
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/idv/verify_info_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
verified_attributes: [],
),
device_profiling_result: Proofing::DdpResult.new(success: true),
ipp_enrollment_in_progress: false,
ipp_enrollment_in_progress: true,
residential_resolution_result: Proofing::Resolution::Result.new(success: true),
resolution_result: Proofing::Resolution::Result.new(success: true),
same_address_as_id: true,
Expand Down