Skip to content

Commit

Permalink
fix: maxInsuranceValue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GravendeelJochem committed Jul 4, 2024
1 parent 0979cb4 commit 8e8d616
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/App/Order/Calculator/General/InsuranceCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ private function getMaxInsurance(CarrierSettings $carrierSettings, int $amount)
->getAllowedInsuranceAmounts();

$insuranceUpToKey = $this->getInsuranceUpToKey($this->order->shippingAddress->cc);
$maxInsuranceValue = $this->currencyService->convertToCents(
$carrierSettings->getAttribute($insuranceUpToKey) ?? 0
);
$maxInsuranceValue = $carrierSettings->getAttribute($insuranceUpToKey) ?? 0;

return min(
$this->getMinimumInsuranceAmount($allowedInsuranceAmounts, $amount),
Expand Down

0 comments on commit 8e8d616

Please sign in to comment.