Skip to content

Commit ef5949d

Browse files
short form
1 parent 9c30598 commit ef5949d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/Traits/HasWallet.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ public function getWalletBalanceByType(string $walletType): int|float
5454
throw new InvalidWalletTypeException("Invalid wallet type '{$walletType}'.");
5555
}
5656

57-
$walletEnumType = WalletEnums::tryFrom($walletType);
58-
59-
$wallet = $this->wallets()->type($walletEnumType)->first();
57+
$wallet = $this->wallets()->where('type', $walletType)->first();
6058

6159
if (! $wallet) {
6260
throw new WalletNotFoundException("Wallet of type '{$walletType}' not found.");

0 commit comments

Comments
 (0)