title

asf
mail@pastecode.io avatar
unknown
php
2 years ago
333 B
4
Indexable
private function getEurRate(string $coin): Amount
{
    /** @var ExchangeService $exchange */
    $exchange = app(ExchangeService::class);

    return Amount::fromString(
        $exchange->getFiatRatesCollectionForTransaction($coin)->get(CurrencyCode::EUR),
        CurrencyCode::EUR
    )->scaleTo(self::FIAT_PRECISION);
}