| 77 | } |
| 78 | |
| 79 | [[nodiscard]] int64 FindTonForResale(const MTPVector<MTPStarsAmount> *list) { |
| 80 | if (!list) { |
| 81 | return 0; |
| 82 | } |
| 83 | for (const auto &amount : list->v) { |
| 84 | if (amount.type() == mtpc_starsTonAmount) { |
| 85 | return int64(amount.c_starsTonAmount().vamount().v); |
| 86 | } |
| 87 | } |
| 88 | return 0; |
| 89 | } |
| 90 | |
| 91 | } // namespace |
| 92 |