aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/StarAmount.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2024-11-29 18:07:15 +0300
committerlevlam <levlam@telegram.org>2024-11-29 18:07:15 +0300
commit35dd7f29d729df15883a6895ec1c200b5d35688e (patch)
tree261bb1e677ae2a979294a26c350986170567407e /td/telegram/StarAmount.cpp
parent9101328fc26027d327635edd88d2f61f0f3aa711 (diff)
Use starAmount for Star balance and Star transaction amount.
Diffstat (limited to 'td/telegram/StarAmount.cpp')
-rw-r--r--td/telegram/StarAmount.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/td/telegram/StarAmount.cpp b/td/telegram/StarAmount.cpp
index 9765f5e59..00b5a2b22 100644
--- a/td/telegram/StarAmount.cpp
+++ b/td/telegram/StarAmount.cpp
@@ -10,9 +10,9 @@
namespace td {
-StarAmount::StarAmount(telegram_api::object_ptr<telegram_api::starsAmount> &&amount) {
+StarAmount::StarAmount(telegram_api::object_ptr<telegram_api::starsAmount> &&amount, bool allow_negative) {
if (amount != nullptr) {
- star_count_ = StarManager::get_star_count(amount->amount_, true);
+ star_count_ = StarManager::get_star_count(amount->amount_, allow_negative);
nanostar_count_ = StarManager::get_nanostar_count(star_count_, amount->nanos_);
}
}