Skip to content

Commit

Permalink
Remove superfluous check
Browse files Browse the repository at this point in the history
  • Loading branch information
brorbw committed Feb 2, 2024
1 parent ee71803 commit a2bd9db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/aliquot/validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ class EncryptedMessageContract < Dry::Validation::Contract
end

rule(:paymentMethod) do
if values[:paymentMethodDetails] && values[:paymentMethodDetails].is_a?(Hash)
if '3DS'.eql?(values[:paymentMethodDetails] && values[:paymentMethodDetails]['authMethod']) # Tokenized ECv1
if values[:paymentMethodDetails].is_a?(Hash)
if '3DS'.eql?(values[:paymentMethodDetails]['authMethod']) # Tokenized ECv1
key.failure('must be equal to TOKENIZED_CARD') unless value == 'TOKENIZED_CARD'
else
key.failure('must be equal to CARD') unless value == 'CARD'
Expand Down

0 comments on commit a2bd9db

Please sign in to comment.