Skip to content

Commit

Permalink
fix: update currency helper usage for consistency and improve tests (v4)
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Feb 12, 2025
1 parent f72b5a3 commit ae73267
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion resources/views/includes/cartbox/tip-form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
type="number"
class="form-control rounded"
placeholder="@lang('igniter.cart::default.text_apply_tip')"
step="{{ 1 / (10 ** app('currency')->getDefault()->decimal_position) }}"
step="{{ 1 / (10 ** currency()->getDefault()->decimal_position) }}"
/>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions tests/ServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@

it('configures Google Fonts correctly', function() {
$fontUrl = 'https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap';
$themeModel = Theme::create([
'name' => 'test-theme',
'code' => 'test-theme',
$themeModel = Theme::factory()->create([
'name' => 'tests-theme',
'code' => 'tests-theme',
'version' => '1.0.0',
'description' => 'Test theme',
'data' => [
Expand Down
2 changes: 1 addition & 1 deletion theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// add currency helper
$defaultCountry = \Igniter\System\Models\Country::getDefault();
$defaultCurrency = app('currency')->getDefault();
$defaultCurrency = currency()->getDefault();
Assets::putJsVars([
'country' => [
'name' => $defaultCountry->country_name,
Expand Down

0 comments on commit ae73267

Please sign in to comment.