From 86df55e99a270cff5c84925e706985b868e38d46 Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Tue, 13 Feb 2024 12:34:31 +0700 Subject: [PATCH 1/2] Use `bestOpenOffer` instead of `bestBid`, `bestListing` instead of `firstSale` --- components/HomeSection/Assets.gql | 8 ++++---- components/HomeSection/FeaturedToken.gql | 2 +- components/Token/Card.tsx | 16 ++++++++-------- package-lock.json | 14 +++++++------- package.json | 2 +- pages/checkout/[id].gql | 8 ++++---- pages/collection/[chainId]/[id]/index.gql | 8 ++++---- pages/create/[chainId]/[collectionAddress].tsx | 8 ++++---- pages/explore/explore.gql | 8 ++++---- pages/tokens/[id]/bid.gql | 8 ++++---- pages/tokens/[id]/offer.gql | 8 ++++---- pages/users/[id]/assetDetail.gql | 8 ++++---- 12 files changed, 49 insertions(+), 49 deletions(-) diff --git a/components/HomeSection/Assets.gql b/components/HomeSection/Assets.gql index 047ac0fe..66d4d747 100644 --- a/components/HomeSection/Assets.gql +++ b/components/HomeSection/Assets.gql @@ -42,7 +42,7 @@ query FetchAssets($limit: Int!, $filter: [AssetFilter!]!, $address: Address) { owned: ownership(ownerAddress: $address) { quantity } - bestBid { + bestOpenOffer { unitPrice amount currency { @@ -53,7 +53,7 @@ query FetchAssets($limit: Int!, $filter: [AssetFilter!]!, $address: Address) { symbol } } - firstSale { + bestListing { id unitPrice currency { @@ -67,8 +67,8 @@ query FetchAssets($limit: Int!, $filter: [AssetFilter!]!, $address: Address) { address } } - totalSalesCount - totalSalesCurrencyDistinctCount + totalListingsCount + totalListingsCurrencyDistinctCount } } } diff --git a/components/HomeSection/FeaturedToken.gql b/components/HomeSection/FeaturedToken.gql index 26c8d063..1b809a1a 100644 --- a/components/HomeSection/FeaturedToken.gql +++ b/components/HomeSection/FeaturedToken.gql @@ -37,7 +37,7 @@ query FetchFeaturedToken( owned: ownership(ownerAddress: $address) { quantity } - bestBid { + bestOpenOffer { unitPrice amount currency { diff --git a/components/Token/Card.tsx b/components/Token/Card.tsx index ca45bb80..166bad46 100644 --- a/components/Token/Card.tsx +++ b/components/Token/Card.tsx @@ -54,14 +54,14 @@ export type Props = { quantity: string } | null quantity: string - bestBid: { + bestOpenOffer: { unitPrice: string currency: { decimals: number symbol: string } } | null - firstSale: { + bestListing: { id: string unitPrice: string currency: { @@ -72,8 +72,8 @@ export type Props = { address: string } } | null - totalSalesCount: number - totalSalesCurrencyDistinctCount: number + totalListingsCount: number + totalListingsCurrencyDistinctCount: number } } @@ -87,10 +87,10 @@ const TokenCard: FC = ({ asset }) => { const [isHovered, setIsHovered] = useState(false) const media = useDetectAssetMedia(asset) - const sale = asset.firstSale - const bestBid = asset.bestBid - const numberOfSales = asset.totalSalesCount - const hasMultiCurrency = asset.totalSalesCurrencyDistinctCount > 1 + const sale = asset.bestListing + const bestBid = asset.bestOpenOffer + const numberOfSales = asset.totalListingsCount + const hasMultiCurrency = asset.totalListingsCurrencyDistinctCount > 1 const chainName = useMemo( () => CHAINS.find((x) => x.id === asset.collection.chainId)?.name, [asset.collection.chainId, CHAINS], diff --git a/package-lock.json b/package-lock.json index d238a1de..77a4f420 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,7 @@ "@graphql-codegen/typescript-react-apollo": "^4.1.0", "@graphql-eslint/eslint-plugin": "^3.20.1", "@next/bundle-analyzer": "^14.0.4", - "@nft/api-graphql": "^1.0.0-beta.52-prerelease-3", + "@nft/api-graphql": "^1.0.0-beta.52-prerelease-7", "@types/nodemailer": "^6.4.14", "@types/nprogress": "^0.2.3", "@types/react": "^18.2.48", @@ -6724,9 +6724,9 @@ } }, "node_modules/@nft/api-graphql": { - "version": "1.0.0-beta.52-prerelease-3", - "resolved": "https://registry.npmjs.org/@nft/api-graphql/-/api-graphql-1.0.0-beta.52-prerelease-3.tgz", - "integrity": "sha512-FCYJOEb3V9GdM/6AIlJi/AS31Ia6/MnDpq3SxnofDsEhPD8IppRVmBKf0j8hejdL/CHVsNZwnRKsYsGTleVaGA==", + "version": "1.0.0-beta.52-prerelease-7", + "resolved": "https://registry.npmjs.org/@nft/api-graphql/-/api-graphql-1.0.0-beta.52-prerelease-7.tgz", + "integrity": "sha512-H2tFbcBw3MYIhwMj4eiruP6UpDGU/P8EWgSkGMGR+te6WU4fDdwA7zXM6AMXkwn2kiXHwXpVb/4D0eplAZuqHQ==", "dev": true }, "node_modules/@nft/chat": { @@ -26699,9 +26699,9 @@ "optional": true }, "@nft/api-graphql": { - "version": "1.0.0-beta.52-prerelease-3", - "resolved": "https://registry.npmjs.org/@nft/api-graphql/-/api-graphql-1.0.0-beta.52-prerelease-3.tgz", - "integrity": "sha512-FCYJOEb3V9GdM/6AIlJi/AS31Ia6/MnDpq3SxnofDsEhPD8IppRVmBKf0j8hejdL/CHVsNZwnRKsYsGTleVaGA==", + "version": "1.0.0-beta.52-prerelease-7", + "resolved": "https://registry.npmjs.org/@nft/api-graphql/-/api-graphql-1.0.0-beta.52-prerelease-7.tgz", + "integrity": "sha512-H2tFbcBw3MYIhwMj4eiruP6UpDGU/P8EWgSkGMGR+te6WU4fDdwA7zXM6AMXkwn2kiXHwXpVb/4D0eplAZuqHQ==", "dev": true }, "@nft/chat": { diff --git a/package.json b/package.json index acdcd019..81707e80 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@graphql-codegen/typescript-react-apollo": "^4.1.0", "@graphql-eslint/eslint-plugin": "^3.20.1", "@next/bundle-analyzer": "^14.0.4", - "@nft/api-graphql": "^1.0.0-beta.52-prerelease-3", + "@nft/api-graphql": "^1.0.0-beta.52-prerelease-7", "@types/nodemailer": "^6.4.14", "@types/nprogress": "^0.2.3", "@types/react": "^18.2.48", diff --git a/pages/checkout/[id].gql b/pages/checkout/[id].gql index 956d14a5..bd19c421 100644 --- a/pages/checkout/[id].gql +++ b/pages/checkout/[id].gql @@ -28,7 +28,7 @@ query Checkout($id: UUID!, $address: Address) { quantity } quantity - bestBid { + bestOpenOffer { unitPrice amount currency { @@ -39,7 +39,7 @@ query Checkout($id: UUID!, $address: Address) { symbol } } - firstSale { + bestListing { id unitPrice currency { @@ -53,8 +53,8 @@ query Checkout($id: UUID!, $address: Address) { address } } - totalSalesCount - totalSalesCurrencyDistinctCount + totalListingsCount + totalListingsCurrencyDistinctCount } maker { address diff --git a/pages/collection/[chainId]/[id]/index.gql b/pages/collection/[chainId]/[id]/index.gql index 150b074c..e7f4c4f8 100644 --- a/pages/collection/[chainId]/[id]/index.gql +++ b/pages/collection/[chainId]/[id]/index.gql @@ -101,7 +101,7 @@ query FetchCollectionAssets( quantity } quantity - bestBid { + bestOpenOffer { unitPrice amount currency { @@ -112,7 +112,7 @@ query FetchCollectionAssets( symbol } } - firstSale { + bestListing { id unitPrice currency { @@ -126,8 +126,8 @@ query FetchCollectionAssets( address } } - totalSalesCount - totalSalesCurrencyDistinctCount + totalListingsCount + totalListingsCurrencyDistinctCount } } } diff --git a/pages/create/[chainId]/[collectionAddress].tsx b/pages/create/[chainId]/[collectionAddress].tsx index ed329c70..1a335da4 100644 --- a/pages/create/[chainId]/[collectionAddress].tsx +++ b/pages/create/[chainId]/[collectionAddress].tsx @@ -145,10 +145,10 @@ const CreatePage: NextPage = () => { asset={{ ...asset, creator, - bestBid: null, - firstSale: null, - totalSalesCount: 0, - totalSalesCurrencyDistinctCount: 0, + bestOpenOffer: null, + bestListing: null, + totalListingsCount: 0, + totalListingsCurrencyDistinctCount: 0, }} /> )} diff --git a/pages/explore/explore.gql b/pages/explore/explore.gql index 80477650..5e7501e8 100644 --- a/pages/explore/explore.gql +++ b/pages/explore/explore.gql @@ -32,7 +32,7 @@ query FetchAllERC721And1155( quantity } quantity - bestBid { + bestOpenOffer { unitPrice amount currency { @@ -43,7 +43,7 @@ query FetchAllERC721And1155( symbol } } - firstSale { + bestListing { id unitPrice currency { @@ -57,8 +57,8 @@ query FetchAllERC721And1155( address } } - totalSalesCount - totalSalesCurrencyDistinctCount + totalListingsCount + totalListingsCurrencyDistinctCount creator { address name diff --git a/pages/tokens/[id]/bid.gql b/pages/tokens/[id]/bid.gql index a41992e9..dcc8c4d8 100644 --- a/pages/tokens/[id]/bid.gql +++ b/pages/tokens/[id]/bid.gql @@ -34,7 +34,7 @@ query BidOnAsset( owned: ownership(ownerAddress: $address) { quantity } - bestBid { + bestOpenOffer { unitPrice amount currency { @@ -45,7 +45,7 @@ query BidOnAsset( symbol } } - firstSale { + bestListing { id unitPrice currency { @@ -59,8 +59,8 @@ query BidOnAsset( address } } - totalSalesCount - totalSalesCurrencyDistinctCount + totalListingsCount + totalListingsCurrencyDistinctCount } currencies( orderBy: CREATED_AT_ASC diff --git a/pages/tokens/[id]/offer.gql b/pages/tokens/[id]/offer.gql index 33963b38..cd7dbd12 100644 --- a/pages/tokens/[id]/offer.gql +++ b/pages/tokens/[id]/offer.gql @@ -29,7 +29,7 @@ query OfferForAsset( quantity } quantity - bestBid { + bestOpenOffer { unitPrice amount currency { @@ -40,7 +40,7 @@ query OfferForAsset( symbol } } - firstSale { + bestListing { id unitPrice currency { @@ -54,8 +54,8 @@ query OfferForAsset( address } } - totalSalesCount - totalSalesCurrencyDistinctCount + totalListingsCount + totalListingsCurrencyDistinctCount creator { address name diff --git a/pages/users/[id]/assetDetail.gql b/pages/users/[id]/assetDetail.gql index 622976aa..58338ded 100644 --- a/pages/users/[id]/assetDetail.gql +++ b/pages/users/[id]/assetDetail.gql @@ -14,7 +14,7 @@ fragment AssetDetail on Asset { imageMimetype animationUrl animationMimetype - bestBid { + bestOpenOffer { unitPrice amount currency { @@ -25,7 +25,7 @@ fragment AssetDetail on Asset { symbol } } - firstSale { + bestListing { id unitPrice currency { @@ -39,8 +39,8 @@ fragment AssetDetail on Asset { address } } - totalSalesCount - totalSalesCurrencyDistinctCount + totalListingsCount + totalListingsCurrencyDistinctCount creator { address name From a183782c1c399e9c0bc069ca6c55a0a26f62092e Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Thu, 15 Feb 2024 10:42:04 +0700 Subject: [PATCH 2/2] Update LightLink RPC urls --- environment.ts | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/environment.ts b/environment.ts index e02441e4..36401d4c 100644 --- a/environment.ts +++ b/environment.ts @@ -246,7 +246,7 @@ const getEnvironment = async (): Promise => { arbitrum, arbitrumSepolia, { - name: 'LightLink Phoenix', + name: 'Lightlink Phoenix Mainnet', network: 'lightlink-phoenix', id: 1890, nativeCurrency: { @@ -256,16 +256,10 @@ const getEnvironment = async (): Promise => { }, rpcUrls: { default: { - http: [ - 'https://replicator-01.phoenix.lightlink.io/rpc/v1', - 'https://replicator-02.phoenix.lightlink.io/rpc/v1', - ], + http: ['https://replicator.phoenix.lightlink.io/rpc/v1'], }, public: { - http: [ - 'https://replicator-01.phoenix.lightlink.io/rpc/v1', - 'https://replicator-02.phoenix.lightlink.io/rpc/v1', - ], + http: ['https://replicator.phoenix.lightlink.io/rpc/v1'], }, }, blockExplorers: { @@ -276,7 +270,7 @@ const getEnvironment = async (): Promise => { }, }, { - name: 'LightLink Pegasus Testnet', + name: 'Lightlink Pegasus Testnet', network: 'lightlink-pegasus', testnet: true, id: 1891, @@ -287,16 +281,10 @@ const getEnvironment = async (): Promise => { }, rpcUrls: { default: { - http: [ - 'https://replicator-01.pegasus.lightlink.io/rpc/v1', - 'https://replicator-02.pegasus.lightlink.io/rpc/v1', - ], + http: ['https://replicator.pegasus.lightlink.io/rpc/v1'], }, public: { - http: [ - 'https://replicator-01.pegasus.lightlink.io/rpc/v1', - 'https://replicator-02.pegasus.lightlink.io/rpc/v1', - ], + http: ['https://replicator.pegasus.lightlink.io/rpc/v1'], }, }, blockExplorers: {