Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: type error fix #280

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions ui/pages/lock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,16 @@ export default function Lock() {
})

const withdraw = useVeNationWithdrawLock()


const handleWithdraw = async () => {
try {
const result = await withdraw.writeAsync()
console.log('Withdraw successful:', result)
} catch (error) {
console.error('Withdraw failed:', error)
}
}

const approval = useMemo<ActionButtonProps['approval']>(
() => ({
token: nationToken,
Expand Down Expand Up @@ -467,7 +476,7 @@ export default function Lock() {
<div className="card-actions mt-4">
<ActionButton
className="btn btn-primary normal-case font-medium w-full"
action={withdraw}
action={handleWithdraw}
>
Withdraw
</ActionButton>
Expand Down
Loading