From 9317ec3c1c471131c294a94afc4b9a938388fe85 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 18 Feb 2024 04:14:57 +0200 Subject: [PATCH] fix payment sender --- src/Controller/RoomController.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Controller/RoomController.php b/src/Controller/RoomController.php index de95407..83f29a6 100644 --- a/src/Controller/RoomController.php +++ b/src/Controller/RoomController.php @@ -639,7 +639,7 @@ class RoomController extends AbstractController ) >= $this->getParameter('app.add.post.cost.kva') ) { if ( - $txid = $client->kevaPut( + $client->kevaPut( $request->get('namespace'), sprintf( '%s@%s', @@ -648,15 +648,12 @@ class RoomController extends AbstractController ), $request->get('message') ) - ) - { + ) { // Send amount to profit address - $client->sendToAddress( + $client->sendFrom( + $username, $this->getParameter('app.kevacoin.profit.address'), - $this->getParameter('app.add.post.cost.kva'), - $txid, - null, - true // subtract from amount + $this->getParameter('app.add.post.cost.kva') ); // Register event time