From 2e56b91976a78c2e52f46c562cc0ff80bb863f7b Mon Sep 17 00:00:00 2001 From: IF <139582705+infiniteflower@users.noreply.github.com> Date: Fri, 8 Nov 2024 16:39:53 -0500 Subject: [PATCH] fix: auto fix lint issues --- .../bridge-status/bridge-status-controller.test.ts | 8 +++++--- app/scripts/controllers/bridge-status/utils.ts | 6 ++++-- .../controllers/bridge-status/validators.test.ts | 2 +- app/scripts/controllers/bridge-status/validators.ts | 12 +++++++----- .../bridge-activity-item-tx-segments.tsx | 10 ++++++++-- .../transaction-details/bridge-step-description.tsx | 8 ++++++++ .../bridge/transaction-details/bridge-step-list.tsx | 12 +++++++----- 7 files changed, 40 insertions(+), 18 deletions(-) diff --git a/app/scripts/controllers/bridge-status/bridge-status-controller.test.ts b/app/scripts/controllers/bridge-status/bridge-status-controller.test.ts index 6dc2adf94919..3890f27f7f65 100644 --- a/app/scripts/controllers/bridge-status/bridge-status-controller.test.ts +++ b/app/scripts/controllers/bridge-status/bridge-status-controller.test.ts @@ -1,10 +1,12 @@ import { flushPromises } from '../../../../test/lib/timer-helpers'; import { Numeric } from '../../../../shared/modules/Numeric'; -import { StatusTypes } from '../../../../shared/types/bridge-status'; +import { + StatusTypes, + ActionTypes, + BridgeId, +} from '../../../../shared/types/bridge-status'; import BridgeStatusController from './bridge-status-controller'; import { BridgeStatusControllerMessenger } from './types'; -import { ActionTypes } from '../../../../shared/types/bridge-status'; -import { BridgeId } from '../../../../shared/types/bridge-status'; import { DEFAULT_BRIDGE_STATUS_CONTROLLER_STATE } from './constants'; import * as bridgeStatusUtils from './utils'; diff --git a/app/scripts/controllers/bridge-status/utils.ts b/app/scripts/controllers/bridge-status/utils.ts index 2c730d93ae50..323e7e2faeab 100644 --- a/app/scripts/controllers/bridge-status/utils.ts +++ b/app/scripts/controllers/bridge-status/utils.ts @@ -3,8 +3,10 @@ import { BRIDGE_CLIENT_ID, } from '../../../../shared/constants/bridge'; import fetchWithCache from '../../../../shared/lib/fetch-with-cache'; -import { StatusResponse } from '../../../../shared/types/bridge-status'; -import { StatusRequest } from '../../../../shared/types/bridge-status'; +import { + StatusResponse, + StatusRequest, +} from '../../../../shared/types/bridge-status'; import { validateResponse, validators } from './validators'; const CLIENT_ID_HEADER = { 'X-Client-Id': BRIDGE_CLIENT_ID }; diff --git a/app/scripts/controllers/bridge-status/validators.test.ts b/app/scripts/controllers/bridge-status/validators.test.ts index 73d9d2bfb1ad..18ca81d7a5b2 100644 --- a/app/scripts/controllers/bridge-status/validators.test.ts +++ b/app/scripts/controllers/bridge-status/validators.test.ts @@ -1,5 +1,5 @@ -import { validateResponse, validators } from './validators'; import { StatusResponse } from '../../../../shared/types/bridge-status'; +import { validateResponse, validators } from './validators'; const BridgeTxStatusResponses = { STATUS_PENDING_VALID: { diff --git a/app/scripts/controllers/bridge-status/validators.ts b/app/scripts/controllers/bridge-status/validators.ts index 5cf11f53c1e3..69e788025b01 100644 --- a/app/scripts/controllers/bridge-status/validators.ts +++ b/app/scripts/controllers/bridge-status/validators.ts @@ -1,10 +1,12 @@ import { validHex, validateData } from '../../../../shared/lib/swaps-utils'; import { isValidHexAddress } from '../../../../shared/modules/hexstring-utils'; -import { BridgeId } from '../../../../shared/types/bridge-status'; -import { DestChainStatus } from '../../../../shared/types/bridge-status'; -import { SrcChainStatus } from '../../../../shared/types/bridge-status'; -import { Asset } from '../../../../shared/types/bridge-status'; -import { StatusTypes } from '../../../../shared/types/bridge-status'; +import { + BridgeId, + DestChainStatus, + SrcChainStatus, + Asset, + StatusTypes, +} from '../../../../shared/types/bridge-status'; import { BRIDGE_STATUS_BASE_URL } from './utils'; type Validator = { diff --git a/ui/pages/bridge/transaction-details/bridge-activity-item-tx-segments.tsx b/ui/pages/bridge/transaction-details/bridge-activity-item-tx-segments.tsx index 781ef76eaf03..5712bc32c7e5 100644 --- a/ui/pages/bridge/transaction-details/bridge-activity-item-tx-segments.tsx +++ b/ui/pages/bridge/transaction-details/bridge-activity-item-tx-segments.tsx @@ -1,6 +1,12 @@ import React from 'react'; -import { BridgeHistoryItem } from '../../../../shared/types/bridge-status'; -import { StatusTypes } from '../../../../shared/types/bridge-status'; +import { + TransactionMeta, + TransactionStatus, +} from '@metamask/transaction-controller'; +import { + BridgeHistoryItem, + StatusTypes, +} from '../../../../shared/types/bridge-status'; import { UseBridgeDataProps } from '../utils/useBridgeData'; import { Box, Text } from '../../../components/component-library'; import { diff --git a/ui/pages/bridge/transaction-details/bridge-step-description.tsx b/ui/pages/bridge/transaction-details/bridge-step-description.tsx index 98a2781820b6..75660d85d026 100644 --- a/ui/pages/bridge/transaction-details/bridge-step-description.tsx +++ b/ui/pages/bridge/transaction-details/bridge-step-description.tsx @@ -11,6 +11,14 @@ import { TransactionMeta, TransactionStatus, } from '@metamask/transaction-controller'; +import { + BridgeHistoryItem, + Step, + ActionTypes, + StatusTypes, +} from '../../../../shared/types/bridge-status'; +import { Box, Text } from '../../../components/component-library'; +import { Numeric } from '../../../../shared/modules/Numeric'; import { AlignItems, Display, diff --git a/ui/pages/bridge/transaction-details/bridge-step-list.tsx b/ui/pages/bridge/transaction-details/bridge-step-list.tsx index 8581eb22591c..b715c29e1f0e 100644 --- a/ui/pages/bridge/transaction-details/bridge-step-list.tsx +++ b/ui/pages/bridge/transaction-details/bridge-step-list.tsx @@ -1,15 +1,17 @@ import React from 'react'; import { NetworkConfiguration } from '@metamask/network-controller'; import { TransactionMeta } from '@metamask/transaction-controller'; +import { Hex } from '@metamask/utils'; import { Box } from '../../../components/component-library'; -import { BridgeHistoryItem } from '../../../../shared/types/bridge-status'; -import { StatusTypes } from '../../../../shared/types/bridge-status'; +import { + BridgeHistoryItem, + StatusTypes, +} from '../../../../shared/types/bridge-status'; +import { formatDate } from '../../../helpers/utils/util'; import BridgeStepDescription, { getStepStatus, } from './bridge-step-description'; import StepProgressBarItem from './step-progress-bar-item'; -import { formatDate } from '../../../helpers/utils/util'; -import { Hex } from '@metamask/utils'; const getTime = ( index: number, @@ -37,7 +39,7 @@ export default function BridgeStepList({ srcChainTxMeta, networkConfigurationsByChainId, }: BridgeStepsProps) { - const steps = bridgeHistoryItem.quote.steps; + const { steps } = bridgeHistoryItem.quote; const stepStatuses = steps.map((step) => getStepStatus(bridgeHistoryItem, step, srcChainTxMeta), );