Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
Fix issues after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNeshi committed Sep 19, 2023
1 parent 5a842b6 commit a0fcf63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 2 additions & 3 deletions tasks/manage/changeProxyAdminForAll.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {SignerWithAddress} from "@nomiclabs/hardhat-ethers/signers";
import {Wallet} from "ethers";
import {Signer} from "ethers";
import {task} from "hardhat/config";
import {HardhatRuntimeEnvironment} from "hardhat/types";
import {OwnershipFacet__factory} from "typechain-types";
Expand Down Expand Up @@ -65,7 +64,7 @@ task("manage:changeProxyAdminForAll", "Will update the proxy admin for all proxy
});

async function transferAccountOwnership(
proxyAdminOwner: SignerWithAddress | Wallet,
proxyAdminOwner: Signer,
newProxyAdmin: string,
addresses: AddressObj,
hre: HardhatRuntimeEnvironment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async function updateEndowmentProxiesAdmin(

for (const endowmentProxy of endowmentProxies) {
try {
await checkIfManagedByProxyAdmin(endowmentProxy, proxyAdminOwner.address, hre);
await checkIfManagedByProxyAdmin(endowmentProxy, await proxyAdminOwner.getAddress(), hre);

await hre.run("manage:changeProxyAdmin", {
to: targetAddress,
Expand All @@ -33,11 +33,8 @@ export default async function updateEndowmentProxiesAdmin(
yes: true,
});
} catch (error) {
if (error instanceof CheckError) {
logger.out(error, logger.Level.Warn);
} else {
logger.out(error, logger.Level.Error);
}
const logLevel = error instanceof CheckError ? logger.Level.Warn : logger.Level.Error;
logger.out(error, logLevel);
}
}
}
Expand Down

0 comments on commit a0fcf63

Please sign in to comment.