|
9 | 9 | use Bavix\Wallet\Models\Transfer; |
10 | 10 | use Bavix\Wallet\Models\Wallet as WalletModel; |
11 | 11 | use Bavix\Wallet\Objects\Bring; |
12 | | -use Bavix\Wallet\Objects\Operation; |
13 | 12 | use Bavix\Wallet\Traits\HasWallet; |
14 | 13 | use Illuminate\Support\Facades\DB; |
15 | 14 | use function app; |
@@ -53,7 +52,8 @@ public function forceTransfer(Wallet $from, Wallet $to, int $amount, ?array $met |
53 | 52 | ->getWallet($from); |
54 | 53 |
|
55 | 54 | $transfers = $this->multiBrings([ |
56 | | - (new Bring()) |
| 55 | + app(MakeService::class) |
| 56 | + ->makeBring() |
57 | 57 | ->setStatus($status) |
58 | 58 | ->setDeposit($deposit) |
59 | 59 | ->setWithdraw($withdraw) |
@@ -84,7 +84,8 @@ public function forceWithdraw(Wallet $wallet, int $amount, ?array $meta, bool $c |
84 | 84 | $wallet = $walletService->getWallet($wallet); |
85 | 85 |
|
86 | 86 | $transactions = $this->multiOperation($wallet, [ |
87 | | - (new Operation()) |
| 87 | + app(MakeService::class) |
| 88 | + ->makeOperation() |
88 | 89 | ->setType(Transaction::TYPE_WITHDRAW) |
89 | 90 | ->setConfirmed($confirmed) |
90 | 91 | ->setAmount(-$amount) |
@@ -114,7 +115,8 @@ public function deposit(Wallet $wallet, int $amount, ?array $meta, bool $confirm |
114 | 115 | $wallet = $walletService->getWallet($wallet); |
115 | 116 |
|
116 | 117 | $transactions = $this->multiOperation($wallet, [ |
117 | | - (new Operation()) |
| 118 | + app(MakeService::class) |
| 119 | + ->makeOperation() |
118 | 120 | ->setType(Transaction::TYPE_DEPOSIT) |
119 | 121 | ->setConfirmed($confirmed) |
120 | 122 | ->setAmount($amount) |
|
0 commit comments