mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
parse amount to int
This commit is contained in:
parent
6095b0c22d
commit
09fbce76e7
@ -313,8 +313,9 @@ class TransactionSendCoinsController extends AppController
|
||||
if(!isset($jsonData['amount']) || !isset($jsonData['email'])) {
|
||||
return $this->returnJson(['state' => 'parameter missing', 'msg' => 'amount and/or email not set']);
|
||||
}
|
||||
if($jsonData['amount'] < 0) {
|
||||
return $this->returnJson(['state' => 'error', 'msg' => 'amout must be > 0']);
|
||||
$amount = intval($jsonData['amount']);
|
||||
if($amount < 0) {
|
||||
return $this->returnJson(['state' => 'error', 'msg' => 'amout must be > 0 and int']);
|
||||
}
|
||||
|
||||
if(!isset($user['balance']) || $jsonData['amount'] > $user['balance']) {
|
||||
@ -358,7 +359,7 @@ class TransactionSendCoinsController extends AppController
|
||||
//var_dump($sessionStateUser);
|
||||
|
||||
$builderResult = TransactionTransfer::build(
|
||||
$jsonData['amount'],
|
||||
$amount,
|
||||
$memo,
|
||||
$receiverPubKeyHex,
|
||||
$senderPubKeyHex
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user