Skip to content

Commit

Permalink
feat(wallet-dashboard): refactor StakedInfo and Validator components …
Browse files Browse the repository at this point in the history
…to use core hooks and clean up imports
  • Loading branch information
panteleymonchuk committed Nov 14, 2024
1 parent c1341dc commit c4329f4
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
useGetDelegatedStake,
DELEGATED_STAKES_QUERY_REFETCH_INTERVAL,
DELEGATED_STAKES_QUERY_STALE_TIME,
useValidatorInfo,
} from '@iota/core';
import { KeyValueInfo, Panel, TooltipPosition } from '@iota/apps-ui-kit';
import { useValidatorInfo } from '@/hooks';

export function StakedInfo({
validatorAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ interface UnstakeDialogProps {
export function UnstakeView({
extendedStake,
handleClose,
showActiveStatus = true,
showActiveStatus,
}: UnstakeDialogProps): JSX.Element {
const stakingReward = BigInt(extendedStake.estimatedReward ?? '').toString();
const [rewards, rewardSymbol] = useFormatCoin(stakingReward, IOTA_TYPE_ARG);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
import { ImageIcon, ImageIconSize, formatPercentageDisplay } from '@iota/core';
import { ImageIcon, ImageIconSize, formatPercentageDisplay, useValidatorInfo } from '@iota/core';
import {
Card,
CardBody,
Expand All @@ -12,7 +12,6 @@ import {
BadgeType,
} from '@iota/apps-ui-kit';
import { formatAddress } from '@iota/iota-sdk/utils';
import { useValidatorInfo } from '@/hooks';

export function Validator({
address,
Expand Down
1 change: 0 additions & 1 deletion apps/wallet-dashboard/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ export * from './useCreateSendAssetTransaction';
export * from './useGetCurrentEpochStartTimestamp';
export * from './useTimelockedUnstakeTransaction';
export * from './useExplorerLinkGetter';
export * from '@iota/core/src/hooks/stake/useValidatorInfo';
2 changes: 1 addition & 1 deletion apps/wallet/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "./configs/ts/tsconfig.dev",
"include": ["src", "configs", "tests", "../core/src/utils/stake/createValidationSchema.ts"],
"include": ["src", "configs", "tests"],
"compilerOptions": {
"noEmit": true
}
Expand Down

0 comments on commit c4329f4

Please sign in to comment.