From 16bf911ddedc615742bed7043928e821bd9c1ed1 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 20 Jan 2020 01:52:46 +0300 Subject: [PATCH] Update layer 109. TON-related requests was removed. GitOrigin-RevId: 7b6cba050a43aab728928e145829a402a055df52 --- CHANGELOG.md | 12 +----------- td/generate/scheme/td_api.tl | 14 -------------- td/generate/scheme/td_api.tlo | Bin 167148 -> 166680 bytes td/generate/scheme/telegram_api.tl | 7 ------- td/generate/scheme/telegram_api.tlo | Bin 200424 -> 199944 bytes td/telegram/PasswordManager.cpp | 4 ++-- td/telegram/PasswordManager.h | 8 ++++---- td/telegram/Payments.cpp | 8 ++++---- td/telegram/Payments.h | 2 +- td/telegram/Td.cpp | 6 +++--- td/telegram/Td.h | 4 ++-- td/telegram/cli.cpp | 8 ++++---- 12 files changed, 21 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32bff755..7c73633c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -156,17 +156,7 @@ Changes in 1.6.0: the appropriate mark. * Added the field `video_upload_bitrate` to the class `autoDownloadSettings`. * Disallowed to call `setChatNotificationSettings` method on the chat with self, which never worked. -* Added support for integration with TON Blockchain. For a complete integration use `tonlib` from - https://github.com/ton-blockchain/ton: - - Added the option `default_ton_blockchain_config`, containing the default TON Blockchain config. If empty, - TON integration is disabled, otherwise the config needs to be passed to tonlib. - - Added the option `default_ton_blockchain_name`, containing the default TON Blockchain name. - The blockchain name needs to be passed to tonlib. - - Added the class `tonLiteServerResponse` and the method `sendTonLiteServerRequest`, which allows to send requests to - a TON Blockchain Lite Server through Telegram servers. - - Added the class `tonWalletPasswordSalt` and the method `getTonWalletPasswordSalt`, which can be used - to harden protection of the locally stored TON Blockchain private key. - - Added support for `ton://` URLs in messages and inline keyboard buttons. +* Added support for `ton://` URLs in messages and inline keyboard buttons. ----------------------------------------------------------------------------------------------------------------------- diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index bdcb6c79..13df3583 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -1945,13 +1945,6 @@ gameHighScore position:int32 user_id:int32 score:int32 = GameHighScore; gameHighScores scores:vector = GameHighScores; -//@description Contains the response of a request to TON lite server @response The response -tonLiteServerResponse response:bytes = TonLiteServerResponse; - -//@description Contains the salt to be used with locally stored password to access a local TON-based wallet @salt The salt -tonWalletPasswordSalt salt:bytes = TonWalletPasswordSalt; - - //@class ChatEventAction @description Represents a chat event //@description A message was edited @old_message The original message before the edit @new_message The message after it was edited @@ -4231,13 +4224,6 @@ sendCustomRequest method:string parameters:string = CustomRequestResult; answerCustomQuery custom_query_id:int64 data:string = Ok; -//@description Sends a request to TON lite server through Telegram servers. Can be called before authorization @request The request -sendTonLiteServerRequest request:bytes = TonLiteServerResponse; - -//@description Returns a salt to be used with locally stored password to access a local TON-based wallet -getTonWalletPasswordSalt = TonWalletPasswordSalt; - - //@description Succeeds after a specified amount of time has passed. Can be called before authorization. Can be called before initialization @seconds Number of seconds before the function returns setAlarm seconds:double = Ok; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index 22414c58adb4ac640f1f062ea5df5fce52681d87..52fb14d0a4602ce5dda364f699640d76066846c8 100644 GIT binary patch delta 66 zcmaDelWWE_F5XA8^{p77;MYdp_3E2dG$t@JvNdnj-o90vadz@{kqL}fJQ;Jgzr4w4 SAG~15yy4n3I!Q5|CJ2T%KQ)5}cSbxsXeG^B(mH%#0k(zS`S;wHaq8n}Uri z!EPK#?&dKeA4Z@9q@Uf_FZQDVxF&|8s ww&+?cWNEgPC{E2w0qRE%q{7nFVvu%pU$GaZf~6)Om@dl<^wahk$xIFE07eOftN;K2 diff --git a/td/generate/scheme/telegram_api.tl b/td/generate/scheme/telegram_api.tl index 7ab7dd1c..aa6342c5 100644 --- a/td/generate/scheme/telegram_api.tl +++ b/td/generate/scheme/telegram_api.tl @@ -1071,10 +1071,6 @@ theme#28f1114 flags:# creator:flags.0?true default:flags.1?true id:long access_h account.themesNotModified#f41eb622 = account.Themes; account.themes#7f676421 hash:int themes:Vector = account.Themes; -wallet.liteResponse#764386d7 response:bytes = wallet.LiteResponse; - -wallet.secretSalt#dd484d64 salt:bytes = wallet.KeySecretSalt; - auth.loginToken#629f1980 expires:int token:bytes = auth.LoginToken; auth.loginTokenMigrateTo#68e9916 dc_id:int token:bytes = auth.LoginToken; auth.loginTokenSuccess#390d5c5e authorization:auth.Authorization = auth.LoginToken; @@ -1445,6 +1441,3 @@ langpack.getLanguage#6a596502 lang_pack:string lang_code:string = LangPackLangua folders.editPeerFolders#6847d0ab folder_peers:Vector = Updates; folders.deleteFolder#1c295881 folder_id:int = Updates; - -wallet.sendLiteRequest#e2c9d33e body:bytes = wallet.LiteResponse; -wallet.getKeySecretSalt#b57f346 revoke:Bool = wallet.KeySecretSalt; diff --git a/td/generate/scheme/telegram_api.tlo b/td/generate/scheme/telegram_api.tlo index c45d531d92f58867abfdd474d5f3b49168d0afef..f486c8e5248ca1329063c3e467042f016138fa14 100644 GIT binary patch delta 47 xcmaDcm#1SE5AUPd`c@23Ah(fszY(Kuv!QXjp)uojLt`d+VMdSbyzWfW#{oAh3XZ*wjahD!QmmZS!y78m5_6{k*IAi}8MeAcM_tP$h(vqntv!qX>kGPB5l3=@Q^ zFNT}MzyK1T{-A=5u#BUxG@?iujmVS0$lcNY~^<>9O^1L8f zm?>V{-?}nMAD=wIlEv8Vb2zs+)c*9;5)}V{Y(_SbtthoDKRb1DzOO8XtL!eHd?W_< cM_vlV?}eqQ#U%{rE@Mf`PpJgCiU-+M0I}+S$p8QV diff --git a/td/telegram/PasswordManager.cpp b/td/telegram/PasswordManager.cpp index ece74208..3f2db0d1 100644 --- a/td/telegram/PasswordManager.cpp +++ b/td/telegram/PasswordManager.cpp @@ -734,7 +734,7 @@ void PasswordManager::drop_cached_secret() { LOG(INFO) << "Drop passport secret"; secret_ = optional(); } - +/* void PasswordManager::get_ton_wallet_password_salt(Promise> promise) { if (!ton_wallet_password_salt_.empty()) { return promise.set_value(td_api::make_object(ton_wallet_password_salt_)); @@ -768,7 +768,7 @@ void PasswordManager::on_get_ton_wallet_password_salt( } } } - +*/ void PasswordManager::timeout_expired() { if (Time::now() >= secret_expire_date_) { drop_cached_secret(); diff --git a/td/telegram/PasswordManager.h b/td/telegram/PasswordManager.h index f238b92b..6f269b98 100644 --- a/td/telegram/PasswordManager.h +++ b/td/telegram/PasswordManager.h @@ -89,7 +89,7 @@ class PasswordManager : public NetQueryCallback { static TempPasswordState get_temp_password_state_sync(); - void get_ton_wallet_password_salt(Promise> promise); + // void get_ton_wallet_password_salt(Promise> promise); private: static constexpr size_t MIN_NEW_SALT_SIZE = 8; @@ -162,8 +162,8 @@ class PasswordManager : public NetQueryCallback { int32 last_code_length_ = 0; - string ton_wallet_password_salt_; - vector>> get_ton_wallet_password_salt_queries_; + // string ton_wallet_password_salt_; + // vector>> get_ton_wallet_password_salt_queries_; static Result decrypt_secure_secret( Slice password, tl_object_ptr algo_ptr, Slice secret, int64 secret_id); @@ -191,7 +191,7 @@ class PasswordManager : public NetQueryCallback { Promise promise); void on_finish_create_temp_password(Result result, bool dummy); - void on_get_ton_wallet_password_salt(Result> result); + // void on_get_ton_wallet_password_salt(Result> result); void on_result(NetQueryPtr query) override; diff --git a/td/telegram/Payments.cpp b/td/telegram/Payments.cpp index eeb50af6..d964ab79 100644 --- a/td/telegram/Payments.cpp +++ b/td/telegram/Payments.cpp @@ -486,7 +486,7 @@ class ClearSavedInfoQuery : public Td::ResultHandler { promise_.set_error(std::move(status)); } }; - +/* class SendLiteRequestQuery : public Td::ResultHandler { Promise> promise_; @@ -514,7 +514,7 @@ class SendLiteRequestQuery : public Td::ResultHandler { promise_.set_error(std::move(status)); } }; - +*/ bool operator==(const LabeledPricePart &lhs, const LabeledPricePart &rhs) { return lhs.label == rhs.label && lhs.amount == rhs.amount; } @@ -896,9 +896,9 @@ void delete_saved_order_info(Promise &&promise) { void delete_saved_credentials(Promise &&promise) { G()->td().get_actor_unsafe()->create_handler(std::move(promise))->send(true, false); } - +/* void send_ton_lite_server_request(Slice request, Promise> &&promise) { G()->td().get_actor_unsafe()->create_handler(std::move(promise))->send(BufferSlice{request}); } - +*/ } // namespace td diff --git a/td/telegram/Payments.h b/td/telegram/Payments.h index 0bd4544b..075af444 100644 --- a/td/telegram/Payments.h +++ b/td/telegram/Payments.h @@ -154,6 +154,6 @@ void delete_saved_order_info(Promise &&promise); void delete_saved_credentials(Promise &&promise); -void send_ton_lite_server_request(Slice request, Promise> &&promise); +// void send_ton_lite_server_request(Slice request, Promise> &&promise); } // namespace td diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 57217294..99663579 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -3515,7 +3515,7 @@ bool Td::is_preauthentication_request(int32 id) { case td_api::setCustomLanguagePackString::ID: case td_api::deleteLanguagePack::ID: case td_api::processPushNotification::ID: - case td_api::sendTonLiteServerRequest::ID: + // case td_api::sendTonLiteServerRequest::ID: case td_api::getOption::ID: case td_api::setOption::ID: case td_api::getStorageStatistics::ID: @@ -7379,7 +7379,7 @@ void Td::on_request(uint64 id, const td_api::deleteSavedCredentials &request) { CREATE_OK_REQUEST_PROMISE(); delete_saved_credentials(std::move(promise)); } - +/* void Td::on_request(uint64 id, const td_api::sendTonLiteServerRequest &request) { CHECK_IS_USER(); CREATE_REQUEST_PROMISE(); @@ -7391,7 +7391,7 @@ void Td::on_request(uint64 id, const td_api::getTonWalletPasswordSalt &request) CREATE_REQUEST_PROMISE(); send_closure(password_manager_, &PasswordManager::get_ton_wallet_password_salt, std::move(promise)); } - +*/ void Td::on_request(uint64 id, td_api::getPassportElement &request) { CHECK_IS_USER(); CLEAN_INPUT_STRING(request.password_); diff --git a/td/telegram/Td.h b/td/telegram/Td.h index 97f968f5..2af2706e 100644 --- a/td/telegram/Td.h +++ b/td/telegram/Td.h @@ -941,9 +941,9 @@ class Td final : public NetQueryCallback { void on_request(uint64 id, const td_api::deleteSavedCredentials &request); - void on_request(uint64 id, const td_api::sendTonLiteServerRequest &request); + // void on_request(uint64 id, const td_api::sendTonLiteServerRequest &request); - void on_request(uint64 id, const td_api::getTonWalletPasswordSalt &request); + // void on_request(uint64 id, const td_api::getTonWalletPasswordSalt &request); void on_request(uint64 id, td_api::getPassportElement &request); diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index b34dc68e..db59ef79 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -1627,10 +1627,10 @@ class CliClient final : public Actor { send_request(td_api::make_object()); } else if (op == "dsc") { send_request(td_api::make_object()); - } else if (op == "stlsr") { - send_request(td_api::make_object()); - } else if (op == "gtwps") { - send_request(td_api::make_object()); + // } else if (op == "stlsr") { + // send_request(td_api::make_object()); + // } else if (op == "gtwps") { + // send_request(td_api::make_object()); } else if (op == "gpr") { send_request(td_api::make_object(get_user_privacy_setting(args))); } else if (op == "spr") {