@@ -13,6 +13,7 @@ import type {
1313import TokenPair from '@ui/components/TokenPair' ;
1414import { pools } from '@ui/constants' ;
1515import { useVeIONContext } from '@ui/context/VeIonContext' ;
16+ import { useVeIONVote } from '@ui/hooks/veion/useVeIONVote' ;
1617import type { MyVeionData } from '@ui/types/veION' ;
1718
1819import ExtendVeion from './ExtendVeion' ;
@@ -32,8 +33,10 @@ function MyVeionTable() {
3233 const router = useRouter ( ) ;
3334 const {
3435 setSelectedManagePosition,
35- locks : { myLocks, isLoading }
36+ locks : { myLocks, isLoading } ,
37+ currentChain
3638 } = useVeIONContext ( ) ;
39+ const { handleReset, isResetting } = useVeIONVote ( currentChain ) ;
3740
3841 const hasLockExpired = ( lockExpiryDate : string , isPermanent : boolean ) => {
3942 if ( isPermanent ) return false ;
@@ -134,6 +137,17 @@ function MyVeionTable() {
134137 data . lockExpires . isPermanent
135138 ) ;
136139
140+ const handleResetClick = async ( ) => {
141+ try {
142+ await switchChain ( {
143+ chainId : data . chainId
144+ } ) ;
145+ await handleReset ( data . id ) ;
146+ } catch ( error ) {
147+ console . error ( 'Reset failed:' , error ) ;
148+ }
149+ } ;
150+
137151 return (
138152 < div className = "flex gap-2 w-full" >
139153 { /* {isExpired ? (
@@ -178,6 +192,14 @@ function MyVeionTable() {
178192 bg = "bg-white/10"
179193 className = "bg-accent"
180194 />
195+ < ActionButton
196+ half
197+ action = { handleResetClick }
198+ label = { isResetting ? 'Resetting...' : 'Reset' }
199+ bg = "bg-white/10"
200+ className = "bg-red-500 hover:bg-red-600 text-white"
201+ disabled = { isResetting }
202+ />
181203 </ >
182204 { /* )} */ }
183205 </ div >
0 commit comments