Skip to content

Commit

Permalink
Reorder function parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgall committed Mar 27, 2024
1 parent cd5489f commit d924433
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/hooks/DAO/loaders/useFractalNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const useFractalNode = ({
const { requestWithRetries } = useAsyncRetry();

const formatDAOQuery = useCallback(
(result: { data?: DAOQueryQuery }, _daoAddress: string, _daoNetwork: string) => {
(result: { data?: DAOQueryQuery }, _daoNetwork: string, _daoAddress: string) => {
if (!result.data) {
return;
}
Expand Down Expand Up @@ -68,7 +68,7 @@ export const useFractalNode = ({
variables: { daoAddress },
onCompleted: async data => {
if (!daoAddress || !daoNetwork) return;
const graphNodeInfo = formatDAOQuery({ data }, daoAddress, daoNetwork);
const graphNodeInfo = formatDAOQuery({ data }, daoNetwork, daoAddress);
const daoName = await getDaoName(utils.getAddress(daoAddress), graphNodeInfo?.daoName);

if (!!graphNodeInfo) {
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/DAO/loaders/useLoadDAONode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const useLoadDAONode = () => {
});

const formatDAOQuery = useCallback(
(result: { data?: DAOQueryQuery }, _daoAddress: string, _daoNetwork: string) => {
(result: { data?: DAOQueryQuery }, _daoNetwork: string, _daoAddress: string) => {
if (!result.data) {
return;
}
Expand Down Expand Up @@ -52,8 +52,8 @@ export const useLoadDAONode = () => {
try {
const graphNodeInfo = formatDAOQuery(
await getDAOInfo({ variables: { daoAddress: _daoAddress } }),
_daoAddress,
_daoNetwork,
_daoAddress,
);
if (!graphNodeInfo) {
logError('graphQL query failed');
Expand Down

0 comments on commit d924433

Please sign in to comment.