Skip to content

Commit

Permalink
txn fix
Browse files Browse the repository at this point in the history
  • Loading branch information
krutyosila committed Nov 24, 2020
1 parent f7e4877 commit b524bf1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Services/WalletService.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function create(WalletTransactionType $types)
$wallet->balance = $wallet->balance + $types->getAmount();
$wallet->save();
}
$types->setTxn($wallet->id);
$types->setTxn();
return $wallet->transactions()->create($types->getAll());
}

Expand Down
6 changes: 3 additions & 3 deletions src/Types/WalletTransactionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ public function getTxn()
}

/**
* @param mixed $walletId
* @param mixed
*/
public function setTxn($walletId)
public function setTxn()
{
$this->txn = Hash::make($walletId.microtime());
$this->txn = Str::random(32);
}
/**
* @return array
Expand Down

0 comments on commit b524bf1

Please sign in to comment.