Skip to content

Commit

Permalink
fix: auto fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
infiniteflower committed Nov 8, 2024
1 parent 5989b2a commit 2e56b91
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
6 changes: 4 additions & 2 deletions app/scripts/controllers/bridge-status/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/controllers/bridge-status/validators.test.ts
Original file line number Diff line number Diff line change
@@ -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: {
Expand Down
12 changes: 7 additions & 5 deletions app/scripts/controllers/bridge-status/validators.ts
Original file line number Diff line number Diff line change
@@ -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<ExpectedResponse, DataToValidate> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 7 additions & 5 deletions ui/pages/bridge/transaction-details/bridge-step-list.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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),
);
Expand Down

0 comments on commit 2e56b91

Please sign in to comment.