Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
Fix Operation details currencyId for NFT metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
lambertkevin committed Mar 30, 2022
1 parent 520596e commit d17caf1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/screens/OperationDetails/Content.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@ import uniq from "lodash/uniq";
import { useSelector } from "react-redux";
import { Trans, useTranslation } from "react-i18next";
import { useNavigation, useTheme } from "@react-navigation/native";
import type {
import {
Account,
Operation,
AccountLike,
} from "@ledgerhq/live-common/lib/types";
import {
getOperationAmountNumber,
isConfirmedOperation,
getOperationConfirmationDisplayableNumber,
} from "@ledgerhq/live-common/lib/operation";
import {
decodeAccountId,
getMainAccount,
getAccountCurrency,
getAccountUnit,
getAccountName,
} from "@ledgerhq/live-common/lib/account";
import {
getOperationAmountNumber,
isConfirmedOperation,
getOperationConfirmationDisplayableNumber,
} from "@ledgerhq/live-common/lib/operation";
import { useNftMetadata } from "@ledgerhq/live-common/lib/nft";
import { NavigatorName, ScreenName } from "../../const";
import LText from "../../components/LText";
Expand Down Expand Up @@ -76,10 +77,11 @@ export default function Content({
const navigation = useNavigation();
const { t } = useTranslation();
const [isModalOpened, setIsModalOpened] = useState(false);
const { currencyId } = decodeAccountId(operation.accountId);
const { status, metadata } = useNftMetadata(
operation.contract,
operation.tokenId,
operation.currency.id,
currencyId,
);

const onPress = useCallback(() => {
Expand Down

0 comments on commit d17caf1

Please sign in to comment.