From d0bed8fe0e228efa740ed66348b142dbdff7e348 Mon Sep 17 00:00:00 2001
From: xiphon <xiphon@protonmail.com>
Date: Sun, 27 Jan 2019 19:30:15 +0000
Subject: [PATCH] WalletNotify: use new Deposit Model instance to create a
 deposit

---
 app/Console/Commands/WalletNotify.php | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/app/Console/Commands/WalletNotify.php b/app/Console/Commands/WalletNotify.php
index 2349b09..dd027eb 100644
--- a/app/Console/Commands/WalletNotify.php
+++ b/app/Console/Commands/WalletNotify.php
@@ -140,15 +140,14 @@ class walletNotify extends Command
      */
     public function createDeposit(Transaction $transaction)
     {
-        return Deposit::create([
-            'tx_id' => $transaction->id,
-            'amount' => $transaction->amount,
-            'confirmations' => $transaction->confirmations,
-            'payment_id' => $transaction->paymentId,
-            'time_received' => $transaction->time_received,
-            'block_received' => $transaction->blockHeight,
-        ]);
-
+        $deposit = new Deposit;
+        $deposit->tx_id = $transaction->id;
+        $deposit->amount = $transaction->amount;
+        $deposit->confirmations = $transaction->confirmations;
+        $deposit->payment_id = $transaction->paymentId;
+        $deposit->time_received = $transaction->time_received;
+        $deposit->block_received = $transaction->block_height;
+        $deposit->save();
     }
 
 }
-- 
GitLab