Remove strike delay (#1227)

This commit is contained in:
ekzyis 2024-06-05 11:49:09 -05:00 committed by GitHub
parent 79ed07ae74
commit 09f9efa189
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -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,
@ -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
@ -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?.()