From 6e1d67b3c0b880774940f33b3d0a8b1597448767 Mon Sep 17 00:00:00 2001 From: keyan Date: Mon, 1 Jul 2024 14:58:53 -0500 Subject: [PATCH] fix optimistic responses of bounties and poll votes --- components/pay-bounty.js | 2 +- components/poll.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/pay-bounty.js b/components/pay-bounty.js index 2d13dbf6..26d7e4ff 100644 --- a/components/pay-bounty.js +++ b/components/pay-bounty.js @@ -51,7 +51,7 @@ export default function PayBounty ({ children, item }) { const variables = { id: item.id, sats: root.bounty, act: 'TIP' } const act = useAct({ variables, - optimisticResponse: { act: { result: { ...variables, path: item.path } } }, + optimisticResponse: { act: { __typename: 'ItemActPaidAction', result: { ...variables, path: item.path } } }, ...payBountyCacheMods }) diff --git a/components/poll.js b/components/poll.js index fd54c540..23b34d78 100644 --- a/components/poll.js +++ b/components/poll.js @@ -23,7 +23,7 @@ export default function Poll ({ item }) { onClick={me ? async () => { const variables = { id: v.id } - const optimisticResponse = { pollVote: { result: { id: v.id } } } + const optimisticResponse = { pollVote: { __typename: 'PollVotePaidAction', result: { id: v.id } } } try { await pollVote({ variables,