Skip to content

Commit

Permalink
Remove strike delay (#1227)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis authored Jun 5, 2024
1 parent 79ed07a commit 09f9efa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/item-act.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ export default function ItemAct ({ onClose, item, down, children, abortSignal })
const act = useAct()

const onSubmit = useCallback(async ({ amount, hash, hmac }) => {
strike()
onClose()
await act({
variables: {
id: item.id,
Expand All @@ -128,8 +130,6 @@ export default function ItemAct ({ onClose, item, down, children, abortSignal })
})
if (!me) setItemMeAnonSats({ id: item.id, amount })
addCustomTip(Number(amount))
strike()
onClose()
}, [me, act, down, item.id, strike])

// XXX avoid manual optimistic updates until
Expand Down Expand Up @@ -290,8 +290,8 @@ export function useZap () {

// XXX related to comment above
// await zap({ variables: { ...variables, hash, hmac } })
await zap({ variables: { ...variables, hash, hmac }, optimisticResponse, update })
strike()
await zap({ variables: { ...variables, hash, hmac }, optimisticResponse, update })
} catch (error) {
revert?.()

Expand Down

0 comments on commit 09f9efa

Please sign in to comment.