Fix transformer.

This commit is contained in:
James Cole
2022-07-25 05:56:21 +02:00
parent 18f2633810
commit 47469c7082

View File

@@ -517,7 +517,7 @@ class TransactionGroupTransformer extends AbstractTransformer
private function getForeignAmount(string $type, ?string $foreignAmount): ?string
{
$result = null;
if (null !== $foreignAmount) {
if (null !== $foreignAmount && '' !== $foreignAmount && bccomp('0', $foreignAmount) !== 0) {
$result = TransactionType::WITHDRAWAL !== $type ? app('steam')->negative($foreignAmount) : app('steam')->positive($foreignAmount);
}