Coin: Add ability to see how much voices you reveiced trough notifications

This commit is contained in:
veselcraft 2022-06-02 14:07:31 +03:00
parent 32e976a3b7
commit 26b8b23aae
No known key found for this signature in database
GPG key ID: AED66BC1AC628A4E

View file

@ -85,7 +85,7 @@ class FetchToncoinTransactions extends Command
$value = ($transfer["in_msg"]["value"] / NANOTON) / OPENVK_ROOT_CONF["openvk"]["preferences"]["ton"]["rate"];
$user->setCoins($user->getCoins() + $value);
$user->save();
(new CoinsTransferNotification($user, (new Users)->get(OPENVK_ROOT_CONF["openvk"]["preferences"]["support"]["adminAccount"]), 0, "Via TON cryptocurrency"))->emit();
(new CoinsTransferNotification($user, (new Users)->get(OPENVK_ROOT_CONF["openvk"]["preferences"]["support"]["adminAccount"]), (int) $value, "Via TON cryptocurrency"))->emit();
$header->writeln($value . " coins are added to " . $user->getId() . " user id");
$this->transactions->insert([
"id" => NULL,