mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
delete duplicated types
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { ApiKeys } from 'pages/api/types/account';
|
||||
import type { ApiKeys } from 'types/api/account';
|
||||
|
||||
import handler from 'pages/api/utils/handler';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AddressTags } from 'pages/api/types/account';
|
||||
import type { AddressTags } from 'types/api/account';
|
||||
|
||||
import handler from 'pages/api/utils/handler';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { TransactionTags } from 'pages/api/types/account';
|
||||
import type { TransactionTags } from 'types/api/account';
|
||||
|
||||
import handler from 'pages/api/utils/handler';
|
||||
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
// FIXME: here are types of the elixir api's responses
|
||||
// and in types/api/ folder we have types of the node api's responses
|
||||
// maybe they are always the same and there is no need to keep two separate files with types
|
||||
export interface AddressTag {
|
||||
address_hash: string;
|
||||
name: string;
|
||||
id: string;
|
||||
}
|
||||
|
||||
export type AddressTags = Array<AddressTag>
|
||||
|
||||
export interface ApiKey {
|
||||
api_key: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type ApiKeys = Array<ApiKey>
|
||||
|
||||
export interface ModelError {
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface NotificationDirection {
|
||||
incoming: boolean;
|
||||
outcoming: boolean;
|
||||
}
|
||||
|
||||
export interface NotificationSettings {
|
||||
_native?: NotificationDirection;
|
||||
erc20?: NotificationDirection;
|
||||
erc7211155?: NotificationDirection;
|
||||
}
|
||||
|
||||
export interface Transaction {
|
||||
fromAddressHash?: string;
|
||||
toAddressHash?: string;
|
||||
createdContractAddressHash?: string;
|
||||
}
|
||||
|
||||
export interface TransactionTag {
|
||||
transaction_hash: string;
|
||||
name: string;
|
||||
id: string;
|
||||
}
|
||||
|
||||
export type TransactionTags = Array<TransactionTag>
|
||||
|
||||
export type Transactions = Array<Transaction>
|
||||
|
||||
export interface UserInfo {
|
||||
name?: string;
|
||||
nickname?: string;
|
||||
email?: string;
|
||||
}
|
||||
|
||||
export interface WatchlistAddress {
|
||||
addressHash: string;
|
||||
addressName: string;
|
||||
addressBalance: number;
|
||||
coinName: string;
|
||||
exchangeRate?: number;
|
||||
notificationSettings: NotificationSettings;
|
||||
}
|
||||
|
||||
export interface WatchlistAddressNew {
|
||||
addressName: string;
|
||||
notificationSettings: NotificationSettings;
|
||||
}
|
||||
|
||||
export type WatchlistAddresses = Array<WatchlistAddress>
|
||||
@@ -7,8 +7,8 @@ export interface AddressTag {
|
||||
export type AddressTags = Array<AddressTag>
|
||||
|
||||
export interface ApiKey {
|
||||
apiKey: string;
|
||||
apiKeyName: string;
|
||||
api_key: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type ApiKeys = Array<ApiKey>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
// here will be types if some back-end models are needed to be extended
|
||||
// in order to fit the client's needs
|
||||
export {};
|
||||
@@ -10,7 +10,7 @@ import React, { useCallback, useEffect } from 'react';
|
||||
import type { SubmitHandler, ControllerRenderProps } from 'react-hook-form';
|
||||
import { useForm, Controller } from 'react-hook-form';
|
||||
|
||||
import type { ApiKey, ApiKeys } from 'pages/api/types/account';
|
||||
import type { ApiKey, ApiKeys } from 'types/api/account';
|
||||
|
||||
type Props = {
|
||||
data?: ApiKey;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
import type { ApiKey } from 'pages/api/types/account';
|
||||
import type { ApiKey } from 'types/api/account';
|
||||
|
||||
import FormModal from 'ui/shared/FormModal';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from '@chakra-ui/react';
|
||||
import React from 'react';
|
||||
|
||||
import type { ApiKeys, ApiKey } from 'pages/api/types/account';
|
||||
import type { ApiKeys, ApiKey } from 'types/api/account';
|
||||
|
||||
import ApiKeyTableItem from './ApiKeyTableItem';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
} from '@chakra-ui/react';
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
import type { ApiKey } from 'pages/api/types/account';
|
||||
import type { ApiKey } from 'types/api/account';
|
||||
|
||||
import CopyToClipboard from 'ui/shared/CopyToClipboard';
|
||||
import DeleteButton from 'ui/shared/DeleteButton';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Text } from '@chakra-ui/react';
|
||||
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
import type { ApiKey, ApiKeys } from 'pages/api/types/account';
|
||||
import type { ApiKey, ApiKeys } from 'types/api/account';
|
||||
|
||||
import DeleteModal from 'ui/shared/DeleteModal';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Box, Button, HStack, Link, Text, Spinner, useDisclosure } from '@chakra
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
|
||||
import type { ApiKey, ApiKeys } from 'pages/api/types/account';
|
||||
import type { ApiKey, ApiKeys } from 'types/api/account';
|
||||
|
||||
import { space } from 'lib/html-entities';
|
||||
import ApiKeyModal from 'ui/apiKey/ApiKeyModal/ApiKeyModal';
|
||||
|
||||
Reference in New Issue
Block a user