From 9e2fc5790ee7fd7d5d3274ecc1c0a8c0a0151dc7 Mon Sep 17 00:00:00 2001 From: zhangyouxin Date: Mon, 9 Oct 2023 00:38:10 +0800 Subject: [PATCH] chore: use new strategy of fetcher --- .../TransactionComp/TransactionLite/TransactionLite.tsx | 2 +- src/services/ExplorerService/fetcher.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Transaction/TransactionComp/TransactionLite/TransactionLite.tsx b/src/pages/Transaction/TransactionComp/TransactionLite/TransactionLite.tsx index 9e8e5d85e..0a37ae944 100644 --- a/src/pages/Transaction/TransactionComp/TransactionLite/TransactionLite.tsx +++ b/src/pages/Transaction/TransactionComp/TransactionLite/TransactionLite.tsx @@ -5,12 +5,12 @@ import { useParams } from 'react-router-dom' import BigNumber from 'bignumber.js' import styles from './TransactionLite.module.scss' import DecimalCapacity from '../../../../components/DecimalCapacity' -import { fetchTransactionLiteDetailsByHash } from '../../../../service/http/fetcher' import { parseCKBAmount, localeNumberString } from '../../../../utils/number' import { shannonToCkb } from '../../../../utils/util' import { Addr } from '../../TransactionCell' import { defaultTransactionLiteDetails } from '../../state' import { TransactionBadge } from './TransactionBadge' +import { fetchTransactionLiteDetailsByHash } from '../../../../services/ExplorerService/fetcher' export const TransactionCompLite: FC<{ isCellbase: boolean }> = ({ isCellbase }) => { const { hash: txHash } = useParams<{ hash: string }>() diff --git a/src/services/ExplorerService/fetcher.ts b/src/services/ExplorerService/fetcher.ts index 198910427..9d0b07c56 100644 --- a/src/services/ExplorerService/fetcher.ts +++ b/src/services/ExplorerService/fetcher.ts @@ -52,7 +52,7 @@ export const fetchTransactionByHash = (hash: string) => .then((res: AxiosResponse) => toCamelcase>(res.data.data)) export const fetchTransactionLiteDetailsByHash = (hash: string) => - v2AxiosIns + requesterV2 .get(`ckb_transactions/${hash}/details`) .then((res: AxiosResponse) => toCamelcase>(res.data))