shadcn.io is not affiliated with official shadcn/ui
Revoke Approval Web3 Block for Vue
A cleanup queue for token approvals: nine rows worst first, filter chips with counts, a checkbox per row with a mixed select-all, the gas for the chosen rows and one Revoke button that keeps revoked rows in place with Undo.
Installation
Overview
Clear out old approvals in one pass with this revoke panel for Vue with Ark UI. It's the cleanup queue of Tidyhold, a wallet safety tool: nine token approvals in a table, worst first, each with its token, spender, allowance, when it was last used, when it was approved and a risk word built from three facts, unlimited, unverified contract and unused for 90 days. A Toggle Group of filters shows live counts (All 9, Unlimited 4, Unused for 90 days 5, Unverified contract 2, Revoked) and a Checkbox in every row feeds a select-all that goes mixed when only some are chosen. The foot reserves its space, so choosing rows never moves them: it says how many are selected and the gas they would take, for example 3 selected, about 0.0041 ETH in gas, and the Shine Button revokes them. Revoked rows stay in place as Revoked in this demo with an Undo. For wallets, security tools and any batch clean-up.
FAQ
How is the risk word chosen?
Each approval scores two points for an unlimited allowance, two for an unverified contract and one if it has not been used for 90 days (or never) against the page's fixed date. Three or more is High, one or two is Medium and none is Low. The Risk column also spells out the reasons, so the word is never the only signal, and High rows are set in a heavier weight instead of a color.
Where does the gas figure come from?
A revoke is a small transaction, so the demo takes 46,000 gas for each at a typed 30 gwei and a sample ETH rate, and multiplies by the number selected. It says about, in ETH and in sample USD, and changes with the selection. Real gas moves with the network, so read it from your provider before you ask for a signature.
What stays local, and how do I wire it?
All of it. Nothing is signed or sent: the approvals (APPROVALS), dates and gas inputs are typed, and Revoke only marks rows in local state. In your app read approvals from your indexer, send one approve call with a zero allowance per row (or batch them through a wallet that supports it), and mark a row revoked when its transaction confirms.
Why do revoked rows stay in the table?
So nothing jumps under your pointer and the work can be checked. A revoked row is dimmed, says Revoked in this demo and offers Undo, and the Revoked filter lists them, which is also the empty state you can reach before revoking anything.