Index: components/payments/payment_details_validation.cc |
diff --git a/components/payments/payment_details_validation.cc b/components/payments/payment_details_validation.cc |
index 81c42cdbb4924298c0e2f32f831986b48a999677..5fce52febfc8f32b98308cd7a6c3eae4601c19d2 100644 |
--- a/components/payments/payment_details_validation.cc |
+++ b/components/payments/payment_details_validation.cc |
@@ -44,16 +44,13 @@ bool validateShippingOptionOrPaymentItem( |
return false; |
} |
- if (item->amount->currency_system.has_value() && |
- item->amount->currency_system.value().empty()) { |
+ if (item->amount->currency_system.empty()) { |
*error_message = "Currency system can't be empty"; |
return false; |
} |
if (!payments::PaymentsValidators::isValidCurrencyCodeFormat( |
- item->amount->currency, item->amount->currency_system.has_value() |
- ? item->amount->currency_system.value() |
- : "", |
+ item->amount->currency, item->amount->currency_system, |
error_message)) { |
return false; |
} |