Skip to content

Commit 3f80bdb

Browse files
committed
chore: remove unused eslint-disable comments from vault-related components and update button variants for consistency
1 parent 3d96b2b commit 3f80bdb

File tree

12 files changed

+13
-36
lines changed

12 files changed

+13
-36
lines changed

apps/hub/src/app/_components/stake/action-status-dialog.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/no-unresolved */
21
import * as Dialog from '@radix-ui/react-dialog'
32
import { CloseIcon } from '@status-im/icons/20'
43
import { match } from 'ts-pattern'

apps/hub/src/app/_components/stake/compound-status-content.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/no-unresolved */
21
import * as Dialog from '@radix-ui/react-dialog'
32
import { InfoIcon } from '@status-im/icons/16'
43
import { formatUnits } from 'viem'

apps/hub/src/app/_components/stake/promo-modal.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/no-unresolved */
21
'use client'
32

43
import * as Dialog from '@radix-ui/react-dialog'
@@ -79,7 +78,6 @@ const PromoModal = (props: Props) => {
7978

8079
<ConnectKitButton.Custom>
8180
{({ show, isConnected }) => (
82-
// @ts-expect-error - TODO: fix this
8381
<Button
8482
onClick={show}
8583
variant={isConnected ? 'secondary' : 'primary'}

apps/hub/src/app/_components/vault-select.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/no-unresolved */
21
'use client'
32

43
import { useState } from 'react'

apps/hub/src/app/_components/vaults/modals/base-vault-modal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/no-unresolved */
21
'use client'
32

43
import * as Dialog from '@radix-ui/react-dialog'

apps/hub/src/app/_components/vaults/modals/lock-vault-modal/lock-vault-form.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/no-unresolved */
21
'use client'
32

43
import { useEffect, useMemo, useState } from 'react'
@@ -332,7 +331,6 @@ export function LockVaultForm(props: LockVaultFormProps) {
332331

333332
<div className="flex w-full flex-col items-start bg-[rgba(255,255,255,0.7)] backdrop-blur-[20px]">
334333
<div className="box-border flex w-full items-center justify-center gap-3 px-4 pb-4 pt-6">
335-
{/* @ts-expect-error - Button component is not typed */}
336334
<Button
337335
size="40"
338336
variant="outline"
@@ -343,7 +341,6 @@ export function LockVaultForm(props: LockVaultFormProps) {
343341
>
344342
{closeAction.label}
345343
</Button>
346-
{/* @ts-expect-error - Button component is not typed */}
347344
<Button
348345
size="40"
349346
variant="primary"

apps/hub/src/app/_components/vaults/modals/withdraw-vault-modal.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/no-unresolved */
21
'use client'
32

43
import { useCallback } from 'react'
@@ -94,10 +93,9 @@ export function WithdrawVaultModal(props: WithdrawVaultModalProps) {
9493
Your funds will sent directly to your connected wallet.
9594
</p>
9695
</div>
97-
{/* @ts-expect-error - Button component is not typed */}
9896
<Button
9997
variant="outline"
100-
size="24"
98+
size="32"
10199
className="rounded-8 px-2 py-[3px] pr-[6px] text-[13px]"
102100
>
103101
Learn more
@@ -110,7 +108,6 @@ export function WithdrawVaultModal(props: WithdrawVaultModalProps) {
110108
<div className="flex w-full flex-col items-start">
111109
<div className="box-border flex w-full items-center justify-center gap-3 px-4 pb-4 pt-6">
112110
<Dialog.Close asChild>
113-
{/* @ts-expect-error - Button component is not typed */}
114111
<Button
115112
size="40"
116113
variant="outline"
@@ -120,7 +117,6 @@ export function WithdrawVaultModal(props: WithdrawVaultModalProps) {
120117
Cancel
121118
</Button>
122119
</Dialog.Close>
123-
{/* @ts-expect-error - Button component is not typed */}
124120
<Button
125121
size="40"
126122
variant="primary"

apps/hub/src/app/_components/vaults/table-columns.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable import/no-unresolved */
2-
31
import { AlertIcon, TimeIcon } from '@status-im/icons/12'
42
import { LockedIcon, UnlockedIcon } from '@status-im/icons/20'
53
import { Button } from '@status-im/status-network/components'
@@ -237,9 +235,8 @@ export const createVaultTableColumns = ({
237235
onClose={() => setOpenModalVaultId(null)}
238236
vaultAddress={row.original.address}
239237
>
240-
{/* @ts-expect-error - Button component is not typed */}
241238
<Button
242-
variant="destructive"
239+
variant="danger"
243240
size="32"
244241
disabled={!isConnected}
245242
className="min-w-fit bg-danger-50 text-[13px] text-white-100 hover:bg-danger-60"
@@ -275,7 +272,6 @@ export const createVaultTableColumns = ({
275272
onClose={() => setOpenModalVaultId(null)}
276273
infoMessage="Boost the rate at which you receive Karma. The longer you lock your vault, the higher your boost, and the faster you accumulate Karma. You can add more SNT at any time, but withdrawing your SNT is only possible once the vault unlocks."
277274
>
278-
{/* @ts-expect-error - Button component is not typed */}
279275
<Button
280276
variant="primary"
281277
size="32"
@@ -317,7 +313,6 @@ export const createVaultTableColumns = ({
317313
: null
318314
}}
319315
>
320-
{/* @ts-expect-error - Button component is not typed */}
321316
<Button
322317
variant="primary"
323318
size="32"

apps/hub/src/app/_components/vaults/vaults-table.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/no-unresolved */
21
'use client'
32

43
import { useMemo, useState } from 'react'
@@ -157,11 +156,10 @@ export function VaultsTable() {
157156
My vaults
158157
</h2>
159158
{isConnected && (
160-
// @ts-expect-error - Button component is not typed
161159
<Button
162160
variant="outline"
163161
size="32"
164-
onClick={createVault}
162+
onClick={() => createVault()}
165163
className="w-full sm:w-auto"
166164
>
167165
<AddCircleIcon />

apps/hub/src/app/_hooks/useCompoundMultiplierPoints.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ export function useCompoundMultiplierPoints(): UseCompoundMultiplierPointsReturn
123123
}
124124

125125
// Get the current MP balance to show in the dialog
126-
const formattedAmount = formatUnits(mpBalance || 0n, SNT_TOKEN.decimals)
126+
const formattedAmount = formatUnits(
127+
mpBalance?.totalUncompounded || 0n,
128+
SNT_TOKEN.decimals
129+
)
127130

128131
sendVaultEvent({
129132
type: 'START_COMPOUND',

0 commit comments

Comments
 (0)