Remove strike delay (#1227)
This commit is contained in:
parent
79ed07ae74
commit
09f9efa189
@ -113,6 +113,8 @@ export default function ItemAct ({ onClose, item, down, children, abortSignal })
|
|||||||
const act = useAct()
|
const act = useAct()
|
||||||
|
|
||||||
const onSubmit = useCallback(async ({ amount, hash, hmac }) => {
|
const onSubmit = useCallback(async ({ amount, hash, hmac }) => {
|
||||||
|
strike()
|
||||||
|
onClose()
|
||||||
await act({
|
await act({
|
||||||
variables: {
|
variables: {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
@ -128,8 +130,6 @@ export default function ItemAct ({ onClose, item, down, children, abortSignal })
|
|||||||
})
|
})
|
||||||
if (!me) setItemMeAnonSats({ id: item.id, amount })
|
if (!me) setItemMeAnonSats({ id: item.id, amount })
|
||||||
addCustomTip(Number(amount))
|
addCustomTip(Number(amount))
|
||||||
strike()
|
|
||||||
onClose()
|
|
||||||
}, [me, act, down, item.id, strike])
|
}, [me, act, down, item.id, strike])
|
||||||
|
|
||||||
// XXX avoid manual optimistic updates until
|
// XXX avoid manual optimistic updates until
|
||||||
@ -290,8 +290,8 @@ export function useZap () {
|
|||||||
|
|
||||||
// XXX related to comment above
|
// XXX related to comment above
|
||||||
// await zap({ variables: { ...variables, hash, hmac } })
|
// await zap({ variables: { ...variables, hash, hmac } })
|
||||||
await zap({ variables: { ...variables, hash, hmac }, optimisticResponse, update })
|
|
||||||
strike()
|
strike()
|
||||||
|
await zap({ variables: { ...variables, hash, hmac }, optimisticResponse, update })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
revert?.()
|
revert?.()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user