Skip to content

Commit

Permalink
run lint:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jdville03 committed Mar 7, 2023
1 parent ac84fe9 commit a852784
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
10 changes: 6 additions & 4 deletions src/contracts/adapters/manager-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import { getAdapter } from "../../utils/contract.js";
import { parseConfigs } from "./configuration-adapter.js";
import { GcpKmsSigner, TypedDataVersion } from "ethers-gcp-kms-signer";
import { availableExtensions } from "./managing-adapter";
import { getAdapterAddress, getExtensionAddress } from "../core/dao-registry.js";
import {
getAdapterAddress,
getExtensionAddress,
} from "../core/dao-registry.js";
import { UpdateType } from "../../interfaces/cli/commands/manager-cmd.js";

const CONTRACT_NAME = "Manager";
Expand Down Expand Up @@ -95,9 +98,8 @@ export const submitAndProcessProposal = async ({
if (tx.wait) {
await tx.wait();
}

return {}


return {};
};

const getSignature = async (
Expand Down
25 changes: 16 additions & 9 deletions src/interfaces/cli/commands/manager-cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ export const managerCommands = (program) => {
await inquirer.prompt([
{
type: "checkbox",
message: (a) => `Which DAO permissions does the ${answers.updateType} need?`,
message: (a) =>
`Which DAO permissions does the ${answers.updateType} need?`,
name: "aclFlags",
choices: daoAccessFlags.map((f) =>
Object.assign({ name: f })
Expand All @@ -76,16 +77,20 @@ export const managerCommands = (program) => {
);
notice("Existing extension ACL recovered");
} catch (err) {
notice("Could not recover existing ACL or the extension does not have any ACL. Check the contracts.config.ts file.");
notice(
"Could not recover existing ACL or the extension does not have any ACL. Check the contracts.config.ts file."
);
}
}

const { extensions: extensionsACLs } = await promptExtensionAccessFlags(adapterOrExtensionId);
const { extensions: extensionsACLs } =
await promptExtensionAccessFlags(adapterOrExtensionId);
return {
...answers,
extensions: Object.keys(extensionsACLs).length > 0
? extensionsACLs
: existingAcl
extensions:
Object.keys(extensionsACLs).length > 0
? extensionsACLs
: existingAcl,
};
})
.then(async (answers) => {
Expand All @@ -102,11 +107,13 @@ export const managerCommands = (program) => {
);
info(`DAO AccessFlags:\t${JSON.stringify(answers.aclFlags)}`);
info(
`DAO Configurations:\t${configurations ? JSON.stringify(configurations) : "n/a"
`DAO Configurations:\t${
configurations ? JSON.stringify(configurations) : "n/a"
}\n`
);
info(
`Extension ACLs:\n${extensions ? JSON.stringify(extensions, null, 2) : "n/a"
`Extension ACLs:\n${
extensions ? JSON.stringify(extensions, null, 2) : "n/a"
}`
);

Expand Down Expand Up @@ -198,7 +205,7 @@ const getExistingExtensionAccess = async (extensionId) => {
},
});
}
} catch (err) { } // Don't need to do anything if adapter doesn't exist.
} catch (err) {} // Don't need to do anything if adapter doesn't exist.

return acc;
}, Promise.resolve([]));
Expand Down

0 comments on commit a852784

Please sign in to comment.