|
11 | 11 | use Bavix\Wallet\Exceptions\WalletOwnerInvalid; |
12 | 12 | use Bavix\Wallet\Internal\Exceptions\ExceptionInterface; |
13 | 13 | use Bavix\Wallet\Internal\Service\DatabaseServiceInterface; |
14 | | -use Bavix\Wallet\Internal\Service\LockServiceInterface; |
15 | 14 | use Bavix\Wallet\Internal\Service\MathServiceInterface; |
16 | 15 | use Bavix\Wallet\Internal\Service\TranslatorServiceInterface; |
17 | 16 | use Bavix\Wallet\Models\Transaction; |
18 | | -use Bavix\Wallet\Services\AtomicKeyServiceInterface; |
| 17 | +use Bavix\Wallet\Services\AtomicServiceInterface; |
19 | 18 | use Bavix\Wallet\Services\CastServiceInterface; |
20 | 19 | use Bavix\Wallet\Services\CommonServiceLegacy; |
21 | 20 | use Bavix\Wallet\Services\ConsistencyServiceInterface; |
@@ -59,11 +58,7 @@ public function safeConfirm(Transaction $transaction): bool |
59 | 58 | */ |
60 | 59 | public function resetConfirm(Transaction $transaction): bool |
61 | 60 | { |
62 | | - $atomicKey = app(AtomicKeyServiceInterface::class) |
63 | | - ->getIdentifier($this) |
64 | | - ; |
65 | | - |
66 | | - return app(LockServiceInterface::class)->block($atomicKey, fn () => app(DatabaseServiceInterface::class)->transaction(function () use ($transaction) { |
| 61 | + return app(AtomicServiceInterface::class)->block($this, fn () => app(DatabaseServiceInterface::class)->transaction(function () use ($transaction) { |
67 | 62 | if (!$transaction->confirmed) { |
68 | 63 | throw new UnconfirmedInvalid( |
69 | 64 | app(TranslatorServiceInterface::class)->get('wallet::errors.unconfirmed_invalid'), |
@@ -98,11 +93,7 @@ public function safeResetConfirm(Transaction $transaction): bool |
98 | 93 | */ |
99 | 94 | public function forceConfirm(Transaction $transaction): bool |
100 | 95 | { |
101 | | - $atomicKey = app(AtomicKeyServiceInterface::class) |
102 | | - ->getIdentifier($this) |
103 | | - ; |
104 | | - |
105 | | - return app(LockServiceInterface::class)->block($atomicKey, fn () => app(DatabaseServiceInterface::class)->transaction(function () use ($transaction) { |
| 96 | + return app(AtomicServiceInterface::class)->block($this, fn () => app(DatabaseServiceInterface::class)->transaction(function () use ($transaction) { |
106 | 97 | if ($transaction->confirmed) { |
107 | 98 | throw new ConfirmedInvalid( |
108 | 99 | app(TranslatorServiceInterface::class)->get('wallet::errors.confirmed_invalid'), |
|
0 commit comments