Description
There is no front-end rate limiting to prevent users from spamming the tip submission button. While the blockchain itself provides some protection through gas fees, rapid repeated clicks can create multiple pending transactions before the first one resolves. This can drain a user's balance unexpectedly.
File
frontend/src/components/SendTip.jsx
Suggested Fix
Disable the submit button after the first click until the transaction completes or fails. Implement a cooldown period between submissions (e.g., 10 seconds). Consider adding a debounce to the handleSendTip function. Track pending transactions in state and prevent new submissions while others are pending.
Description
There is no front-end rate limiting to prevent users from spamming the tip submission button. While the blockchain itself provides some protection through gas fees, rapid repeated clicks can create multiple pending transactions before the first one resolves. This can drain a user's balance unexpectedly.
File
frontend/src/components/SendTip.jsx
Suggested Fix
Disable the submit button after the first click until the transaction completes or fails. Implement a cooldown period between submissions (e.g., 10 seconds). Consider adding a debounce to the handleSendTip function. Track pending transactions in state and prevent new submissions while others are pending.