Skip to content

Commit b5d8caf

Browse files
[hebao1.2] update UpgraderModule.sol (#2010)
1 parent 87cd91c commit b5d8caf

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

packages/hebao_v1/contracts/modules/upgrade/UpgraderModule.sol

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import "./SecurityStore_1_1_6.sol";
1818
contract UpgraderModule is BaseModule {
1919
ControllerImpl private immutable controller_;
2020

21-
address public immutable walletImplementation;
2221
address[] public modulesToRemove;
2322
address[] public modulesToAdd;
2423

@@ -27,7 +26,6 @@ contract UpgraderModule is BaseModule {
2726

2827
constructor(
2928
ControllerImpl _controller,
30-
address _walletImplementation,
3129
address[] memory _modulesToAdd,
3230
address[] memory _modulesToRemove,
3331
address _oldSecurityStore,
@@ -36,28 +34,13 @@ contract UpgraderModule is BaseModule {
3634
BaseModule(_controller)
3735
{
3836
controller_ = _controller;
39-
walletImplementation = _walletImplementation;
4037
modulesToAdd = _modulesToAdd;
4138
modulesToRemove = _modulesToRemove;
4239

4340
oldSecurityStore = SecurityStore_1_1_6(_oldSecurityStore);
4441
newSecurityStore = SecurityStore(_newSecurityStore);
4542
}
4643

47-
function upgradeWalletImplementation(address payable wallet)
48-
external
49-
{
50-
require(msg.sender == address(this), "NOT_ALLOWED");
51-
52-
if (walletImplementation != OwnedUpgradeabilityProxy(wallet).implementation()) {
53-
bytes memory txData = abi.encodeWithSelector(
54-
OwnedUpgradeabilityProxy.upgradeTo.selector,
55-
walletImplementation
56-
);
57-
transactCall(wallet, wallet, 0, txData);
58-
}
59-
}
60-
6144
function migrateSecurityStore(address wallet)
6245
internal
6346
{
@@ -90,10 +73,6 @@ contract UpgraderModule is BaseModule {
9073
{
9174
address payable wallet = msg.sender;
9275

93-
if (walletImplementation != address(0)) {
94-
try UpgraderModule(address(this)).upgradeWalletImplementation(wallet) {} catch {}
95-
}
96-
9776
BaseWallet w = BaseWallet(wallet);
9877

9978
// Upgrade the controller if different

0 commit comments

Comments
 (0)