Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #255 from tqtezos/v0.4.1
Browse files Browse the repository at this point in the history
v0.4.1
  • Loading branch information
lambdahands authored Mar 16, 2021
2 parents c5cdc2c + 3e6a384 commit eb8b15e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/mainnet.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"rpc": "https://mainnet-tezos.giganode.io",
"rpc": "https://rpc.tzbeta.net",
"network": "mainnet",
"bcd": {
"api": "https://api.better-call.dev",
Expand Down
2 changes: 1 addition & 1 deletion config/testnet.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"rpc": "https://edonet-tezos.giganode.io",
"rpc": "https://rpctest.tzbeta.net",
"network": "edonet",
"bcd": {
"api": "https://api.better-call.dev",
Expand Down
10 changes: 8 additions & 2 deletions src/lib/nfts/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ export async function getContractNfts(

// get tokens listed for sale
const fixedPriceStorage = await system.betterCallDev.getContractStorage(system.config.contracts.marketplace.fixedPrice.tez);
const fixedPriceSales = await system.betterCallDev.getBigMapKeys(fixedPriceStorage.value);
const fixedPriceBigMapId = select(fixedPriceStorage, {
type: 'big_map'
})?.value;
const fixedPriceSales = await system.betterCallDev.getBigMapKeys(fixedPriceBigMapId);

return Promise.all(
tokens.map(
Expand All @@ -70,7 +73,10 @@ export async function getContractNfts(
return { ...acc, [next.name]: fromHexString(next.value) };
}, {});

if (ipfsUriToCid(metadata[''])) {
if (ipfsUriToCid(metadata['""'])) {
const resolvedMetadata = await system.resolveMetadata(metadata['""']);
metadata = { ...metadata, ...resolvedMetadata.metadata };
} else if (ipfsUriToCid(metadata[''])) {
const resolvedMetadata = await system.resolveMetadata(metadata['']);
metadata = { ...metadata, ...resolvedMetadata.metadata };
}
Expand Down

0 comments on commit eb8b15e

Please sign in to comment.