Skip to content

Commit 587679c

Browse files
committed
batch-*.md
1 parent 906d484 commit 587679c

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

docs/batch-transactions.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ use Bavix\Wallet\Services\ConsistencyServiceInterface;
7878
app(AtomicServiceInterface::class)->blocks($wallets, function () use ($wallets, $amount) {
7979
foreach ($wallets as $wallet) {
8080
app(ConsistencyServiceInterface::class)->checkPotential($wallet, $amount);
81-
8281
}
8382

8483
app(TransactionQueryHandlerInterface::class)->apply(
@@ -98,8 +97,13 @@ The main thing is to keep uniqueness.
9897
```php
9998
use Bavix\Wallet\External\Api\TransactionQuery;
10099

101-
TransactionQuery::createDeposit($wallet, $amount, null, uuid: '5f7820d1-1e82-4d03-9414-05d0c44da9a1')
102-
TransactionQuery::createWithdraw($wallet, $amount, null, uuid: '6e87dbf2-7be7-48c2-b688-f46ba4e25786')
100+
// int version
101+
TransactionQuery::createDeposit($wallet, $amount, null, uuid: '5f7820d1-1e82-4d03-9414-05d0c44da9a1');
102+
TransactionQuery::createWithdraw($wallet, $amount, null, uuid: '6e87dbf2-7be7-48c2-b688-f46ba4e25786');
103+
104+
// float version
105+
TransactionFloatQuery::createDeposit($wallet, $amountFloat, null, uuid: '5f7820d1-1e82-4d03-9414-05d0c44da9a1');
106+
TransactionFloatQuery::createWithdraw($wallet, $amountFloat, null, uuid: '6e87dbf2-7be7-48c2-b688-f46ba4e25786');
103107
```
104108

105109
---

docs/batch-transfers.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ The main thing is to keep uniqueness.
3838
```php
3939
use Bavix\Wallet\External\Api\TransferQuery;
4040

41+
// int version
4142
new TransferQuery($from, $wallet, $amount, new \Bavix\Wallet\External\Dto\Extra(
4243
deposit: new \Bavix\Wallet\External\Dto\Option(
4344
null,
@@ -48,7 +49,22 @@ new TransferQuery($from, $wallet, $amount, new \Bavix\Wallet\External\Dto\Extra(
4849
uuid: '3805730b-39a1-419d-8715-0b7cc3f1ffc2', // withdraw transaction
4950
),
5051
uuid: 'f8becf81-3993-43d7-81f1-7a725c72e976', // transfer uuid
51-
))
52+
extra: ['info' => 'fast deposit'], // metadata in the table transfers
53+
));
54+
55+
// float version
56+
new TransferFloatQuery($from, $wallet, $amountFlaot, new \Bavix\Wallet\External\Dto\Extra(
57+
deposit: new \Bavix\Wallet\External\Dto\Option(
58+
null,
59+
uuid: '71cecafe-da10-464f-9e00-c80437bb4c3e', // deposit transaction
60+
),
61+
withdraw: new \Bavix\Wallet\External\Dto\Option(
62+
null,
63+
uuid: '3805730b-39a1-419d-8715-0b7cc3f1ffc2', // withdraw transaction
64+
),
65+
uuid: 'f8becf81-3993-43d7-81f1-7a725c72e976', // transfer uuid
66+
extra: ['info' => 'fast deposit'], // metadata in the table transfers
67+
));
5268
```
5369

5470
---

0 commit comments

Comments
 (0)