|
|
@ -1,5 +1,4 @@ |
|
|
|
import { useSelector } from 'react-redux'; |
|
|
|
import { useDispatch, useSelector } from 'react-redux'; |
|
|
|
import { captureException } from '@sentry/browser'; |
|
|
|
|
|
|
|
import { getKnownMethodData } from '../selectors/selectors'; |
|
|
|
import { getKnownMethodData } from '../selectors/selectors'; |
|
|
|
import { |
|
|
|
import { |
|
|
|
getStatusKey, |
|
|
|
getStatusKey, |
|
|
@ -23,6 +22,7 @@ import { |
|
|
|
TRANSACTION_GROUP_CATEGORIES, |
|
|
|
TRANSACTION_GROUP_CATEGORIES, |
|
|
|
TRANSACTION_STATUSES, |
|
|
|
TRANSACTION_STATUSES, |
|
|
|
} from '../../shared/constants/transaction'; |
|
|
|
} from '../../shared/constants/transaction'; |
|
|
|
|
|
|
|
import { captureSingleException } from '../store/actions'; |
|
|
|
import { useI18nContext } from './useI18nContext'; |
|
|
|
import { useI18nContext } from './useI18nContext'; |
|
|
|
import { useTokenFiatAmount } from './useTokenFiatAmount'; |
|
|
|
import { useTokenFiatAmount } from './useTokenFiatAmount'; |
|
|
|
import { useUserPreferencedCurrency } from './useUserPreferencedCurrency'; |
|
|
|
import { useUserPreferencedCurrency } from './useUserPreferencedCurrency'; |
|
|
@ -58,6 +58,7 @@ import { useCurrentAsset } from './useCurrentAsset'; |
|
|
|
export function useTransactionDisplayData(transactionGroup) { |
|
|
|
export function useTransactionDisplayData(transactionGroup) { |
|
|
|
// To determine which primary currency to display for swaps transactions we need to be aware
|
|
|
|
// To determine which primary currency to display for swaps transactions we need to be aware
|
|
|
|
// of which asset, if any, we are viewing at present
|
|
|
|
// of which asset, if any, we are viewing at present
|
|
|
|
|
|
|
|
const dispatch = useDispatch(); |
|
|
|
const currentAsset = useCurrentAsset(); |
|
|
|
const currentAsset = useCurrentAsset(); |
|
|
|
const knownTokens = useSelector(getTokens); |
|
|
|
const knownTokens = useSelector(getTokens); |
|
|
|
const t = useI18nContext(); |
|
|
|
const t = useI18nContext(); |
|
|
@ -222,8 +223,8 @@ export function useTransactionDisplayData(transactionGroup) { |
|
|
|
title = t('send'); |
|
|
|
title = t('send'); |
|
|
|
subtitle = t('toAddress', [shortenAddress(recipientAddress)]); |
|
|
|
subtitle = t('toAddress', [shortenAddress(recipientAddress)]); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
captureException( |
|
|
|
dispatch( |
|
|
|
Error( |
|
|
|
captureSingleException( |
|
|
|
`useTransactionDisplayData does not recognize transaction type. Type received is: ${type}`, |
|
|
|
`useTransactionDisplayData does not recognize transaction type. Type received is: ${type}`, |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|