Skip to content

Commit b561d1e

Browse files
committed
decimal_places deposit amount
1 parent 6c43d56 commit b561d1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Services/PrepareService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,11 @@ public function transferLazy(
8383
?array $meta = null
8484
): TransferLazyDtoInterface {
8585
$discount = $this->personalDiscountService->getDiscount($from, $to);
86+
$toWallet = $this->castService->getWallet($to);
8687
$from = $this->castService->getWallet($from);
8788
$fee = $this->taxService->getFee($to, $amount);
8889

89-
$amountWithoutDiscount = $this->mathService->sub($amount, $discount);
90+
$amountWithoutDiscount = $this->mathService->sub($amount, $discount, $toWallet->decimal_places);
9091
$depositAmount = $this->mathService->compare($amountWithoutDiscount, 0) === -1 ? '0' : $amountWithoutDiscount;
9192
$withdrawAmount = $this->mathService->add($depositAmount, $fee, $from->decimal_places);
9293

0 commit comments

Comments
 (0)