MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / update_proxy_payment_status

Method update_proxy_payment_status

runners/client/ClientRunner.cpp:499–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

497}
498
499void ClientRunner::update_proxy_payment_status(const std::string &proxy_sc_address_str, td::BufferSlice info) {
500 auto R = cocoon::fetch_tl_object<cocoon_api::client_paymentStatus>(std::move(info), true);
501 if (R.is_error()) {
502 return;
503 }
504 auto obj = R.move_as_ok();
505 auto it = proxies_.find(proxy_sc_address_str);
506 if (it == proxies_.end()) {
507 return;
508 }
509 it->second->process_signed_payment_data(*obj->signed_payment_);
510 it->second->update_tokens_committed_to_db(obj->db_tokens_);
511 it->second->update_tokens_used(obj->max_tokens_);
512}
513
514std::string ClientRunner::http_generate_main() {
515 td::StringBuilder sb;

Callers

nothing calls this directly

Tested by

no test coverage detected