diff --git a/cli/src/commands/sync.ts b/cli/src/commands/sync.ts index 308a86abb3..ccaf3fdaa6 100644 --- a/cli/src/commands/sync.ts +++ b/cli/src/commands/sync.ts @@ -29,18 +29,20 @@ export default { const { currencyId } = decodeAccountId(account.id); const currency = getCryptoCurrencyById(currencyId); const currencyBridge = getCurrencyBridge(currency); - const { nftMetadataResolver } = currencyBridge; + const { nftsResolvers } = currencyBridge; - return account.nfts?.length && nftMetadataResolver + return account.nfts?.length && nftsResolvers?.nftMetadata ? { ...account, nfts: await Promise.all( account.nfts.map(async (nft) => { - const { result: metadata } = await nftMetadataResolver({ - contract: nft.contract, - tokenId: nft.tokenId, - currencyId: nft.currencyId, - }); + const { result: metadata } = await nftsResolvers?.nftMetadata( + { + contract: nft.contract, + tokenId: nft.tokenId, + currencyId: nft.currencyId, + } + ); return { ...nft, metadata }; })