Skip to content

Commit

Permalink
chore: use new strategy of fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyouxin committed Oct 8, 2023
1 parent 409e0cf commit 9e2fc57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }>()
Expand Down
2 changes: 1 addition & 1 deletion src/services/ExplorerService/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const fetchTransactionByHash = (hash: string) =>
.then((res: AxiosResponse) => toCamelcase<Response.Wrapper<State.Transaction>>(res.data.data))

export const fetchTransactionLiteDetailsByHash = (hash: string) =>
v2AxiosIns
requesterV2
.get(`ckb_transactions/${hash}/details`)
.then((res: AxiosResponse) => toCamelcase<Response.Response<State.TransactionLiteDetails[]>>(res.data))

Expand Down

0 comments on commit 9e2fc57

Please sign in to comment.