Skip to content

Commit cb1945a

Browse files
committed
add abs
1 parent f1f04aa commit cb1945a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/HasWallet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ protected function assemble(Wallet $wallet, Transaction $withdraw, Transaction $
190190
'from_id' => $this->getKey(),
191191
'to_type' => $wallet->getMorphClass(),
192192
'to_id' => $wallet->getKey(),
193-
'fee' => $withdraw->amount - $deposit->amount,
193+
'fee' => \abs($withdraw->amount) - \abs($deposit->amount),
194194
'uuid' => Uuid::uuid4()->toString(),
195195
]);
196196
}

0 commit comments

Comments
 (0)