fix optimistic responses of bounties and poll votes

This commit is contained in:
keyan 2024-07-01 14:58:53 -05:00
parent 1e9d1ce66c
commit 6e1d67b3c0
2 changed files with 2 additions and 2 deletions

View File

@ -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
})

View File

@ -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,