We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79a8c22 commit 794ae58Copy full SHA for 794ae58
src/Forex.php
@@ -112,11 +112,13 @@ public function convert(
112
113
$currency = is_string($currency) ? $currency : $currency->getCurrencyCode();
114
115
- if ($money->getCurrency()->is($currency)) {
+ $sourceCurrency = $money->getCurrency()->getCurrencyCode();
116
+
117
+ if ($sourceCurrency === $currency) {
118
return $money;
119
}
120
- $rates = $date ? $this->rates($date, $currency) : $this->latest($currency);
121
+ $rates = $date ? $this->rates($date, $sourceCurrency) : $this->latest($sourceCurrency);
122
123
$provider = new BaseCurrencyProvider(
124
provider: (new ConfigurableProvider)->setExchangeRate(
0 commit comments