Skip to content

Commit

Permalink
Merge pull request #3878 from JoinColony/fix/3870-correctly-show-deci…
Browse files Browse the repository at this point in the history
…sions-list

Fix the display of decisions list after creating decision motion
  • Loading branch information
chinins authored Sep 22, 2022
2 parents b14971d + 1eaa7af commit d5b5c57
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/data/resolvers/motions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import {
UserReputationQueryVariables,
UserReputationDocument,
} from '~data/index';
import { log } from '~utils/debug';

import {
ActionsPageFeedType,
Expand Down Expand Up @@ -1294,13 +1295,21 @@ export const motionsResolvers = ({
};
},
async annotationHash({ transaction, agent }) {
const {
values: { metadata: annotationHash },
} = await getAnnotationFromSubgraph(
agent,
transaction.hash,
apolloClient,
);
let annotationHash;
try {
const {
values: { metadata },
} = await getAnnotationFromSubgraph(
agent,
transaction.hash,
apolloClient,
);

annotationHash = metadata;
} catch (error) {
log.verbose('Could not fetch IPFS metadata for decision');
}

return annotationHash;
},
},
Expand Down

0 comments on commit d5b5c57

Please sign in to comment.