Update prettier to 2.3 (#240)

* prettier 2.3.2

Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
pull/254/head
Sally MacFarlane 3 years ago committed by GitHub
parent 6ff6c580f0
commit 8d20fe4f44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      package.json
  2. 13
      src/containers/Tabs/Account.tsx
  3. 13
      src/containers/Tabs/Admin.tsx
  4. 7
      src/containers/Tabs/useTransaction.ts
  5. 30
      src/context/adminData.tsx
  6. 7
      yarn.lock

@ -79,7 +79,7 @@
"lint-staged": "11.1.2",
"mocha-junit-reporter": "2.0.0",
"mocha-multi-reporters": "^1.1.7",
"prettier": "2.2.1",
"prettier": "2.3.2",
"solidity-coverage": "^0.7.1",
"solium": "1.2.5",
"truffle": "5.0.17",

@ -37,15 +37,10 @@ const AccountTabContainer: React.FC<AccountTabContainerProps> = ({ isOpen }) =>
const { isAdmin, dataReady: adminDataReady } = useAdminData();
const { allowlist, isReadOnly, dataReady, accountRulesContract } = useAccountData();
const {
list,
modals,
toggleModal,
addTransaction,
updateTransaction,
deleteTransaction,
openToast
} = useTab(allowlist, (identifier: string) => ({ address: identifier }));
const { list, modals, toggleModal, addTransaction, updateTransaction, deleteTransaction, openToast } = useTab(
allowlist,
(identifier: string) => ({ address: identifier })
);
if (!!accountRulesContract) {
const handleAdd = async (value: string) => {

@ -34,15 +34,10 @@ type Admin = {
const AdminTabContainer: React.FC<AdminTabContainerProps> = ({ isOpen }) => {
const { admins, isAdmin, userAddress, dataReady, adminContract } = useAdminData();
const {
list,
modals,
toggleModal,
addTransaction,
updateTransaction,
deleteTransaction,
openToast
} = useTab(admins || [], (identifier: string) => ({ address: identifier }));
const { list, modals, toggleModal, addTransaction, updateTransaction, deleteTransaction, openToast } = useTab(
admins || [],
(identifier: string) => ({ address: identifier })
);
if (!!adminContract) {
const handleAdd = async (value: string) => {

@ -12,9 +12,10 @@ export default () => {
});
}, []);
const updateTransaction = useCallback((identifier: string, status: string) => addTransaction(identifier, status), [
addTransaction
]);
const updateTransaction = useCallback(
(identifier: string, status: string) => addTransaction(identifier, status),
[addTransaction]
);
const deleteTransaction = useCallback((identifier: string) => {
setTransactions(transactions => {

@ -40,14 +40,10 @@ export const AdminDataProvider: React.FC = (props: React.Props<{}>) => {
const [adminContract, setAdminContract] = useState<Admin | undefined>(undefined);
const [userAddress, setUserAddress] = useState<string | undefined>(undefined);
const value = useMemo(() => ({ admins, setAdmins, adminContract, setAdminContract, userAddress, setUserAddress }), [
admins,
setAdmins,
adminContract,
setAdminContract,
userAddress,
setUserAddress
]);
const value = useMemo(
() => ({ admins, setAdmins, adminContract, setAdminContract, userAddress, setUserAddress }),
[admins, setAdmins, adminContract, setAdminContract, userAddress, setUserAddress]
);
const { accountIngressContract, nodeIngressContract } = useNetwork();
@ -113,17 +109,15 @@ export const useAdminData = () => {
: undefined;
}, [admins]);
const dataReady = useMemo(() => adminContract !== undefined && admins !== undefined && userAddress !== undefined, [
adminContract,
admins,
userAddress
]);
const dataReady = useMemo(
() => adminContract !== undefined && admins !== undefined && userAddress !== undefined,
[adminContract, admins, userAddress]
);
const isAdmin = useMemo(() => (dataReady && admins ? admins.includes(userAddress!) : false), [
dataReady,
admins,
userAddress
]);
const isAdmin = useMemo(
() => (dataReady && admins ? admins.includes(userAddress!) : false),
[dataReady, admins, userAddress]
);
return {
dataReady,

@ -11463,12 +11463,7 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"
prettier@2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
prettier@^2.1.2:
prettier@2.3.2, prettier@^2.1.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d"
integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==

Loading…
Cancel
Save