FX Modul
All checks were successful
Deploy / deploy-staging (push) Successful in 7s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-29 00:46:40 +02:00
parent 8140f1e1b1
commit 1dd74d4674
10 changed files with 1428 additions and 2 deletions

View File

@@ -224,6 +224,13 @@ $mm->registerFunction($moduleName, 'ensure_schema', function () use ($moduleName
});
$mm->registerFunction($moduleName, 'fx_service', static function (): ?object {
if (modules()->isEnabled('fx-rates') && modules()->hasFunction('fx-rates', 'service')) {
try {
return module_fn('fx-rates', 'service');
} catch (\Throwable) {
}
}
if (!is_dir(dirname(__DIR__) . '/mining-checker')) {
return null;
}
@@ -256,7 +263,7 @@ $mm->registerFunction($moduleName, 'fx_refresh', static function (string $baseCu
if (!$service || !method_exists($service, 'ensureFreshLatestRates')) {
return [
'ok' => false,
'message' => 'Mining-Checker FX-Service ist aktuell nicht verfuegbar.',
'message' => 'FX-Service ist aktuell nicht verfuegbar.',
];
}
@@ -266,7 +273,7 @@ $mm->registerFunction($moduleName, 'fx_refresh', static function (string $baseCu
'ok' => true,
'message' => !empty($result['reused'])
? 'Vorhandene FX-Daten weiterverwendet.'
: 'FX-Daten aus dem Mining-Checker aktualisiert.',
: 'FX-Daten aktualisiert.',
'result' => $result,
];
} catch (\Throwable $e) {