mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-24 19:55:52 +01:00
Add nanostar_amount to StarTransaction.
This commit is contained in:
parent
9707d8486b
commit
dfe62e6ccd
@ -4383,12 +4383,16 @@ class Client::JsonStarTransaction final : public td::Jsonable {
|
||||
auto star_count = transaction_->star_amount_->star_count_;
|
||||
auto nanostar_count = transaction_->star_amount_->nanostar_count_;
|
||||
if (star_count > 0 || nanostar_count > 0) {
|
||||
object("amount", star_count);
|
||||
object("source", JsonStarTransactionType(transaction_->type_.get(), client_));
|
||||
} else {
|
||||
object("amount", -star_count);
|
||||
star_count = -star_count;
|
||||
nanostar_count = -nanostar_count;
|
||||
object("receiver", JsonStarTransactionType(transaction_->type_.get(), client_));
|
||||
}
|
||||
object("amount", star_count);
|
||||
if (nanostar_count != 0) {
|
||||
object("nanostar_amount", nanostar_count);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user