fix optimistic responses of bounties and poll votes
This commit is contained in:
parent
1e9d1ce66c
commit
6e1d67b3c0
|
@ -51,7 +51,7 @@ export default function PayBounty ({ children, item }) {
|
||||||
const variables = { id: item.id, sats: root.bounty, act: 'TIP' }
|
const variables = { id: item.id, sats: root.bounty, act: 'TIP' }
|
||||||
const act = useAct({
|
const act = useAct({
|
||||||
variables,
|
variables,
|
||||||
optimisticResponse: { act: { result: { ...variables, path: item.path } } },
|
optimisticResponse: { act: { __typename: 'ItemActPaidAction', result: { ...variables, path: item.path } } },
|
||||||
...payBountyCacheMods
|
...payBountyCacheMods
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ export default function Poll ({ item }) {
|
||||||
onClick={me
|
onClick={me
|
||||||
? async () => {
|
? async () => {
|
||||||
const variables = { id: v.id }
|
const variables = { id: v.id }
|
||||||
const optimisticResponse = { pollVote: { result: { id: v.id } } }
|
const optimisticResponse = { pollVote: { __typename: 'PollVotePaidAction', result: { id: v.id } } }
|
||||||
try {
|
try {
|
||||||
await pollVote({
|
await pollVote({
|
||||||
variables,
|
variables,
|
||||||
|
|
Loading…
Reference in New Issue