mempool weather added

This commit is contained in:
HolgerHatGarKeineNode
2023-03-31 16:08:31 +02:00
parent 7973a2032f
commit 7465fbd00a
3 changed files with 4 additions and 1 deletions

View File

@@ -46,5 +46,6 @@ class CacheRecommendedFees extends Command
]); ]);
cache()->put('mempool-weather', $result['choices'][0]['text'], now()->addMinutes(62)); cache()->put('mempool-weather', $result['choices'][0]['text'], now()->addMinutes(62));
cache()->put('mempool-weather-changed', now()->toDateTimeString(), now()->addMinutes(62));
} }
} }

View File

@@ -16,6 +16,7 @@ class MempoolWeather extends Component
public $hourFee; public $hourFee;
public $economyFee; public $economyFee;
public $minimumFee; public $minimumFee;
public $changed;
public function mount() public function mount()
{ {
@@ -32,6 +33,7 @@ class MempoolWeather extends Component
$this->hourFee = $result['hourFee']; $this->hourFee = $result['hourFee'];
$this->economyFee = $result['economyFee']; $this->economyFee = $result['economyFee'];
$this->minimumFee = $result['minimumFee']; $this->minimumFee = $result['minimumFee'];
$this->changed = cache()->get('mempool-weather-changed');
} }
public function render() public function render()

View File

@@ -12,7 +12,7 @@
</div> </div>
<div class="w-full flex flex-col sm:flex-row sm:space-x-4 justify-center"> <div class="w-full flex flex-col sm:flex-row sm:space-x-4 justify-center">
<div class="text-md leading-6 text-gray-900 text-center max-w-screen-2xl"> <div class="text-md leading-6 text-gray-900 text-center max-w-screen-2xl">
{{ $weather }} {{ $weather }} (um {{ \App\Support\Carbon::parse($changed)->asTime() }} Uhr aktualisiert)
</div> </div>
<div> <div>
<div <div