diff --git a/package.json b/package.json index e9f62f0e94..2b1c9f6b38 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@ledgerhq/hw-transport-http": "6.26.0", "@ledgerhq/hw-transport-node-hid-singleton": "6.26.0", "@ledgerhq/ledger-core": "6.14.5", - "@ledgerhq/live-common": "https://github.com/LedgerHQ/ledger-live-common.git#develop", + "@ledgerhq/live-common": "https://github.com/LedgerHQ/ledger-live-common.git#1effe19c902a37475d858ef5bb82ff9724ccf7f6", "@ledgerhq/logs": "6.10.0", "@ledgerhq/react-ui": "^0.7.4", "@open-wc/webpack-import-meta-loader": "^0.4.7", diff --git a/src/helpers/nftLinksFactory.js b/src/helpers/nftLinksFactory.js new file mode 100644 index 0000000000..21a9e41fc8 --- /dev/null +++ b/src/helpers/nftLinksFactory.js @@ -0,0 +1,74 @@ +import IconOpensea from "~/renderer/icons/Opensea"; +import IconRarible from "~/renderer/icons/Rarible"; +import IconGlobe from "~/renderer/icons/Globe"; +import { openURL } from "~/renderer/linking"; + +const linksPerCurrency = { + ethereum: (t, links) => [ + links?.opensea && { + key: "opensea", + id: "opensea", + label: t("NFT.viewer.actions.open", { viewer: "Opensea.io" }), + Icon: IconOpensea, + type: "external", + callback: () => openURL(links.opensea), + }, + links?.rarible && { + key: "rarible", + id: "rarible", + label: t("NFT.viewer.actions.open", { viewer: "Rarible" }), + Icon: IconRarible, + type: "external", + callback: () => openURL(links.rarible), + }, + { + key: "sep2", + id: "sep2", + type: "separator", + label: "", + }, + links?.etherscan && { + key: "etherscan", + id: "etherscan", + label: t("NFT.viewer.actions.open", { viewer: "Explorer" }), + Icon: IconGlobe, + type: "external", + callback: () => openURL(links.etherscan), + }, + ], + polygon: (t, links) => [ + links?.opensea && { + key: "opensea", + id: "opensea", + label: t("NFT.viewer.actions.open", { viewer: "Opensea.io" }), + Icon: IconOpensea, + type: "external", + callback: () => openURL(links.opensea), + }, + links?.rarible && { + key: "rarible", + id: "rarible", + label: t("NFT.viewer.actions.open", { viewer: "Rarible" }), + Icon: IconRarible, + type: "external", + callback: () => openURL(links.rarible), + }, + { + key: "sep2", + id: "sep2", + type: "separator", + label: "", + }, + links?.polygonscan && { + key: "polygonscan", + id: "polygonscan", + label: t("NFT.viewer.actions.open", { viewer: "Explorer" }), + Icon: IconGlobe, + type: "external", + callback: () => openURL(links.polygonscan), + }, + ], +}; + +export default (currencyId, t, links) => + linksPerCurrency?.[currencyId]?.(t, links).filter(x => x) || []; diff --git a/src/renderer/bridge/proxy.js b/src/renderer/bridge/proxy.js index 835e071353..f4dc4793d3 100644 --- a/src/renderer/bridge/proxy.js +++ b/src/renderer/bridge/proxy.js @@ -51,6 +51,7 @@ export const getCurrencyBridge = (currency: CryptoCurrency): CurrencyBridge => { hydrate: value => bridgeImpl.getCurrencyBridge(currency).hydrate(value, currency), scanAccounts, + nftMetadataResolver: bridgeImpl.getCurrencyBridge(currency).nftMetadataResolver, }; if (getPreloadStrategy) { diff --git a/src/renderer/components/Breadcrumb/NFTCrumb.js b/src/renderer/components/Breadcrumb/NFTCrumb.js index 977f49b421..1b465836c0 100644 --- a/src/renderer/components/Breadcrumb/NFTCrumb.js +++ b/src/renderer/components/Breadcrumb/NFTCrumb.js @@ -1,5 +1,5 @@ // @flow -import React, { useCallback, useMemo } from "react"; +import React, { useCallback, useMemo, memo } from "react"; import { useHistory, useParams } from "react-router-dom"; import { useSelector } from "react-redux"; import { nftsByCollections } from "@ledgerhq/live-common/lib/nft"; @@ -13,6 +13,7 @@ import IconAngleUp from "~/renderer/icons/AngleUp"; import { Separator, Item, TextLink, AngleDown, Check } from "./common"; import { setTrackingSource } from "~/renderer/analytics/TrackPage"; import CollectionName from "~/renderer/screens/nft/CollectionName"; +import type { ProtoNFT } from "@ledgerhq/live-common/lib/nft"; const LabelWithMeta = ({ item, @@ -21,12 +22,12 @@ const LabelWithMeta = ({ isActive: boolean, item: { label: string, - collection: { nfts: any[], contract: string, standard: string }, + content: ProtoNFT, }, }) => ( - + {isActive && ( @@ -36,23 +37,26 @@ const LabelWithMeta = ({ ); -export default function NFTCrumb() { +const NFTCrumb = () => { const history = useHistory(); const { id, collectionAddress } = useParams(); const account = useSelector(state => accountSelector(state, { accountId: id })); - const collections = nftsByCollections(account.nfts); + const collections = useMemo(() => nftsByCollections(account.nfts), [account.nfts]); const items = useMemo( () => - collections.map(collection => ({ - key: collection.contract, - label: collection.contract, - collection, + Object.entries(collections).map(([contract, nfts]: any) => ({ + key: contract, + label: contract, + content: nfts[0], })), [collections], ); - const activeItem = - items.find((item: any) => item.collection.contract === collectionAddress) || items[0]; + + const activeItem = useMemo( + () => items.find((item: any) => item.nft?.contract === collectionAddress) || items[0], + [collectionAddress, items], + ); const onCollectionSelected = useCallback( item => { @@ -91,12 +95,12 @@ export default function NFTCrumb() { renderItem={LabelWithMeta} onChange={onCollectionSelected} > - {({ isOpen, value }) => ( + {({ isOpen }) => ( @@ -109,4 +113,7 @@ export default function NFTCrumb() { ) : null} ); -} +}; + +// $FlowFixMe +export default memo(NFTCrumb); diff --git a/src/renderer/components/ContextMenu/NFTContextMenu.js b/src/renderer/components/ContextMenu/NFTContextMenu.js index 586471c462..cc8b8999cb 100644 --- a/src/renderer/components/ContextMenu/NFTContextMenu.js +++ b/src/renderer/components/ContextMenu/NFTContextMenu.js @@ -1,62 +1,34 @@ // @flow -import React from "react"; +import React, { useMemo, memo } from "react"; import { useTranslation } from "react-i18next"; import { useNftMetadata } from "@ledgerhq/live-common/lib/nft/NftMetadataProvider"; -import IconOpensea from "~/renderer/icons/Opensea"; -import IconRarible from "~/renderer/icons/Rarible"; -import IconGlobe from "~/renderer/icons/Globe"; -import { openURL } from "~/renderer/linking"; import ContextMenuItem from "./ContextMenuItem"; +import nftLinksFactory from "~/helpers/nftLinksFactory"; type Props = { contract: string, tokenId: string, + currencyId: string, leftClick?: boolean, children: any, }; -export default function NFTContextMenu({ leftClick, children, contract, tokenId }: Props) { +const NFTContextMenu = ({ leftClick, children, contract, tokenId, currencyId }: Props) => { const { t } = useTranslation(); - const { metadata } = useNftMetadata(contract, tokenId); - - const defaultLinks = { - openSea: `https://opensea.io/assets/${contract}/${tokenId}`, - rarible: `https://rarible.com/token/${contract}:${tokenId}`, - etherscan: `https://etherscan.io/token/${contract}?a=${tokenId}`, - }; - - const menuItems = [ - { - key: "opensea", - label: t("NFT.viewer.actions.open", { viewer: "Opensea.io" }), - Icon: IconOpensea, - type: "external", - callback: () => openURL(metadata?.links?.opensea || defaultLinks.openSea), - }, - { - key: "rarible", - label: t("NFT.viewer.actions.open", { viewer: "Rarible" }), - Icon: IconRarible, - type: "external", - callback: () => openURL(metadata?.links?.rarible || defaultLinks.rarible), - }, - { - key: "sep2", - type: "separator", - label: "", - }, - { - key: "etherscan", - label: t("NFT.viewer.actions.open", { viewer: "Explorer" }), - Icon: IconGlobe, - type: "external", - callback: () => openURL(metadata?.links?.etherscan || defaultLinks.etherscan), - }, - ]; + const { status, metadata } = useNftMetadata(contract, tokenId, currencyId); + const links = useMemo(() => nftLinksFactory(currencyId, t, metadata?.links), [ + currencyId, + metadata?.links, + t, + ]); + const menuItems = useMemo(() => (status === "loaded" ? links : []), [links, status]); return ( {children} ); -} +}; + +// $FlowFixMe +export default memo(NFTContextMenu); diff --git a/src/renderer/components/DropDownSelector.js b/src/renderer/components/DropDownSelector.js index fbde2612ec..a1d7052911 100644 --- a/src/renderer/components/DropDownSelector.js +++ b/src/renderer/components/DropDownSelector.js @@ -52,6 +52,7 @@ export type DropDownItemType = { key: string, label: any, disabled?: boolean, + content?: any, }; const OptionContainer = styled.div` diff --git a/src/renderer/drawers/NFTViewerDrawer/ExternalViewerButton.js b/src/renderer/drawers/NFTViewerDrawer/ExternalViewerButton.js index 569356bd8c..b8d9aa7535 100644 --- a/src/renderer/drawers/NFTViewerDrawer/ExternalViewerButton.js +++ b/src/renderer/drawers/NFTViewerDrawer/ExternalViewerButton.js @@ -1,6 +1,6 @@ // @flow -import React from "react"; +import React, { useMemo, memo } from "react"; import { useTranslation } from "react-i18next"; import styled from "styled-components"; @@ -9,16 +9,12 @@ import Button from "~/renderer/components/Button"; import DropDownSelector, { DropDownItem } from "~/renderer/components/DropDownSelector"; import IconDots from "~/renderer/icons/Dots"; import IconExternal from "~/renderer/icons/ExternalLink"; -import IconOpensea from "~/renderer/icons/Opensea"; -import IconRarible from "~/renderer/icons/Rarible"; -import IconGlobe from "~/renderer/icons/Globe"; -import { openURL } from "~/renderer/linking"; +import nftLinksFactory from "~/helpers/nftLinksFactory"; +import type { NFTMetadataResponse } from "@ledgerhq/live-common/lib/types"; import type { DropDownItemType } from "~/renderer/components/DropDownSelector"; import type { ThemedComponent } from "~/renderer/styles/StyleProvider"; -import type { NFTMetadataResponse } from "@ledgerhq/live-common/lib/types"; - const Separator: ThemedComponent<{}> = styled.div` background-color: ${p => p.theme.colors.palette.divider}; height: 1px; @@ -37,68 +33,44 @@ const Item: ThemedComponent<{ display: flex; `; -type ItemType = DropDownItemType & { - icon?: React$Element<*>, - onClick?: Function, - type?: "separator", -}; - type ExternalViewerButtonProps = { links: $PropertyType<$PropertyType, "links">, contract: string, tokenId: string, + currencyId: string, }; -export const ExternalViewerButton = ({ links, contract, tokenId }: ExternalViewerButtonProps) => { +const ExternalViewerButton = ({ + links, + contract, + tokenId, + currencyId, +}: ExternalViewerButtonProps) => { const { t } = useTranslation(); - const defaultLinks = { - openSea: `https://opensea.io/assets/${contract}/${tokenId}`, - rarible: `https://rarible.com/token/${contract}:${tokenId}`, - etherscan: `https://etherscan.io/token/${contract}?a=${tokenId}`, - }; - - const items: DropDownItemType[] = [ - { - key: "opensea", - label: t("NFT.viewer.actions.open", { viewer: "Opensea.io" }), - icon: , - onClick: () => openURL(links?.opensea || defaultLinks.openSea), - }, - { - key: "rarible", - label: t("NFT.viewer.actions.open", { viewer: "Rarible" }), - icon: , - onClick: () => openURL(links?.rarible || defaultLinks.rarible), - }, - { - key: "sep2", - type: "separator", - label: "", - }, - { - key: "etherscan", - label: t("NFT.viewer.actions.open", { viewer: "Explorer" }), - icon: , - onClick: () => openURL(links?.etherscan || defaultLinks.etherscan), - }, - ]; + const items: DropDownItemType[] = useMemo(() => nftLinksFactory(currencyId, t, links), [ + currencyId, + links, + t, + ]); - const renderItem = ({ item }: { item: ItemType }) => { + const renderItem = ({ item }) => { if (item.type === "separator") { return ; } + const Icon = item.Icon ? React.createElement(item.Icon, { size: 16 }) : <>; + return ( - {item.icon ? {item.icon} : null} + {item.Icon ? {Icon} : null} {item.label} @@ -125,3 +97,6 @@ export const ExternalViewerButton = ({ links, contract, tokenId }: ExternalViewe ); }; + +// $FlowFixMe +export default memo(ExternalViewerButton); diff --git a/src/renderer/drawers/NFTViewerDrawer/index.js b/src/renderer/drawers/NFTViewerDrawer/index.js index 946133ec43..73b24bcd64 100644 --- a/src/renderer/drawers/NFTViewerDrawer/index.js +++ b/src/renderer/drawers/NFTViewerDrawer/index.js @@ -1,28 +1,31 @@ // @flow -import React, { useMemo, useCallback, useState } from "react"; -import Box from "~/renderer/components/Box"; -import styled from "styled-components"; -import Text from "~/renderer/components/Text"; -import Button from "~/renderer/components/Button"; -import IconSend from "~/renderer/icons/Send"; -import ZoomInIcon from "~/renderer/icons/ZoomIn"; - -import type { Account } from "@ledgerhq/live-common/lib/types"; +import React, { useMemo, useCallback, useState, useEffect, memo } from "react"; import { useTranslation } from "react-i18next"; import { useSelector, useDispatch } from "react-redux"; -import { getNFTById } from "~/renderer/reducers/accounts"; +import { space, layout, position } from "styled-system"; +import network from "@ledgerhq/live-common/lib/network"; +import { useNftMetadata } from "@ledgerhq/live-common/lib/nft/NftMetadataProvider"; +import { getCryptoCurrencyById } from "@ledgerhq/live-common/lib/currencies"; + +import type { Account } from "@ledgerhq/live-common/lib/types"; + +import styled from "styled-components"; +import Box from "~/renderer/components/Box"; +import NftPanAndZoom from "./NftPanAndZoom"; +import IconSend from "~/renderer/icons/Send"; +import Text from "~/renderer/components/Text"; import { NFTProperties } from "./NFTProperties"; import { CopiableField } from "./CopiableField"; -import NftPanAndZoom from "./NftPanAndZoom"; -import { ExternalViewerButton } from "./ExternalViewerButton"; -import Skeleton from "~/renderer/screens/nft/Skeleton"; import Image from "~/renderer/screens/nft/Image"; -import { useNftMetadata } from "@ledgerhq/live-common/lib/nft/NftMetadataProvider"; -import { space, layout, position } from "styled-system"; +import ZoomInIcon from "~/renderer/icons/ZoomIn"; +import Button from "~/renderer/components/Button"; import { openModal } from "~/renderer/actions/modals"; +import Skeleton from "~/renderer/screens/nft/Skeleton"; import { setDrawer } from "~/renderer/drawers/Provider"; +import { getNFTById } from "~/renderer/reducers/accounts"; +import ExternalViewerButton from "./ExternalViewerButton"; import { SplitAddress } from "~/renderer/components/OperationsList/AddressCell"; const NFTViewerDrawerContainer = styled.div` @@ -115,42 +118,64 @@ const HashContainer = styled.div` user-select: none; `; -function NFTAttribute({ - title, - value, - skeleton, - separatorBottom, - separatorTop, -}: { - title: string, - value: string, - skeleton?: boolean, - separatorBottom?: boolean, - separatorTop?: boolean, -}) { - if (!skeleton && !value) return null; +const TickerContainer = styled(Text)` + padding-left: 3px; + font-weight: 600; +`; - return ( - - {separatorTop ? : null} - - {title} - - - -
{value}
+const FLOOR_PRICE_CURRENCIES = new Set(["ethereum"]); +const getFloorPrice = async (nft: ProtoNFT): Promise => { + if (!FLOOR_PRICE_CURRENCIES.has(nft.currencyId)) { + return null; + } + + const { data } = await network({ + method: "GET", + url: `https://api-opensea.vercel.app/floor?contract=${nft.contract}¤cyId=${nft.currencyId}`, + }); + + return data?.floor_price ?? null; +}; + +const NFTAttribute = memo( + ({ + title, + value, + skeleton, + separatorBottom, + separatorTop, + }: { + title: string, + value: string, + skeleton?: boolean, + separatorBottom?: boolean, + separatorTop?: boolean, + }) => { + if (!skeleton && !value) return null; + + return ( + <> + {separatorTop ? : null} + + {title} -
- {separatorBottom ? : null} -
- ); -} + + +
{value}
+
+
+ {separatorBottom ? : null} + + ); + }, +); +NFTAttribute.displayName = "NFTAttribute"; type NFTViewerDrawerProps = { account: Account, @@ -160,15 +185,26 @@ type NFTViewerDrawerProps = { onRequestClose: () => void, }; -export function NFTViewerDrawer({ account, nftId, height }: NFTViewerDrawerProps) { +const NFTViewerDrawer = ({ account, nftId, height }: NFTViewerDrawerProps) => { const { t } = useTranslation(); const dispatch = useDispatch(); const nft = useSelector(state => getNFTById(state, { nftId })); - const { status, metadata } = useNftMetadata(nft.collection.contract, nft.tokenId); + const { status, metadata } = useNftMetadata(nft.contract, nft.tokenId, nft.currencyId); const show = useMemo(() => status === "loading", [status]); const name = metadata?.nftName || nft.tokenId; + const currency = useMemo(() => getCryptoCurrencyById(nft.currencyId), [nft.currencyId]); + + const [floorPriceLoading, setFloorPriceLoading] = useState(false); + const [floorPrice, setFloorPrice] = useState(null); + useEffect(() => { + setFloorPriceLoading(true); + getFloorPrice(nft) + .then(setFloorPrice) + .finally(() => setFloorPriceLoading(false)); + }, [nft]); + const onNFTSend = useCallback(() => { setDrawer(); dispatch(openModal("MODAL_SEND", { account, isNFTSend: true, nftId })); @@ -241,8 +277,9 @@ export function NFTViewerDrawer({ account, nftId, height }: NFTViewerDrawerProps @@ -263,9 +300,9 @@ export function NFTViewerDrawer({ account, nftId, height }: NFTViewerDrawerProps {t("NFT.viewer.attributes.tokenAddress")} - + - + @@ -291,7 +328,7 @@ export function NFTViewerDrawer({ account, nftId, height }: NFTViewerDrawerProps )} - {nft.collection.standard === "ERC1155" ? ( + {nft.standard === "ERC1155" ? ( ) : null} + {floorPriceLoading || (!floorPriceLoading && floorPrice) ? ( + + {floorPrice} + {currency.ticker} + + } + /> + ) : null}
); -} +}; + +// $FlowFixMe +export default memo(NFTViewerDrawer); diff --git a/src/renderer/drawers/OperationDetails/NFTOperationDetails.js b/src/renderer/drawers/OperationDetails/NFTOperationDetails.js index 3482746c00..63e72aad6b 100644 --- a/src/renderer/drawers/OperationDetails/NFTOperationDetails.js +++ b/src/renderer/drawers/OperationDetails/NFTOperationDetails.js @@ -2,6 +2,7 @@ import React, { useMemo } from "react"; import { useTranslation } from "react-i18next"; +import { decodeAccountId } from "@ledgerhq/live-common/lib/account"; import { OpDetailsSection, OpDetailsTitle, @@ -20,7 +21,8 @@ import { centerEllipsis } from "~/renderer/styles/helpers"; const NFTOperationDetails = ({ operation }: { operation: Operation }) => { const { t } = useTranslation(); - const { status, metadata } = useNftMetadata(operation.contract, operation.tokenId); + const { currencyId } = decodeAccountId(operation.accountId); + const { status, metadata } = useNftMetadata(operation.contract, operation.tokenId, currencyId); const show = useMemo(() => status === "loading", [status]); return operation.contract && operation.tokenId ? ( diff --git a/src/renderer/drawers/OperationDetails/index.js b/src/renderer/drawers/OperationDetails/index.js index 18035feb79..2d5069c9d5 100644 --- a/src/renderer/drawers/OperationDetails/index.js +++ b/src/renderer/drawers/OperationDetails/index.js @@ -133,16 +133,27 @@ const OperationD: React$ComponentType = (props: Props) => { const location = useLocation(); const mainAccount = getMainAccount(account, parentAccount); - const { extra, hash, date, senders, type, fee, recipients: _recipients } = operation; + const { + extra, + hash, + date, + senders, + type, + fee, + recipients: _recipients, + contract, + tokenId, + } = operation; const recipients = _recipients.filter(Boolean); const { name } = mainAccount; - const { status, metadata } = useNftMetadata(operation.contract, operation.tokenId); const isNftOperation = ["NFT_IN", "NFT_OUT"].includes(operation.type); - const show = useMemo(() => status === "loading", [status]); const currency = getAccountCurrency(account); const mainCurrency = getAccountCurrency(mainAccount); + const { status, metadata } = useNftMetadata(contract, tokenId, currency.id); + const show = useMemo(() => status === "loading", [status]); + const unit = getAccountUnit(account); const amount = getOperationAmountNumber(operation); diff --git a/src/renderer/families/ethereum/operationDetails.js b/src/renderer/families/ethereum/operationDetails.js index 34aab36b9d..74b4e45682 100644 --- a/src/renderer/families/ethereum/operationDetails.js +++ b/src/renderer/families/ethereum/operationDetails.js @@ -4,7 +4,8 @@ import styled from "styled-components"; import toPairs from "lodash/toPairs"; import { Trans } from "react-i18next"; import type { AccountLike, Operation } from "@ledgerhq/live-common/lib/types"; -import { useNftMetadata } from "@ledgerhq/live-common/lib/nft/NftMetadataProvider"; +import { useNftMetadata } from "@ledgerhq/live-common/lib/nft"; +import { decodeAccountId } from "@ledgerhq/live-common/lib/account"; import { centerEllipsis } from "~/renderer/styles/helpers"; import Box from "~/renderer/components/Box"; import Skeleton from "~/renderer/screens/nft/Skeleton"; @@ -57,7 +58,8 @@ const Cell: ThemedComponent<{}> = styled(Box).attrs(() => ({ `; const NFTAmountField = ({ operation }: Props) => { - const { status, metadata } = useNftMetadata(operation.contract, operation.tokenId); + const { currencyId } = decodeAccountId(operation.accountId); + const { status, metadata } = useNftMetadata(operation.contract, operation.tokenId, currencyId); const show = useMemo(() => status === "loading", [status]); return ( diff --git a/src/renderer/modals/Send/Body.js b/src/renderer/modals/Send/Body.js index 6620a70a03..fd4431e928 100644 --- a/src/renderer/modals/Send/Body.js +++ b/src/renderer/modals/Send/Body.js @@ -201,13 +201,13 @@ const Body = ({ nextNft => { setAccount(account); const bridge = getAccountBridge(account); - const standard = nextNft.collection.standard.toLowerCase(); + const standard = nextNft.standard.toLowerCase(); setTransaction( bridge.updateTransaction(transaction, { tokenIds: [nextNft.tokenId], quantities: [BigNumber(1)], - collection: nextNft.collection.contract, + collection: nextNft.contract, mode: `${standard}.transfer`, }), ); diff --git a/src/renderer/modals/Send/steps/StepAmount.js b/src/renderer/modals/Send/steps/StepAmount.js index 545f6299bf..cf40690130 100644 --- a/src/renderer/modals/Send/steps/StepAmount.js +++ b/src/renderer/modals/Send/steps/StepAmount.js @@ -64,7 +64,7 @@ const StepAmount = ({ /> ) : null} {isNFTSend && nft ? ( - nft.collection.standard === "ERC1155" ? ( + nft.standard === "ERC1155" ? ( { - const { nfts } = collection; - const { status, metadata } = useNftMetadata(collection.contract, nfts[0]?.tokenId); +const CollectionName = ({ nft, fallback }: { nft: ProtoNFT, fallback?: string }) => { + const { status, metadata } = useNftMetadata(nft.contract, nft.tokenId, nft.currencyId); const { tokenName } = metadata || {}; const loading = status === "loading"; @@ -23,4 +18,5 @@ const CollectionName = ({ ); }; -export default CollectionName; +// $FlowFixMe +export default memo(CollectionName); diff --git a/src/renderer/screens/nft/Collections/Collections.js b/src/renderer/screens/nft/Collections/Collections.js index 7f85cba397..c4f7a84340 100644 --- a/src/renderer/screens/nft/Collections/Collections.js +++ b/src/renderer/screens/nft/Collections/Collections.js @@ -1,6 +1,6 @@ // @flow -import React, { useState, useCallback, useEffect } from "react"; +import React, { useState, useCallback, useEffect, useMemo, memo } from "react"; import { useTranslation } from "react-i18next"; import { useDispatch } from "react-redux"; import Button from "~/renderer/components/Button"; @@ -43,15 +43,30 @@ const Collections = ({ account }: Props) => { [account.id, history], ); - const collections = nftsByCollections(account.nfts); + const collections = useMemo(() => nftsByCollections(account.nfts), [account.nfts]); + const collectionsLength = Object.keys(collections).length; const onShowMore = useCallback(() => { setNumberOfVisibleCollections(numberOfVisibleCollection => - Math.min(numberOfVisibleCollection + INCREMENT, collections.length), + Math.min(numberOfVisibleCollection + INCREMENT, collectionsLength), ); - }, [collections.length]); + }, [collectionsLength]); - const visibleCollection = collections.slice(0, numberOfVisibleCollection); + const visibleCollection = useMemo( + () => + Object.entries(collections) + .slice(0, numberOfVisibleCollection) + .map(([contract, nfts]: any) => ( + onOpenCollection(contract)} + key={contract} + contract={contract} + currencyId={account.currency.id} + nfts={nfts} + /> + )), + [account.currency, collections, numberOfVisibleCollection, onOpenCollection], + ); useEffect(() => { track("View NFT Collections (Account Page)"); @@ -72,20 +87,13 @@ const Collections = ({ account }: Props) => { {account.nfts?.length ? ( - visibleCollection.map(({ contract, nfts }) => ( - onOpenCollection(contract)} - key={contract} - contract={contract} - nfts={nfts} - /> - )) + visibleCollection ) : ( )} - {collections?.length > numberOfVisibleCollection ? ( + {collectionsLength > numberOfVisibleCollection ? ( @@ -102,4 +110,5 @@ const Collections = ({ account }: Props) => { ); }; -export default Collections; +// $FlowFixMe +export default memo(Collections); diff --git a/src/renderer/screens/nft/Collections/Row.js b/src/renderer/screens/nft/Collections/Row.js index a09a03a3fc..ba6ae271df 100644 --- a/src/renderer/screens/nft/Collections/Row.js +++ b/src/renderer/screens/nft/Collections/Row.js @@ -1,6 +1,6 @@ // @flow -import React, { useMemo } from "react"; +import React, { useMemo, memo } from "react"; import styled from "styled-components"; import Box from "~/renderer/components/Box"; import Text from "~/renderer/components/Text"; @@ -28,11 +28,12 @@ const Container: ThemedComponent<{}> = styled(Box)` type Props = { nfts: NFTWithMetadata[], contract: string, + currencyId: string, onClick: string => void, }; -const Row = ({ nfts, contract, onClick }: Props) => { - const { status, metadata } = useNftMetadata(contract, nfts[0].tokenId); +const Row = ({ nfts, contract, currencyId, onClick }: Props) => { + const { status, metadata } = useNftMetadata(contract, nfts[0].tokenId, currencyId); const { tokenName } = metadata || {}; const show = useMemo(() => status === "loading", [status]); @@ -64,4 +65,5 @@ const Row = ({ nfts, contract, onClick }: Props) => { ); }; -export default Row; +// $FlowFixMe +export default memo(Row); diff --git a/src/renderer/screens/nft/Gallery/Collection.js b/src/renderer/screens/nft/Gallery/Collection.js index 6c3f86da5a..231733910b 100644 --- a/src/renderer/screens/nft/Gallery/Collection.js +++ b/src/renderer/screens/nft/Gallery/Collection.js @@ -1,6 +1,6 @@ // @flow -import React, { useMemo, useCallback, useRef, useState, useEffect } from "react"; +import React, { useMemo, useCallback, useRef, useState, useEffect, memo } from "react"; import { useParams } from "react-router-dom"; import { useSelector, useDispatch } from "react-redux"; import { useTranslation } from "react-i18next"; @@ -49,12 +49,16 @@ const Collection = () => { const { id, collectionAddress } = useParams(); const account = useSelector(state => accountSelector(state, { accountId: id })); - const collection = useMemo(() => nftsByCollections(account.nfts, collectionAddress)[0], [ + const nfts = useMemo(() => nftsByCollections(account.nfts, collectionAddress) || [], [ account.nfts, collectionAddress, ]); - const { status, metadata } = useNftMetadata(collection.contract, collection.nfts[0].tokenId); + const { status, metadata } = useNftMetadata( + nfts[0]?.contract, + nfts[0]?.tokenId, + account.currency.id, + ); const show = useMemo(() => status === "loading", [status]); const onSend = useCallback(() => { @@ -66,22 +70,19 @@ const Collection = () => { // NB To be determined if this filter is good enough for what we expect. const filterOperation = op => !!op.nftOperations?.length && - !!op.nftOperations.find(nftOp => nftOp.contract === collectionAddress); + !!op.nftOperations.find(nftOp => nftOp?.contract === collectionAddress); const ref = useRef(); const isAtBottom = useOnScreen(ref); const [maxVisibleNTFs, setMaxVisibleNFTs] = useState(1); useEffect(() => { - if (isAtBottom && maxVisibleNTFs < collection.nfts.length) { + if (isAtBottom && maxVisibleNTFs < nfts.length) { setMaxVisibleNFTs(maxVisibleNTFs => maxVisibleNTFs + 5); } }, [isAtBottom]); - const slicedNfts = useMemo(() => collection.nfts.slice(0, maxVisibleNTFs), [ - collection.nfts, - maxVisibleNTFs, - ]); + const slicedNfts = useMemo(() => nfts.slice(0, maxVisibleNTFs), [nfts, maxVisibleNTFs]); return ( <> @@ -93,13 +94,13 @@ const Collection = () => { {t("NFT.gallery.collection.header.contract", { - contract: collection.contract, + contract: collectionAddress, })} - + @@ -111,8 +112,8 @@ const Collection = () => { - - {collection.nfts.length > maxVisibleNTFs && ( + + {nfts.length > maxVisibleNTFs && ( @@ -129,4 +130,5 @@ const Collection = () => { ); }; -export default Collection; +// $FlowFixMe +export default memo(Collection); diff --git a/src/renderer/screens/nft/Gallery/Gallery.js b/src/renderer/screens/nft/Gallery/Gallery.js index 1a9ea2c010..9c5d72af10 100644 --- a/src/renderer/screens/nft/Gallery/Gallery.js +++ b/src/renderer/screens/nft/Gallery/Gallery.js @@ -1,11 +1,10 @@ // @flow -import React, { useCallback, useRef, useState, useEffect, useMemo } from "react"; +import React, { useCallback, useRef, useState, useEffect, useMemo, memo } from "react"; import { useParams, useHistory } from "react-router-dom"; import { useSelector, useDispatch } from "react-redux"; import { useTranslation } from "react-i18next"; import { accountSelector } from "~/renderer/reducers/accounts"; -import type { ThemedComponent } from "~/renderer/styles/StyleProvider"; import { openModal } from "~/renderer/actions/modals"; import { nftsByCollections } from "@ledgerhq/live-common/lib/nft"; import styled from "styled-components"; @@ -20,6 +19,9 @@ import Button from "~/renderer/components/Button"; import Text from "~/renderer/components/Text"; import GridListToggle from "./GridListToggle"; +import type { ProtoNFT } from "@ledgerhq/live-common/lib/nft"; +import type { ThemedComponent } from "~/renderer/styles/StyleProvider"; + const SpinnerContainer: ThemedComponent<{}> = styled.div` display: flex; flex: 1; @@ -47,7 +49,10 @@ const Gallery = () => { const account = useSelector(state => accountSelector(state, { accountId: id })); const history = useHistory(); - const collections = nftsByCollections(account.nfts); + const collections: { [key: string]: ProtoNFT[] } = useMemo( + () => nftsByCollections(account.nfts), + [account.nfts], + ); const onSend = useCallback(() => { dispatch(openModal("MODAL_SEND", { account, isNFTSend: true })); @@ -64,12 +69,8 @@ const Gallery = () => { const isAtBottom = useOnScreen(ref); const [maxVisibleNFTs, setMaxVisibleNFTs] = useState(1); - const totalNFTs = useMemo(() => collections.map(c => c.nfts.length).reduce((a, b) => a + b), [ - collections, - ]); - useEffect(() => { - if (isAtBottom && maxVisibleNFTs < totalNFTs) { + if (isAtBottom && maxVisibleNFTs < account.nfts.length) { setMaxVisibleNFTs(maxVisibleNFTs => maxVisibleNFTs + 5); } }, [isAtBottom]); @@ -78,32 +79,28 @@ const Gallery = () => { const collectionsRender = []; let isLoading = false; let displayedNFTs = 0; - collections.forEach(collection => { + Object.entries(collections).forEach(([contract, nfts]: any) => { if (displayedNFTs > maxVisibleNFTs) return; collectionsRender.push( -
- onSelectCollection(collection.contract)}> +
+ onSelectCollection(contract)}> - + - +
, ); - if (displayedNFTs + collection.nfts.length > maxVisibleNFTs) { + if (displayedNFTs + nfts.length > maxVisibleNFTs) { isLoading = true; } - displayedNFTs += collection.nfts.length; + displayedNFTs += nfts.length; }); return [collectionsRender, isLoading]; - }, [collections, maxVisibleNFTs, account]); + }, [collections, maxVisibleNFTs, account, onSelectCollection]); return ( <> @@ -135,4 +132,5 @@ const Gallery = () => { ); }; -export default Gallery; +// $FlowFixMe +export default memo(Gallery); diff --git a/src/renderer/screens/nft/Gallery/TokensList/Item.js b/src/renderer/screens/nft/Gallery/TokensList/Item.js index 5d7848574e..2b7bc75b72 100644 --- a/src/renderer/screens/nft/Gallery/TokensList/Item.js +++ b/src/renderer/screens/nft/Gallery/TokensList/Item.js @@ -13,9 +13,9 @@ import { centerEllipsis } from "~/renderer/styles/helpers"; import Image from "~/renderer/screens/nft/Image"; import Skeleton from "~/renderer/screens/nft/Skeleton"; import IconDots from "~/renderer/icons/Dots"; -import { useNftMetadata } from "@ledgerhq/live-common/lib/nft/NftMetadataProvider"; +import { useNftMetadata } from "@ledgerhq/live-common/lib/nft"; import NFTContextMenu from "~/renderer/components/ContextMenu/NFTContextMenu"; -import { NFTViewerDrawer } from "~/renderer/drawers/NFTViewerDrawer"; +import NFTViewerDrawer from "~/renderer/drawers/NFTViewerDrawer"; import { setDrawer } from "~/renderer/drawers/Provider"; const Wrapper: ThemedComponent<{}> = styled(Card)` @@ -56,16 +56,14 @@ const TitleContainer: ThemedComponent<{}> = styled(Text)` type Props = { account: Account, - contract: string, - tokenId: string, id: string, mode: "grid" | "list", withContextMenu?: boolean, }; -const NftCard = ({ contract, tokenId, id, mode, account, withContextMenu = false }: Props) => { - const { status, metadata } = useNftMetadata(contract, tokenId); +const NftCard = ({ id, mode, account, withContextMenu = false }: Props) => { const nft = useSelector(state => getNFTById(state, { nftId: id })); + const { status, metadata } = useNftMetadata(nft.contract, nft.tokenId, nft.currencyId); const { nftName } = metadata || {}; const show = useMemo(() => status === "loading", [status]); const isGrid = mode === "grid"; @@ -80,7 +78,12 @@ const NftCard = ({ contract, tokenId, id, mode, account, withContextMenu = false const MaybeContext = ({ children }: any) => withContextMenu ? ( - + {children} ) : ( @@ -115,10 +118,10 @@ const NftCard = ({ contract, tokenId, id, mode, account, withContextMenu = false - {nft.collection.standard === "ERC1155" && isGrid && ( + {nft.standard === "ERC1155" && isGrid && ( {`x${nft.amount.toFixed()}`} @@ -128,12 +131,18 @@ const NftCard = ({ contract, tokenId, id, mode, account, withContextMenu = false
{!isGrid ? ( <> - {nft.collection.standard === "ERC1155" && ( + {nft.standard === "ERC1155" && ( {`x${nft.amount.toFixed()}`} )} - + diff --git a/src/renderer/screens/nft/Gallery/TokensList/TokensList.js b/src/renderer/screens/nft/Gallery/TokensList/TokensList.js index 9e4a68ff91..1b827f5146 100644 --- a/src/renderer/screens/nft/Gallery/TokensList/TokensList.js +++ b/src/renderer/screens/nft/Gallery/TokensList/TokensList.js @@ -1,6 +1,6 @@ // @flow -import React from "react"; +import React, { memo } from "react"; import styled from "styled-components"; import type { ThemedComponent } from "~/renderer/styles/StyleProvider"; import type { Account, NFT } from "@ledgerhq/live-common/lib/types"; @@ -11,7 +11,6 @@ import Item from "./Item"; type Props = { account: Account, - collectionAddress: string, isLoading?: boolean, nfts: NFT[], }; @@ -22,23 +21,17 @@ const Container: ThemedComponent<{ mode?: "grid" | "list" }> = styled(Box)` grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); `; -const TokensList = ({ account, isLoading, nfts, collectionAddress }: Props) => { +const TokensList = ({ account, isLoading, nfts }: Props) => { const nftsViewMode = useSelector(nftsViewModeSelector); return ( {nfts.map(nft => ( - + ))} ); }; -export default TokensList; +// $FlowFixMe +export default memo(TokensList); diff --git a/src/renderer/screens/nft/Send/Option.js b/src/renderer/screens/nft/Send/Option.js index faef59629c..95dca02793 100644 --- a/src/renderer/screens/nft/Send/Option.js +++ b/src/renderer/screens/nft/Send/Option.js @@ -12,18 +12,14 @@ type OptionProps = { data: { tokenId: string, amount: BigNumber, - collection: { contract: string, standard: string }, + contract: string, + standard: string, + currencyId: string, }, }; -const Option = ({ - data: { - tokenId, - amount, - collection: { contract, standard }, - }, -}: OptionProps) => { - const { status, metadata } = useNftMetadata(contract, tokenId); +const Option = ({ data: { tokenId, amount, contract, standard, currencyId } }: OptionProps) => { + const { status, metadata } = useNftMetadata(contract, tokenId, currencyId); const show = useMemo(() => status === "loading", [status]); return ( @@ -55,4 +51,5 @@ const Option = ({ ); }; +// $FlowFixMe export default Option; diff --git a/src/renderer/screens/nft/Send/SelectNFT.js b/src/renderer/screens/nft/Send/SelectNFT.js index 72f67802ac..6a16eaf589 100644 --- a/src/renderer/screens/nft/Send/SelectNFT.js +++ b/src/renderer/screens/nft/Send/SelectNFT.js @@ -1,6 +1,7 @@ // @flow import React, { useMemo, useEffect, useCallback, useState } from "react"; import type { NFT } from "@ledgerhq/live-common/lib/types"; +import { nftsByCollections } from "@ledgerhq/live-common/lib/nft/helpers"; import Select from "~/renderer/components/Select"; import Option from "./Option"; @@ -19,10 +20,7 @@ const SelectNFT = ({ const getOptionValue = useCallback(item => item, []); const filteredNFTs = useMemo( - () => - maybeNFTCollection - ? nfts.filter(nft => nft.collection.contract === maybeNFTCollection) - : nfts, + () => (maybeNFTCollection ? nftsByCollections(nfts, maybeNFTCollection) : nfts), [nfts, maybeNFTCollection], ); diff --git a/src/renderer/screens/nft/Send/Summary.js b/src/renderer/screens/nft/Send/Summary.js index b07904e772..bbbce75eec 100644 --- a/src/renderer/screens/nft/Send/Summary.js +++ b/src/renderer/screens/nft/Send/Summary.js @@ -1,6 +1,6 @@ // @flow -import React, { useMemo } from "react"; +import React, { useMemo, memo } from "react"; import { Trans } from "react-i18next"; import { useSelector } from "react-redux"; import { getAllNFTs } from "~/renderer/reducers/accounts"; @@ -15,13 +15,13 @@ import { centerEllipsis } from "~/renderer/styles/helpers"; const Summary = ({ transaction }: { transaction: Transaction }) => { const allNfts = useSelector(getAllNFTs); const nft = allNfts.find(nft => nft.tokenId === transaction?.tokenIds[0]); - const { status, metadata } = useNftMetadata(nft.collection.contract, nft.tokenId); + const { status, metadata } = useNftMetadata(nft.contract, nft.tokenId, nft.currencyId); const { nftName } = metadata || {}; const show = useMemo(() => status === "loading", [status]); return ( <> - + @@ -44,7 +44,7 @@ const Summary = ({ transaction }: { transaction: Transaction }) => { - {nft.collection.standard === "ERC1155" ? ( + {nft.standard === "ERC1155" ? ( @@ -60,4 +60,5 @@ const Summary = ({ transaction }: { transaction: Transaction }) => { ); }; -export default Summary; +// $FlowFixMe +export default memo(Summary); diff --git a/static/i18n/en/app.json b/static/i18n/en/app.json index d52a54832f..a279f937a7 100644 --- a/static/i18n/en/app.json +++ b/static/i18n/en/app.json @@ -1275,7 +1275,8 @@ "description": "Description", "tokenAddress": "Token Address", "tokenId": "Token ID", - "quantity": "Quantity" + "quantity": "Quantity", + "floorPrice": "Collection Floor Price" } }, "collections": { @@ -4127,6 +4128,9 @@ "NotEnoughBalanceInParentAccount": { "title": "Insufficient balance in the parent account" }, + "quantityNeedsToBePositive": { + "title": "Quantity needs to be at least 1" + }, "NotEnoughSpendableBalance": { "title": "Balance cannot be below {{minimumAmount}}" }, diff --git a/tests/specs/market.spec.ts-snapshots/market-btc-buy-page-win32.png b/tests/specs/market.spec.ts-snapshots/market-btc-buy-page-win32.png index 01b0456a0b..122c833c6d 100644 Binary files a/tests/specs/market.spec.ts-snapshots/market-btc-buy-page-win32.png and b/tests/specs/market.spec.ts-snapshots/market-btc-buy-page-win32.png differ diff --git a/tests/specs/swap.spec.ts-snapshots/confirm-exchange-win32.png b/tests/specs/swap.spec.ts-snapshots/confirm-exchange-win32.png index da1985adb3..00f45b0174 100644 Binary files a/tests/specs/swap.spec.ts-snapshots/confirm-exchange-win32.png and b/tests/specs/swap.spec.ts-snapshots/confirm-exchange-win32.png differ diff --git a/tests/specs/swap.spec.ts-snapshots/confirm-swap-win32.png b/tests/specs/swap.spec.ts-snapshots/confirm-swap-win32.png index 8dd924f1a7..bf562bb47b 100644 Binary files a/tests/specs/swap.spec.ts-snapshots/confirm-swap-win32.png and b/tests/specs/swap.spec.ts-snapshots/confirm-swap-win32.png differ diff --git a/tests/specs/swap.spec.ts-snapshots/initiate-swap-win32.png b/tests/specs/swap.spec.ts-snapshots/initiate-swap-win32.png index 4d4a6b4075..50d45fa56c 100644 Binary files a/tests/specs/swap.spec.ts-snapshots/initiate-swap-win32.png and b/tests/specs/swap.spec.ts-snapshots/initiate-swap-win32.png differ diff --git a/yarn.lock b/yarn.lock index c3cedc6ddf..c46edfb97a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1143,32 +1143,32 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@celo/base@1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@celo/base/-/base-1.5.1.tgz#53e16cd36c51f9eaeec0321f6752de6385f2a131" - integrity sha512-76MAosahwCDjkBsqfgnKT2CbyjV6TdzIztHJvAuJ+VrKeaIFe/IMoPwIxPy95xDJmHhD0zqPWMixGeyVGAwYQw== +"@celo/base@1.5.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@celo/base/-/base-1.5.2.tgz#168ab5e4e30b374079d8d139fafc52ca6bfd4100" + integrity sha512-KGf6Dl9E6D01vAfkgkjL2sG+zqAjspAogILIpWstljWdG5ifyA75jihrnDEHaMCoQS0KxHvTdP1XYS/GS6BEyQ== -"@celo/connect@1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@celo/connect/-/connect-1.5.1.tgz#c06631134150c5d0cbf9676a7a45f620e49a5e89" - integrity sha512-UjZIu1GRvnsUrGfTUDqxyrt8qyDpj4cuxQ/WVETss8l+x98zV5/7edKOA0QRWEKFhh3F1mCi0N08hEpp+q7QaA== +"@celo/connect@1.5.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@celo/connect/-/connect-1.5.2.tgz#09f0b03bda6f8a6d523fd010492f204cbe82aabd" + integrity sha512-IHsvYp1HizIPfPPeIHyvsmJytIf7HNtNWo9CqCbsqfNfmw53q6dFJu2p5X0qz/fUnR5840cUga8cEyuYZTfp+w== dependencies: - "@celo/utils" "1.5.1" + "@celo/utils" "1.5.2" "@types/debug" "^4.1.5" "@types/utf8" "^2.1.6" bignumber.js "^9.0.0" debug "^4.1.1" utf8 "3.0.0" -"@celo/contractkit@^1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@celo/contractkit/-/contractkit-1.5.1.tgz#723c3516bf08d0598f32dc45a17a99a576c90fa3" - integrity sha512-hUgH0yTbI1JUn9ytCWW/0QLfAruF3YL5xfcSmzXItklQ2GKGsTSfGlY7XTUY97xq/WYO2InXw+Vuhop6CcFOiw== +"@celo/contractkit@^1.5.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@celo/contractkit/-/contractkit-1.5.2.tgz#be15d570f3044a190dabb6bbe53d5081c78ea605" + integrity sha512-b0r5TlfYDEscxze1Ai2jyJayiVElA9jvEehMD6aOSNtVhfP8oirjFIIffRe0Wzw1MSDGkw+q1c4m0Yw5sEOlvA== dependencies: - "@celo/base" "1.5.1" - "@celo/connect" "1.5.1" - "@celo/utils" "1.5.1" - "@celo/wallet-local" "1.5.1" + "@celo/base" "1.5.2" + "@celo/connect" "1.5.2" + "@celo/utils" "1.5.2" + "@celo/wallet-local" "1.5.2" "@types/debug" "^4.1.5" bignumber.js "^9.0.0" cross-fetch "^3.0.6" @@ -1178,12 +1178,12 @@ semver "^7.3.5" web3 "1.3.6" -"@celo/utils@1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@celo/utils/-/utils-1.5.1.tgz#cd5b0309750a25683d9b07c14e643aee2c6a3670" - integrity sha512-3ZqZ/YSvzcESd72+8oNOvIM5HieJt3zusRCBPIl97qnqlnCIIq22gxcvpKL1afac0q79t24jkbdl5wsAkD/ROA== +"@celo/utils@1.5.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@celo/utils/-/utils-1.5.2.tgz#ddb7f3b50c801225ab41d2355fbe010976329099" + integrity sha512-JyKjuVMbdkyFOb1TpQw6zqamPQWYg7I9hOnva3MeIcQ3ZrJIaNHx0/I+JXFjuu3YYBc1mG8nXp2uPJJTGrwzCQ== dependencies: - "@celo/base" "1.5.1" + "@celo/base" "1.5.2" "@types/country-data" "^0.0.0" "@types/elliptic" "^6.4.9" "@types/ethereumjs-util" "^5.2.0" @@ -1211,14 +1211,14 @@ web3-eth-abi "1.3.6" web3-utils "1.3.6" -"@celo/wallet-base@1.5.1", "@celo/wallet-base@^1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@celo/wallet-base/-/wallet-base-1.5.1.tgz#6f4bf2c487a9e813c267e0c9e12d93886daa0884" - integrity sha512-78playqXi/JEwoyLPyPGjaUnPy/PNNjfqSHRD9IF4uTNxTpaUJJXNWKQSoRF2tFwuLdQxC96hrf63Qzepo5Edg== +"@celo/wallet-base@1.5.2", "@celo/wallet-base@^1.5.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@celo/wallet-base/-/wallet-base-1.5.2.tgz#ae8df425bf3c702277bb1b63a761a2ec8429e7aa" + integrity sha512-NYJu7OtSRFpGcvSMl2Wc8zN32S6oTkAzKqhH7rXisQ0I2q4yNwCzoquzPVYB0G2UVUFKuuxgsA5V+Zda/LQCyw== dependencies: - "@celo/base" "1.5.1" - "@celo/connect" "1.5.1" - "@celo/utils" "1.5.1" + "@celo/base" "1.5.2" + "@celo/connect" "1.5.2" + "@celo/utils" "1.5.2" "@types/debug" "^4.1.5" "@types/ethereumjs-util" "^5.2.0" bignumber.js "^9.0.0" @@ -1226,15 +1226,15 @@ eth-lib "^0.2.8" ethereumjs-util "^5.2.0" -"@celo/wallet-ledger@^1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@celo/wallet-ledger/-/wallet-ledger-1.5.1.tgz#339b3b60673d4c41241b1e7641173fdc13302b07" - integrity sha512-su4RBbSCM04YcqTYY3vFki9knFtjxNApID+iepQhHfw3TCoppfcqoamIl7K5MOvOhYFUFCoDFoWn4YoRNSm5Iw== +"@celo/wallet-ledger@^1.5.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@celo/wallet-ledger/-/wallet-ledger-1.5.2.tgz#01fe3b0a6c1c73b8dd849efe950a70bb67d8cf45" + integrity sha512-O6IXcZYmp2ZdVj8Y7FzZ2Q/nUWX+ywc1dXizsbh0DVcCIRQosGkNyolixLlJ0nB2J+7nwcnf6mCOYu7ucbwEsw== dependencies: - "@celo/connect" "1.5.1" - "@celo/utils" "1.5.1" - "@celo/wallet-base" "1.5.1" - "@celo/wallet-remote" "1.5.1" + "@celo/connect" "1.5.2" + "@celo/utils" "1.5.2" + "@celo/wallet-base" "1.5.2" + "@celo/wallet-remote" "1.5.2" "@ledgerhq/hw-app-eth" "~5.11.0" "@ledgerhq/hw-transport" "~5.11.0" "@types/ethereumjs-util" "^5.2.0" @@ -1242,26 +1242,26 @@ eth-lib "^0.2.8" ethereumjs-util "^5.2.0" -"@celo/wallet-local@1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@celo/wallet-local/-/wallet-local-1.5.1.tgz#5f58a1f3bdce06392154459216647798e8e7d08a" - integrity sha512-StQU8R6SKo+T87LVxMxGG/8WRlruU5dze02Hs8vgEHt3LeYMsrX2k4+FkndANoJF9lhl+XvQrGD4gTaDC4b2ag== +"@celo/wallet-local@1.5.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@celo/wallet-local/-/wallet-local-1.5.2.tgz#66ea5fb763e19724309e3d56f312f1a342e12b91" + integrity sha512-Aas4SwqQc8ap0OFAOZc+jBR4cXr20V9AReHNEI8Y93R3g1+RlSEJ1Zmsu4vN+Rriz58YqgMnr+pihorw8QydFQ== dependencies: - "@celo/connect" "1.5.1" - "@celo/utils" "1.5.1" - "@celo/wallet-base" "1.5.1" + "@celo/connect" "1.5.2" + "@celo/utils" "1.5.2" + "@celo/wallet-base" "1.5.2" "@types/ethereumjs-util" "^5.2.0" eth-lib "^0.2.8" ethereumjs-util "^5.2.0" -"@celo/wallet-remote@1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@celo/wallet-remote/-/wallet-remote-1.5.1.tgz#a64bd3848c524e4316c6dbd6ac15ee62828bf0f3" - integrity sha512-NGzzqQoIITQ5YQiEKwcuBRBa7RP2AF5eQhTSZGjZ4RKtYz/UbYGmm6Cow+hT8112LNiNjxCNzTcyVbSx2eji3w== +"@celo/wallet-remote@1.5.2": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@celo/wallet-remote/-/wallet-remote-1.5.2.tgz#2eb9500033453cbc051f15ba97d1e1e388761109" + integrity sha512-WLBtR/htAYi9gjBduEb0aGoOLD5MFuAl7zrg3wNbeC992VeTcAUmZJO6zRL0mnREtfULLepoPnOOgIzl21kWyQ== dependencies: - "@celo/connect" "1.5.1" - "@celo/utils" "1.5.1" - "@celo/wallet-base" "1.5.1" + "@celo/connect" "1.5.2" + "@celo/utils" "1.5.2" + "@celo/wallet-base" "1.5.2" "@types/debug" "^4.1.5" "@types/ethereumjs-util" "^5.2.0" eth-lib "^0.2.8" @@ -1295,6 +1295,16 @@ "@cosmjs/math" "^0.25.0-alpha.2" "@cosmjs/utils" "^0.25.0-alpha.2" +"@cosmjs/amino@0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@cosmjs/amino/-/amino-0.26.6.tgz#eb652ec4551e820f6b460935375a37b1cb73e7a2" + integrity sha512-O2MNJTduMnQzr7cK9PmvselY7XVCV+GxjC0vR/NBJmKZt7+GgGnHTLbbdOJr5MAQcESCwTkGAnnctw7hhoEjqw== + dependencies: + "@cosmjs/crypto" "0.26.6" + "@cosmjs/encoding" "0.26.6" + "@cosmjs/math" "0.26.6" + "@cosmjs/utils" "0.26.6" + "@cosmjs/amino@^0.25.0-alpha.2", "@cosmjs/amino@^0.25.6": version "0.25.6" resolved "https://registry.yarnpkg.com/@cosmjs/amino/-/amino-0.25.6.tgz#cdf9632253bfab7b1d2ef967124953d7bf16351f" @@ -1305,6 +1315,22 @@ "@cosmjs/math" "^0.25.6" "@cosmjs/utils" "^0.25.6" +"@cosmjs/crypto@0.26.6", "@cosmjs/crypto@^0.26.5": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@cosmjs/crypto/-/crypto-0.26.6.tgz#4ee84e8707406a951a43eac34ffc83ff6c6030f3" + integrity sha512-nR8gXZH6NljKL4vArkCmDCVA10hMtHHaJQYGlHpYufnXbbx4614FnzOd8Y/CkunhjFGM0jn/WFT4rCjbPYzuUw== + dependencies: + "@cosmjs/encoding" "0.26.6" + "@cosmjs/math" "0.26.6" + "@cosmjs/utils" "0.26.6" + bip39 "^3.0.2" + bn.js "^4.11.8" + elliptic "^6.5.3" + js-sha3 "^0.8.0" + libsodium-wrappers "^0.7.6" + ripemd160 "^2.0.2" + sha.js "^2.4.11" + "@cosmjs/crypto@^0.24.1": version "0.24.1" resolved "https://registry.yarnpkg.com/@cosmjs/crypto/-/crypto-0.24.1.tgz#62da59c32b26344f26b10dd31a02b93655586d04" @@ -1348,6 +1374,15 @@ bech32 "^1.1.4" readonly-date "^1.0.0" +"@cosmjs/encoding@0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.26.6.tgz#80de9f1a4b5b4cc203b16b4190b9a42da7de1a49" + integrity sha512-dU0P2Um9ZB5yHpQYq+a6XnPKV4LD1kHd3nggbD0smn7wTwWW1XJKlms40SBZHtbm4dW9wPaPGf4yOkwwBdJO+w== + dependencies: + base64-js "^1.3.0" + bech32 "^1.1.4" + readonly-date "^1.0.0" + "@cosmjs/encoding@^0.24.1": version "0.24.1" resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.24.1.tgz#b30e92cdb70fc200a163b8c7aa5254606c8a09ab" @@ -1366,6 +1401,14 @@ bech32 "^1.1.4" readonly-date "^1.0.0" +"@cosmjs/json-rpc@0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@cosmjs/json-rpc/-/json-rpc-0.26.6.tgz#a41d706f419281a4586553fe68a65f773fb56d1a" + integrity sha512-cxHEdiqeHxUHsOxUiaWUMF7idoto+5UtqvKiZyHdcy7Xvjx4j8d3FIG4p1LYh0Qbt4sHpRzzFLN4AMrhLz12OA== + dependencies: + "@cosmjs/stream" "0.26.6" + xstream "^11.14.0" + "@cosmjs/json-rpc@^0.25.0-alpha.2", "@cosmjs/json-rpc@^0.25.6": version "0.25.6" resolved "https://registry.yarnpkg.com/@cosmjs/json-rpc/-/json-rpc-0.25.6.tgz#4f888630e84ee114b164758ec5b48f134068656c" @@ -1386,6 +1429,19 @@ axios "^0.21.1" fast-deep-equal "^3.1.3" +"@cosmjs/ledger-amino@^0.26.5": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@cosmjs/ledger-amino/-/ledger-amino-0.26.6.tgz#4fd342229f3de3059e193f8db3f88877074aabe0" + integrity sha512-L5KDfEq7EswV4ku2SbWlozfKVv9WJWtap4/7SMXKH0XrYWOIz0AYeBfM0OGtJQjuHAiD/1QJ8pam/kjUL3+quQ== + dependencies: + "@cosmjs/amino" "0.26.6" + "@cosmjs/crypto" "0.26.6" + "@cosmjs/encoding" "0.26.6" + "@cosmjs/math" "0.26.6" + "@cosmjs/utils" "0.26.6" + ledger-cosmos-js "^2.1.8" + semver "^7.3.2" + "@cosmjs/math@0.23.1": version "0.23.1" resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.23.1.tgz#706f38742a9a1f6561cf2c4510f8e5ab001fc5e6" @@ -1393,6 +1449,13 @@ dependencies: bn.js "^4.11.8" +"@cosmjs/math@0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.26.6.tgz#11f3273634bab69187c6361533a14c72f611f6a2" + integrity sha512-nblvidxwugM/kh1Vx95s7MQ596r5ap1ZUpjHYJTLbnYvnObHvfYvM3qb8SJzY0u7x5+u9E0oSFzLwMRfUTEQ3g== + dependencies: + bn.js "^4.11.8" + "@cosmjs/math@^0.24.1": version "0.24.1" resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.24.1.tgz#9eed507885aacc9b269441fc9ecb00fb5876883a" @@ -1416,6 +1479,18 @@ long "^4.0.0" protobufjs "~6.10.2" +"@cosmjs/proto-signing@0.26.6", "@cosmjs/proto-signing@^0.26.5": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@cosmjs/proto-signing/-/proto-signing-0.26.6.tgz#c05b84437634d1b19e36bd4b8864f3b41a08329a" + integrity sha512-wwR/ObID/g3bCt+I9Xv0a7Qmhu/+cRacFyh4tFY9ak+M6Q+5eyn+Gpj0MVLWG9cRPT7W1uVnr+8HRLhUEHExqg== + dependencies: + "@cosmjs/amino" "0.26.6" + "@cosmjs/crypto" "0.26.6" + "@cosmjs/math" "0.26.6" + cosmjs-types "^0.2.0" + long "^4.0.0" + protobufjs "~6.10.2" + "@cosmjs/proto-signing@^0.25.0-alpha.2": version "0.25.6" resolved "https://registry.yarnpkg.com/@cosmjs/proto-signing/-/proto-signing-0.25.6.tgz#d9fc57b8e0a46cda97e192bd0435157b24949ff8" @@ -1425,6 +1500,16 @@ long "^4.0.0" protobufjs "~6.10.2" +"@cosmjs/socket@0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@cosmjs/socket/-/socket-0.26.6.tgz#17aefcc2de412c26c93c5b31d71f1c4b8e06491d" + integrity sha512-JLizR/QlRJ+nBE/A4QfhinTLycI7a20w0hgHhkq9UUvRlFEh+j6bBK7TilDYZpX0Yjb+wJhCt7wHTiJo+uLjSA== + dependencies: + "@cosmjs/stream" "0.26.6" + isomorphic-ws "^4.0.1" + ws "^7" + xstream "^11.14.0" + "@cosmjs/socket@^0.25.0-alpha.2", "@cosmjs/socket@^0.25.6": version "0.25.6" resolved "https://registry.yarnpkg.com/@cosmjs/socket/-/socket-0.25.6.tgz#7876bc24e1f16315fbb9e97bd63dea65ba90647d" @@ -1451,6 +1536,31 @@ long "^4.0.0" protobufjs "~6.10.2" +"@cosmjs/stargate@^0.26.5": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@cosmjs/stargate/-/stargate-0.26.6.tgz#4f37647cce45298547a9b226506f9667033d0671" + integrity sha512-R5BolHkZGyblL0nNb0xXxwzDml57DYe2UE9jdlsOOJ7L/auZvThKxlfP473H/OHqsqwc7G2JRoCENtfvZRvTig== + dependencies: + "@confio/ics23" "^0.6.3" + "@cosmjs/amino" "0.26.6" + "@cosmjs/encoding" "0.26.6" + "@cosmjs/math" "0.26.6" + "@cosmjs/proto-signing" "0.26.6" + "@cosmjs/stream" "0.26.6" + "@cosmjs/tendermint-rpc" "0.26.6" + "@cosmjs/utils" "0.26.6" + cosmjs-types "^0.2.0" + long "^4.0.0" + protobufjs "~6.10.2" + xstream "^11.14.0" + +"@cosmjs/stream@0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@cosmjs/stream/-/stream-0.26.6.tgz#5474da08b5e8dd46de61ce9f16e39ad9751e9779" + integrity sha512-4Tfh1UlSCEBl+yqPeu+4q1uqwkKbx5gqYU/JDL81cLHW5QpxUA83F59+Pr9XohcnrHUmSt3DoDPqIlAoIdft1Q== + dependencies: + xstream "^11.14.0" + "@cosmjs/stream@^0.25.0-alpha.2", "@cosmjs/stream@^0.25.6": version "0.25.6" resolved "https://registry.yarnpkg.com/@cosmjs/stream/-/stream-0.25.6.tgz#1bf7536ed919be3fd7fbffa477c98ef5a93eac70" @@ -1473,6 +1583,21 @@ readonly-date "^1.0.0" xstream "^11.14.0" +"@cosmjs/tendermint-rpc@0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.26.6.tgz#36d3aec1b004f1a08ef3f3e0e15f6d0a5dc5e303" + integrity sha512-mXK09xsu68EM08KRhZ5Hg0o8zhN2WoXLjdDfQ+DGbpJLZQePpzzXKaMYY4eqwvECB6zsImpMVtfXoHMfK623kA== + dependencies: + "@cosmjs/crypto" "0.26.6" + "@cosmjs/encoding" "0.26.6" + "@cosmjs/json-rpc" "0.26.6" + "@cosmjs/math" "0.26.6" + "@cosmjs/socket" "0.26.6" + "@cosmjs/stream" "0.26.6" + axios "^0.21.2" + readonly-date "^1.0.0" + xstream "^11.14.0" + "@cosmjs/tendermint-rpc@^0.25.0-alpha.2": version "0.25.6" resolved "https://registry.yarnpkg.com/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.25.6.tgz#8198a08b0d0e1d6580618f3f22db83366329c9c3" @@ -1488,6 +1613,11 @@ readonly-date "^1.0.0" xstream "^11.14.0" +"@cosmjs/utils@0.26.6": + version "0.26.6" + resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.26.6.tgz#134ef1ea0675580c2cc7524589d09f3d42c678a7" + integrity sha512-Zx60MMI1vffX8c2UbUMlszrGIug3TWa25bD7NF3blJ5k/MVCZFsPafEZ+jEi7kcqoxdhMhgJTI6AmUhnMfq9SQ== + "@cosmjs/utils@^0.24.1": version "0.24.1" resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.24.1.tgz#0adfefe63b7f17222bc2bc12f71296f35e7ad378" @@ -2609,10 +2739,10 @@ dependencies: commander "^2.20.0" -"@ledgerhq/cryptoassets@6.26.0", "@ledgerhq/cryptoassets@^6.26.0": - version "6.26.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/cryptoassets/-/cryptoassets-6.26.0.tgz#b460e73ac857c52cbe38048eb734d95d708a874b" - integrity sha512-J1XF+e7j8Kj7cBLcM0rcihrUZtrPeH7u9pPU8mOdIjokx8jLkHm5HGg1M+VrM7QJ71hFMhMMi7OMw4BnHMY6IQ== +"@ledgerhq/cryptoassets@6.27.0", "@ledgerhq/cryptoassets@^6.27.0": + version "6.27.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/cryptoassets/-/cryptoassets-6.27.0.tgz#1a4efdef07858e8cb1b2dd4c1b9e110f1ed60f3f" + integrity sha512-fM1tm+xJSkbgEB73RtWeTeogcWRkpAcgZX+hBGbvq7anhbRwF2jD4EL897SRNwDuvCKFfpSMxpSUaSvEmj9Lcw== dependencies: invariant "2" @@ -2698,18 +2828,18 @@ "@ledgerhq/hw-transport" "^6.24.1" bip32-path "^0.4.2" -"@ledgerhq/hw-app-eth@6.26.0": - version "6.26.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-6.26.0.tgz#d125b9bc91cdf82b5ab032b9ac16014d81efd6cf" - integrity sha512-vok/xsXIpNuCm4uzJDF4r6dok8AXQ4nb0XHSwrNAPKveyDa7AAGVr9OApHliULuQgoq17zqFDXeKpcpneEu+iQ== +"@ledgerhq/hw-app-eth@6.27.0": + version "6.27.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-6.27.0.tgz#944f901a95ed3d82759e3fb011859b1b357620a9" + integrity sha512-7uyXu7dCsFmgGWSaXqasxb9Cegrw54HtCeMcZIkq1yqR9ik0ipQIPG1/qW+TqWfS6VYNkorUSsnKc67Cc+0MwA== dependencies: "@ethersproject/abi" "^5.5.0" "@ethersproject/rlp" "^5.5.0" - "@ledgerhq/cryptoassets" "^6.26.0" + "@ledgerhq/cryptoassets" "^6.27.0" "@ledgerhq/errors" "^6.10.0" "@ledgerhq/hw-transport" "^6.24.1" "@ledgerhq/logs" "^6.10.0" - axios "^0.26.0" + axios "^0.26.1" bignumber.js "^9.0.2" "@ledgerhq/hw-app-eth@~5.11.0": @@ -2729,10 +2859,10 @@ "@ledgerhq/hw-transport" "^6.24.1" bip32-path "^0.4.2" -"@ledgerhq/hw-app-solana@^6.26.0": - version "6.26.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-solana/-/hw-app-solana-6.26.0.tgz#0233066abc6c3a6345ae97696e22ac40c1d29a2f" - integrity sha512-Hdm9hJFb1lcwBW4ocygJ1SjcNKMRRQ7+YQ0hkIUintcMT4ayKRSOzCLSCjqr3VQJ+A4xTHYoXC33bD+qCYG5kA== +"@ledgerhq/hw-app-solana@^6.27.0": + version "6.27.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-solana/-/hw-app-solana-6.27.0.tgz#6d6b52d04919d2725b402f4d3f5ffe2dfe7b3aef" + integrity sha512-DFaoJU/2y4RIivLeqlG1L0LhtcDulFcFKuwrw6M2+b6BO5y3bxjRoLMDjBrmAHaZmkUDRZYxqnTLvOeYRLIU2A== dependencies: "@ledgerhq/errors" "^6.10.0" "@ledgerhq/hw-transport" "^6.24.1" @@ -2838,7 +2968,7 @@ "@ledgerhq/errors" "^6.10.0" events "^3.3.0" -"@ledgerhq/hw-transport@^5.11.0", "@ledgerhq/hw-transport@^5.19.1", "@ledgerhq/hw-transport@^5.51.1": +"@ledgerhq/hw-transport@^5.11.0", "@ledgerhq/hw-transport@^5.19.1", "@ledgerhq/hw-transport@^5.25.0", "@ledgerhq/hw-transport@^5.51.1": version "5.51.1" resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz#8dd14a8e58cbee4df0c29eaeef983a79f5f22578" integrity sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw== @@ -2890,26 +3020,30 @@ bignumber.js "^9.0.1" json-rpc-2.0 "^0.2.16" -"@ledgerhq/live-common@https://github.com/LedgerHQ/ledger-live-common.git#develop": - version "21.34.0" - resolved "https://github.com/LedgerHQ/ledger-live-common.git#bd51172b657260cfaa5c906a2bbed4d911b66339" - dependencies: - "@celo/contractkit" "^1.5.1" - "@celo/wallet-base" "^1.5.1" - "@celo/wallet-ledger" "^1.5.1" +"@ledgerhq/live-common@https://github.com/LedgerHQ/ledger-live-common.git#1effe19c902a37475d858ef5bb82ff9724ccf7f6": + version "21.35.0" + resolved "https://github.com/LedgerHQ/ledger-live-common.git#1effe19c902a37475d858ef5bb82ff9724ccf7f6" + dependencies: + "@celo/contractkit" "^1.5.2" + "@celo/wallet-base" "^1.5.2" + "@celo/wallet-ledger" "^1.5.2" + "@cosmjs/crypto" "^0.26.5" + "@cosmjs/ledger-amino" "^0.26.5" + "@cosmjs/proto-signing" "^0.26.5" + "@cosmjs/stargate" "^0.26.5" "@crypto-com/chain-jslib" "0.0.19" "@ethereumjs/common" "^2.6.2" "@ethereumjs/tx" "^3.5.0" "@ledgerhq/compressjs" "1.3.2" - "@ledgerhq/cryptoassets" "6.26.0" + "@ledgerhq/cryptoassets" "6.27.0" "@ledgerhq/devices" "6.24.1" "@ledgerhq/errors" "6.10.0" "@ledgerhq/hw-app-algorand" "6.24.1" "@ledgerhq/hw-app-btc" "6.24.1" "@ledgerhq/hw-app-cosmos" "6.24.1" - "@ledgerhq/hw-app-eth" "6.26.0" + "@ledgerhq/hw-app-eth" "6.27.0" "@ledgerhq/hw-app-polkadot" "6.24.1" - "@ledgerhq/hw-app-solana" "^6.26.0" + "@ledgerhq/hw-app-solana" "^6.27.0" "@ledgerhq/hw-app-str" "6.24.1" "@ledgerhq/hw-app-tezos" "6.24.1" "@ledgerhq/hw-app-trx" "6.24.1" @@ -2933,7 +3067,7 @@ "@zondax/ledger-filecoin" "^0.11.2" algosdk "1.13.0" async "^3.2.3" - axios "0.26.0" + axios "0.26.1" axios-retry "^3.2.4" base32-decode "^1.0.0" bchaddrjs "^0.5.2" @@ -2983,7 +3117,6 @@ triple-beam "^1.3.0" winston "^3.4.0" xstate "^4.28.1" - zcash-bitcore-lib "^0.13.20-rc3" "@ledgerhq/logs@6.10.0", "@ledgerhq/logs@^6.10.0": version "6.10.0" @@ -6491,20 +6624,27 @@ axios@0.25.0: dependencies: follow-redirects "^1.14.7" -axios@0.26.0, axios@^0.26.0: - version "0.26.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.0.tgz#9a318f1c69ec108f8cd5f3c3d390366635e13928" - integrity sha512-lKoGLMYtHvFrPVt3r+RBMp9nh34N0M8zEfCWqdWZx6phynIEhQqAdydpyBAAG211zlhX9Rgu08cOamy6XjE5Og== +axios@0.26.1, axios@^0.26.1: + version "0.26.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" + integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== dependencies: follow-redirects "^1.14.8" -axios@^0.21.1: +axios@^0.21.1, axios@^0.21.2: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== dependencies: follow-redirects "^1.14.0" +axios@^0.26.0: + version "0.26.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.0.tgz#9a318f1c69ec108f8cd5f3c3d390366635e13928" + integrity sha512-lKoGLMYtHvFrPVt3r+RBMp9nh34N0M8zEfCWqdWZx6phynIEhQqAdydpyBAAG211zlhX9Rgu08cOamy6XjE5Og== + dependencies: + follow-redirects "^1.14.8" + b4a@^1.0.1: version "1.3.1" resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.3.1.tgz#5ead1402bd4a2dcfea35cc83928815d53315ff32" @@ -7244,16 +7384,6 @@ bn.js@4.11.8: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== -bn.js@=2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-2.0.4.tgz#220a7cd677f7f1bfa93627ff4193776fe7819480" - integrity sha1-Igp81nf38b+pNif/QZN3b+eBlIA= - -bn.js@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-2.2.0.tgz#12162bc2ae71fc40a5626c33438f3a875cd37625" - integrity sha1-EhYrwq5x/EClYmwzQ486h1zTdiU= - bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9: version "4.12.0" resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz" @@ -7465,11 +7595,6 @@ browserslist@^4.12.0, browserslist@^4.16.6, browserslist@^4.17.3: node-releases "^2.0.0" picocolors "^1.0.0" -bs58@=2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-2.0.0.tgz#72b713bed223a0ac518bbda0e3ce3f4817f39eb5" - integrity sha1-crcTvtIjoKxRi72g484/SBfznrU= - bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" @@ -7511,11 +7636,6 @@ buffer-alloc@^1.2.0: buffer-alloc-unsafe "^1.1.0" buffer-fill "^1.0.0" -buffer-compare@=1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-compare/-/buffer-compare-1.0.0.tgz#acaa7a966e98eee9fae14b31c39a5f158fb3c4a2" - integrity sha1-rKp6lm6Y7un64Usxw5pfFY+zxKI= - buffer-crc32@~0.2.3: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" @@ -8739,6 +8859,14 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" +cosmjs-types@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/cosmjs-types/-/cosmjs-types-0.2.1.tgz#bfa8e7721939e46f0fbd7848a82b3b47a2f7b3f2" + integrity sha512-EUG6TgdWkYHBzXjo5tZ82L+0QLijTu/rZGNIbJ/n07ST30GmptYkPmO+REX7qF4YUtli//Rfy0rrNzH9IMrMmw== + dependencies: + long "^4.0.0" + protobufjs "~6.11.2" + country-data@^0.0.31: version "0.0.31" resolved "https://registry.yarnpkg.com/country-data/-/country-data-0.0.31.tgz#80966b8e1d147fa6d6a589d32933f8793774956d" @@ -9709,16 +9837,6 @@ elliptic@6.5.4, elliptic@^6.0.0, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5 minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -elliptic@=3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-3.0.3.tgz#865c9b420bfbe55006b9f969f97a0d2c44966595" - integrity sha1-hlybQgv75VAGuflp+XoNLESWZZU= - dependencies: - bn.js "^2.0.0" - brorand "^1.0.1" - hash.js "^1.0.0" - inherits "^2.0.1" - emittery@^0.7.1: version "0.7.2" resolved "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz" @@ -12496,7 +12614,7 @@ inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, i resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.1, inherits@=2.0.1: +inherits@2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= @@ -14223,6 +14341,16 @@ leb128@^0.0.5: bn.js "^5.0.0" buffer-pipe "0.0.3" +ledger-cosmos-js@^2.1.8: + version "2.1.8" + resolved "https://registry.yarnpkg.com/ledger-cosmos-js/-/ledger-cosmos-js-2.1.8.tgz#b409ecd1e77f630e6fb212a9f602fe5c6e8f054b" + integrity sha512-Gl7SWMq+3R9OTkF1hLlg5+1geGOmcHX9OdS+INDsGNxSiKRWlsWCvQipGoDnRIQ6CPo2i/Ze58Dw0Mt/l3UYyA== + dependencies: + "@babel/runtime" "^7.11.2" + "@ledgerhq/hw-transport" "^5.25.0" + bech32 "^1.1.4" + ripemd160 "^2.0.2" + leven@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" @@ -14450,11 +14578,6 @@ lodash@4.17.21, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.1 resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -lodash@=3.10.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" - integrity sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y= - log-symbols@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" @@ -16837,7 +16960,7 @@ protobufjs@6.10.1: "@types/node" "^13.7.0" long "^4.0.0" -protobufjs@^6.10.0, protobufjs@^6.8.8: +protobufjs@^6.10.0, protobufjs@^6.8.8, protobufjs@~6.11.2: version "6.11.2" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.2.tgz#de39fabd4ed32beaa08e9bb1e30d08544c1edf8b" integrity sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw== @@ -21880,18 +22003,6 @@ yocto-queue@^0.1.0: resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zcash-bitcore-lib@^0.13.20-rc3: - version "0.13.20-rc3" - resolved "https://registry.yarnpkg.com/zcash-bitcore-lib/-/zcash-bitcore-lib-0.13.20-rc3.tgz#813a0f56dcf8b76bc1429951bea6d1236c507008" - integrity sha1-gToPVtz4t2vBQplRvqbRI2xQcAg= - dependencies: - bn.js "=2.0.4" - bs58 "=2.0.0" - buffer-compare "=1.0.0" - elliptic "=3.0.3" - inherits "=2.0.1" - lodash "=3.10.1" - zwitch@^1.0.0: version "1.0.5" resolved "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz"