Transaction purchase delta hotfix.
This commit is contained in:
parent
ad71c712b9
commit
a66a672968
|
|
@ -46,11 +46,7 @@ class CommentsController extends Controller
|
|||
];
|
||||
|
||||
foreach($comments as $comment) {
|
||||
$poster = [
|
||||
'name' => $comment->user->username,
|
||||
'thumbnail' => $comment->user->getHeadshotImageUrl(),
|
||||
'url' => $comment->user->getProfileUrl()
|
||||
];
|
||||
$poster = $comment->user->userToJson();
|
||||
|
||||
$postDate = $comment['updated_at'];
|
||||
if(Carbon::now()->greaterThan($postDate->copy()->addDays(2)))
|
||||
|
|
|
|||
|
|
@ -69,14 +69,14 @@ class Transaction extends Model
|
|||
'asset_id' => $asset->id,
|
||||
'place_id' => $placeId,
|
||||
'user_id' => $user->id,
|
||||
'delta' => $asset->priceInTokens,
|
||||
'delta' => -$asset->priceInTokens,
|
||||
'seller_id' => $asset->creatorId
|
||||
];
|
||||
|
||||
// XlXi: Assets have a 30% tax.
|
||||
return [
|
||||
self::createPurchase($transaction),
|
||||
self::createSale(array_merge($transaction, ['delta' => $transaction['delta'] * (1-.3)]))
|
||||
self::createSale(array_merge($transaction, ['delta' => $transaction['delta'] * -(1-.3)]))
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue