Skip to content

Commit

Permalink
chore: update imports to source 'errors' from '@hey/data/errors' acro…
Browse files Browse the repository at this point in the history
…ss multiple files
  • Loading branch information
bigint committed Sep 5, 2024
1 parent b007139 commit fc3bb0f
Show file tree
Hide file tree
Showing 29 changed files with 27 additions and 29 deletions.
2 changes: 1 addition & 1 deletion apps/api/src/helpers/middlewares/validateIsStaff.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { NextFunction, Request, Response } from 'express';

import { Errors } from '@hey/data';
import { APP_NAME } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import parseJwt from '@hey/helpers/parseJwt';
import axios from 'axios';

Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/helpers/middlewares/validateLensAccount.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { NextFunction, Request, Response } from 'express';

import { Errors } from '@hey/data';
import { Errors } from '@hey/data/errors';
import lensPg from '@hey/db/lensPg';
import { getRedis, setRedis } from '@hey/db/redisClient';
import parseJwt from '@hey/helpers/parseJwt';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/helpers/middlewares/validateSecret.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { NextFunction, Request, Response } from 'express';

import { Errors } from '@hey/data';
import { Errors } from '@hey/data/errors';

import catchedError from '../catchedError';

Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/helpers/responses.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Response } from 'express';

import { Errors } from '@hey/data';
import { Errors } from '@hey/data/errors';

export const invalidBody = (response: Response) => {
return response
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/personal/swapToMatic.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Request, Response } from 'express';
import type { Address } from 'viem';

import { Errors } from '@hey/data';
import { Errors } from '@hey/data/errors';
import { POLYGON_RPCS } from '@hey/data/rpcs';
import logger from '@hey/helpers/logger';
import catchedError from 'src/helpers/catchedError';
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/personal/withdrawRewards.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Request, Response } from 'express';
import type { Address } from 'viem';

import { Errors } from '@hey/data';
import { Errors } from '@hey/data/errors';
import logger from '@hey/helpers/logger';
import catchedError from 'src/helpers/catchedError';
import validateSecret from 'src/helpers/middlewares/validateSecret';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import type { FC } from 'react';
import CollectAction from '@components/Publication/OpenAction/CollectModule/CollectAction';
import Loader from '@components/Shared/Loader';
import { signatureFont } from '@helpers/fonts';
import { Errors } from '@hey/data';
import {
APP_NAME,
HEY_MEMBERSHIP_NFT_PUBLICATION_ID
} from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { usePublicationQuery } from '@hey/lens';
import { ErrorMessage, H3 } from '@hey/ui';
import cn from '@hey/ui/cn';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Pro/ExtendButton.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { FC } from 'react';

import errorToast from '@helpers/errorToast';
import { Errors } from '@hey/data';
import { MONTHLY_PRO_PRICE, PRO_EOA_ADDRESS } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { Button } from '@hey/ui';
import { useEffect, useState } from 'react';
import toast from 'react-hot-toast';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { FC } from 'react';

import { MenuItem } from '@headlessui/react';
import { ChatBubbleBottomCenterTextIcon } from '@heroicons/react/24/outline';
import { Errors } from '@hey/data';
import { Errors } from '@hey/data/errors';
import { TriStateValue } from '@hey/lens';
import cn from '@hey/ui/cn';
import toast from 'react-hot-toast';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Publication/Actions/Tip/Action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import errorToast from '@helpers/errorToast';
import { getAuthApiHeaders } from '@helpers/getAuthApiHeaders';
import { Leafwatch } from '@helpers/leafwatch';
import { HeyTipping } from '@hey/abis';
import { Errors } from '@hey/data';
import {
APP_NAME,
DEFAULT_COLLECT_TOKEN,
Expand All @@ -16,6 +15,7 @@ import {
MAX_UINT256,
STATIC_IMAGES_URL
} from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { PUBLICATION } from '@hey/data/tracking';
import formatAddress from '@hey/helpers/formatAddress';
import { Button, H6, HelpTooltip, Input, Select, Spinner } from '@hey/ui';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import getCurrentSession from '@helpers/getCurrentSession';
import { Leafwatch } from '@helpers/leafwatch';
import hasOptimisticallyCollected from '@helpers/optimistic/hasOptimisticallyCollected';
import { LensHub } from '@hey/abis';
import { Errors } from '@hey/data';
import { LENS_HUB } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { PUBLICATION } from '@hey/data/tracking';
import checkDispatcherPermissions from '@hey/helpers/checkDispatcherPermissions';
import getCollectModuleData from '@hey/helpers/getCollectModuleData';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Settings/Export/Notifications.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from 'react';

import { Leafwatch } from '@helpers/leafwatch';
import { Errors } from '@hey/data';
import { Errors } from '@hey/data/errors';
import { SETTINGS } from '@hey/data/tracking';
import downloadJson from '@hey/helpers/downloadJson';
import { useNotificationsLazyQuery } from '@hey/lens';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Settings/Handles/LinkHandle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
PlusCircleIcon
} from '@heroicons/react/24/outline';
import { TokenHandleRegistry } from '@hey/abis';
import { Errors } from '@hey/data';
import { TOKEN_HANDLE_REGISTRY } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { SETTINGS } from '@hey/data/tracking';
import checkDispatcherPermissions from '@hey/helpers/checkDispatcherPermissions';
import getSignature from '@hey/helpers/getSignature';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Settings/Handles/UnlinkHandle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import errorToast from '@helpers/errorToast';
import { Leafwatch } from '@helpers/leafwatch';
import { MinusCircleIcon } from '@heroicons/react/24/outline';
import { TokenHandleRegistry } from '@hey/abis';
import { Errors } from '@hey/data';
import { TOKEN_HANDLE_REGISTRY } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { SETTINGS } from '@hey/data/tracking';
import checkDispatcherPermissions from '@hey/helpers/checkDispatcherPermissions';
import getSignature from '@hey/helpers/getSignature';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Settings/Interests/Interests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Leafwatch } from '@helpers/leafwatch';
import sanitizeProfileInterests from '@helpers/sanitizeProfileInterests';
import { PlusCircleIcon } from '@heroicons/react/24/outline';
import { CheckCircleIcon } from '@heroicons/react/24/solid';
import { Errors } from '@hey/data';
import { Errors } from '@hey/data/errors';
import { SETTINGS } from '@hey/data/tracking';
import {
useAddProfileInterestsMutation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import errorToast from '@helpers/errorToast';
import { Leafwatch } from '@helpers/leafwatch';
import { CheckCircleIcon, XMarkIcon } from '@heroicons/react/24/outline';
import { LensHub } from '@hey/abis';
import { Errors } from '@hey/data';
import { LENS_HUB } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { SETTINGS } from '@hey/data/tracking';
import checkDispatcherPermissions from '@hey/helpers/checkDispatcherPermissions';
import getSignature from '@hey/helpers/getSignature';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import errorToast from '@helpers/errorToast';
import { Leafwatch } from '@helpers/leafwatch';
import { MinusCircleIcon, UserCircleIcon } from '@heroicons/react/24/outline';
import { LensHub } from '@hey/abis';
import { Errors } from '@hey/data';
import { LENS_HUB } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { SETTINGS } from '@hey/data/tracking';
import checkDispatcherPermissions from '@hey/helpers/checkDispatcherPermissions';
import getSignature from '@hey/helpers/getSignature';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Settings/Sessions/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Loader from '@components/Shared/Loader';
import errorToast from '@helpers/errorToast';
import { Leafwatch } from '@helpers/leafwatch';
import { ComputerDesktopIcon, GlobeAltIcon } from '@heroicons/react/24/outline';
import { Errors } from '@hey/data';
import { Errors } from '@hey/data/errors';
import { SETTINGS } from '@hey/data/tracking';
import formatDate from '@hey/helpers/datetime/formatDate';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type { FC } from 'react';
import errorToast from '@helpers/errorToast';
import { Leafwatch } from '@helpers/leafwatch';
import { LensHub } from '@hey/abis';
import { Errors } from '@hey/data';
import { LENS_HUB } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { PROFILE } from '@hey/data/tracking';
import checkDispatcherPermissions from '@hey/helpers/checkDispatcherPermissions';
import getProfile from '@hey/helpers/getProfile';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Shared/Alert/DeletePublication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { FC } from 'react';

import errorToast from '@helpers/errorToast';
import { Leafwatch } from '@helpers/leafwatch';
import { Errors } from '@hey/data';
import { Errors } from '@hey/data/errors';
import { PUBLICATION } from '@hey/data/tracking';
import { useHidePublicationMutation } from '@hey/lens';
import { Alert } from '@hey/ui';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Shared/Auth/Signup/Success.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { FC } from 'react';

import errorToast from '@helpers/errorToast';
import { Leafwatch } from '@helpers/leafwatch';
import { Errors } from '@hey/data';
import { STATIC_IMAGES_URL } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { AUTH } from '@hey/data/tracking';
import { useAuthenticateMutation, useChallengeLazyQuery } from '@hey/lens';
import { Button, H4, Spinner } from '@hey/ui';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import errorToast from '@helpers/errorToast';
import { Leafwatch } from '@helpers/leafwatch';
import { PencilSquareIcon } from '@heroicons/react/24/outline';
import { CheckCircleIcon } from '@heroicons/react/24/solid';
import { Errors } from '@hey/data';
import { Errors } from '@hey/data/errors';
import { PROFILE } from '@hey/data/tracking';
import stopEventPropagation from '@hey/helpers/stopEventPropagation';
import { useReportProfileMutation } from '@hey/lens';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import errorToast from '@helpers/errorToast';
import { Leafwatch } from '@helpers/leafwatch';
import { PencilSquareIcon } from '@heroicons/react/24/outline';
import { CheckCircleIcon } from '@heroicons/react/24/solid';
import { Errors } from '@hey/data';
import { Errors } from '@hey/data/errors';
import { PUBLICATION } from '@hey/data/tracking';
import stopEventPropagation from '@hey/helpers/stopEventPropagation';
import { useReportPublicationMutation } from '@hey/lens';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import type { FC } from 'react';
import errorToast from '@helpers/errorToast';
import { getAuthApiHeadersWithAccessToken } from '@helpers/getAuthApiHeaders';
import { CheckCircleIcon } from '@heroicons/react/24/solid';
import { Errors } from '@hey/data';
import { HEY_API_URL } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import formatAddress from '@hey/helpers/formatAddress';
import getNftChainId from '@hey/helpers/getNftChainId';
import getNftChainInfo from '@hey/helpers/getNftChainInfo';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Shared/Oembed/Frames/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import type { FC } from 'react';
import { getAuthApiHeadersWithAccessToken } from '@helpers/getAuthApiHeaders';
import { Leafwatch } from '@helpers/leafwatch';
import { BoltIcon, LinkIcon } from '@heroicons/react/24/outline';
import { Errors } from '@hey/data';
import { HEY_API_URL } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { PUBLICATION } from '@hey/data/tracking';
import stopEventPropagation from '@hey/helpers/stopEventPropagation';
import { Button, Card, Input, Modal } from '@hey/ui';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Shared/Profile/Follow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type { FC } from 'react';
import errorToast from '@helpers/errorToast';
import { Leafwatch } from '@helpers/leafwatch';
import { LensHub } from '@hey/abis';
import { Errors } from '@hey/data';
import { LENS_HUB } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { PROFILE } from '@hey/data/tracking';
import checkDispatcherPermissions from '@hey/helpers/checkDispatcherPermissions';
import getSignature from '@hey/helpers/getSignature';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Shared/Profile/Unfollow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type { FC } from 'react';
import errorToast from '@helpers/errorToast';
import { Leafwatch } from '@helpers/leafwatch';
import { LensHub } from '@hey/abis';
import { Errors } from '@hey/data';
import { LENS_HUB } from '@hey/data/constants';
import { Errors } from '@hey/data/errors';
import { PROFILE } from '@hey/data/tracking';
import checkDispatcherPermissions from '@hey/helpers/checkDispatcherPermissions';
import getSignature from '@hey/helpers/getSignature';
Expand Down
1 change: 0 additions & 1 deletion packages/data/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.0.0",
"private": true,
"license": "AGPL-3.0",
"main": "index.ts",
"scripts": {
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --fix --ext .ts",
Expand Down

0 comments on commit fc3bb0f

Please sign in to comment.