Commit d0bed8fe authored by xiphon's avatar xiphon
Browse files

WalletNotify: use new Deposit Model instance to create a deposit

parent 13f28cc5
...@@ -140,15 +140,14 @@ class walletNotify extends Command ...@@ -140,15 +140,14 @@ class walletNotify extends Command
*/ */
public function createDeposit(Transaction $transaction) public function createDeposit(Transaction $transaction)
{ {
return Deposit::create([ $deposit = new Deposit;
'tx_id' => $transaction->id, $deposit->tx_id = $transaction->id;
'amount' => $transaction->amount, $deposit->amount = $transaction->amount;
'confirmations' => $transaction->confirmations, $deposit->confirmations = $transaction->confirmations;
'payment_id' => $transaction->paymentId, $deposit->payment_id = $transaction->paymentId;
'time_received' => $transaction->time_received, $deposit->time_received = $transaction->time_received;
'block_received' => $transaction->blockHeight, $deposit->block_received = $transaction->block_height;
]); $deposit->save();
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment