-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
85d4f52
commit d1fd82f
Showing
9 changed files
with
76 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// This file is part of Gram Wallet Desktop, | ||
// a desktop application for the TON Blockchain project. | ||
// | ||
// For license and copyright information please follow this link: | ||
// https://github.com/ton-blockchain/wallet-desktop/blob/master/LEGAL | ||
// | ||
#include "wallet/config_upgrade_checker.h" | ||
|
||
#include "ton/ton_wallet.h" | ||
#include "ton/ton_state.h" | ||
|
||
namespace Wallet { | ||
|
||
ConfigUpgradeChecker::ConfigUpgradeChecker(not_null<Ton::Wallet*> wallet) { | ||
wallet->updates( | ||
) | rpl::filter([](const Ton::Update &update) { | ||
return update.data.is<Ton::ConfigUpgrade>(); | ||
}) | rpl::start_with_next([=](const Ton::Update &update) { | ||
_upgrades.push_back(update.data.get<Ton::ConfigUpgrade>()); | ||
}, _lifetime); | ||
} | ||
|
||
std::vector<Ton::ConfigUpgrade> ConfigUpgradeChecker::takeUpgrades() { | ||
return std::move(_upgrades); | ||
} | ||
|
||
} // namespace Wallet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// This file is part of Gram Wallet Desktop, | ||
// a desktop application for the TON Blockchain project. | ||
// | ||
// For license and copyright information please follow this link: | ||
// https://github.com/ton-blockchain/wallet-desktop/blob/master/LEGAL | ||
// | ||
#pragma once | ||
|
||
namespace Ton { | ||
class Wallet; | ||
enum class ConfigUpgrade; | ||
} // namespace Ton | ||
|
||
namespace Wallet { | ||
|
||
class ConfigUpgradeChecker final { | ||
public: | ||
ConfigUpgradeChecker(not_null<Ton::Wallet*> wallet); | ||
|
||
std::vector<Ton::ConfigUpgrade> takeUpgrades(); | ||
|
||
private: | ||
std::vector<Ton::ConfigUpgrade> _upgrades; | ||
rpl::lifetime _lifetime; | ||
|
||
}; | ||
|
||
} // namespace Wallet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule lib_ton
updated
6 files
+17 −1 | ton/details/ton_external.cpp | |
+2 −0 | ton/details/ton_external.h | |
+14 −3 | ton/details/ton_storage.cpp | |
+1 −0 | ton/details/ton_storage.tl | |
+6 −0 | ton/ton_settings.h | |
+3 −1 | ton/ton_state.h |