Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v3.4.0 #569

Merged
merged 74 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
00a1646
add .graphqlrc.yml file
NicolasMahe Jan 23, 2024
8d8647d
fix compatibility with graphql-eslint
NicolasMahe Jan 23, 2024
f093b67
Update .graphqlrc.yml
NicolasMahe Jan 24, 2024
2442cce
Remove chain from query filter in collection page
NicolasMahe Jan 25, 2024
99284a1
Feature / Homepage banners added
ismailToyran Jan 26, 2024
e5e7fce
Add bg and priority to image
ismailToyran Jan 30, 2024
883b8a4
Add maker address to gql queries
ismailToyran Jan 30, 2024
a4f2979
Refactor CardFooter and Card components for fixedPrice sale
ismailToyran Jan 30, 2024
3c0001a
Fix missing query
ismailToyran Jan 30, 2024
67fe1c8
Add comment
ismailToyran Jan 30, 2024
28e4ddf
Merge pull request #546 from liteflow-labs/fix/erc-1155-cart-case
antho1404 Jan 31, 2024
926b642
Refactor conditional statement in Banner.tsx
ismailToyran Jan 31, 2024
d214fe0
Merge branch 'dev' into feature/homepage-banners-added
ismailToyran Jan 31, 2024
a5118c9
Refactor conditional statement in Banner.tsx
ismailToyran Jan 31, 2024
6924edf
Merge branch 'feature/homepage-banners-added' of github.com:liteflow-…
ismailToyran Jan 31, 2024
ce79985
Merge pull request #542 from liteflow-labs/feature/homepage-banners-a…
antho1404 Jan 31, 2024
fae99ac
Fix / Cart approve button text
ismailToyran Jan 31, 2024
0124dc4
Merge branch 'dev' into fix/cart-approve-button-text
ismailToyran Jan 31, 2024
32b4203
Merge pull request #548 from liteflow-labs/fix/cart-approve-button-text
ismailToyran Jan 31, 2024
68b6012
Add signature modal and signature functionality
ismailToyran Jan 31, 2024
f93374a
Merge branch 'dev' into dux/graphqlrc
NicolasMahe Feb 1, 2024
8e7ea13
Merge pull request #531 from liteflow-labs/dux/graphqlrc
NicolasMahe Feb 1, 2024
bd7093f
remove unlockedContent from FetchCartItems query
NicolasMahe Feb 1, 2024
df7fe55
Merge pull request #550 from liteflow-labs/chore/remove-unlockedContent
NicolasMahe Feb 1, 2024
a0d16d8
Replace deprecated valuePerTenThousand in useFees query
NicolasMahe Feb 1, 2024
e7202b0
flatten asset history query
NicolasMahe Feb 1, 2024
4d4144c
Flatten FetchCollectionTraits query
NicolasMahe Feb 1, 2024
00e5778
Replace cursor by offset in GetNotifications query
NicolasMahe Feb 1, 2024
5ff742f
Remove filter on deprecated `isImported` in `FetchExploreUsers` query
NicolasMahe Feb 1, 2024
d698be9
Merge pull request #552 from liteflow-labs/chore/flatten-asset-histor…
NicolasMahe Feb 1, 2024
f862163
Merge pull request #553 from liteflow-labs/chore/flatten-FetchCollect…
NicolasMahe Feb 1, 2024
b0e08d5
Merge pull request #555 from liteflow-labs/chore/remove-cursor-notifi…
NicolasMahe Feb 1, 2024
2fb3b27
Merge pull request #551 from liteflow-labs/chore/remove-deprecated-va…
NicolasMahe Feb 1, 2024
5070a3f
fix
NicolasMahe Feb 1, 2024
08bf140
Flatten collection in asset filter
NicolasMahe Feb 1, 2024
04108b9
Merge pull request #556 from liteflow-labs/chore/remove-deprecated-is…
NicolasMahe Feb 1, 2024
561cf5d
Merge pull request #557 from liteflow-labs/chore/flatten-collection-f…
NicolasMahe Feb 1, 2024
30fba54
Remove assigning taker when creating offer. This is deprecated by the…
NicolasMahe Feb 1, 2024
12e979b
Flatten bids and sales in FetchAsset query
NicolasMahe Feb 1, 2024
f30b3af
Merge pull request #558 from liteflow-labs/chore/remove-offer-taker
NicolasMahe Feb 1, 2024
70237ed
Merge pull request #559 from liteflow-labs/chore/flatten-fatch-asset-…
NicolasMahe Feb 1, 2024
121f718
Update signature function name in useAccount hook
ismailToyran Feb 1, 2024
e4aa9e1
Rename SignatureModal component and update AccountProvider
ismailToyran Feb 1, 2024
eb8f1d8
Remove TODO comment for loader in SignModal component
ismailToyran Feb 1, 2024
c856d4d
Refactor handleLogin function in _app.tsx
ismailToyran Feb 1, 2024
a751c10
Add loader to sign button
ismailToyran Feb 1, 2024
779bb65
flatten notifications in NavbarAccount
NicolasMahe Feb 1, 2024
6c91ee7
Merge pull request #554 from liteflow-labs/chore/split-NavbarAccount-…
NicolasMahe Feb 1, 2024
0d1afdd
Use bestBid resolver on asset instead of bids connection
NicolasMahe Feb 2, 2024
7c9fe50
Flatten `ownerships` in `fetchAsset` query
NicolasMahe Feb 2, 2024
96f5dfb
Merge pull request #562 from liteflow-labs/chore/flatten-ownerships-f…
NicolasMahe Feb 2, 2024
3fbc0d6
Merge branch 'dev' into signature-modal-added
antho1404 Feb 2, 2024
f1eb165
Merge branch 'dev' into chore/asset-bestBid-resolver
NicolasMahe Feb 2, 2024
0b9fbda
Merge pull request #549 from liteflow-labs/signature-modal-added
antho1404 Feb 2, 2024
2f64755
Use custom sales resolvers on asset instead of sales connection
NicolasMahe Feb 2, 2024
a31a0e1
update lib to prerelease
NicolasMahe Feb 2, 2024
838e686
fix lint
NicolasMahe Feb 2, 2024
fa95e4b
Merge branch 'dev' into chore/asset-bestBid-resolver
NicolasMahe Feb 2, 2024
06740da
Merge pull request #561 from liteflow-labs/chore/asset-bestBid-resolver
NicolasMahe Feb 2, 2024
2903533
flatten `sales` in `FetchFeaturedAssets` query
NicolasMahe Feb 2, 2024
abe8558
add comment
NicolasMahe Feb 2, 2024
be9538b
remove limit on offerOpenSales
NicolasMahe Feb 2, 2024
56e7b6c
Remove FetchFeaturedAssets query by multiple FetchFeaturedToken query
NicolasMahe Feb 2, 2024
c48e592
Replace asset id
NicolasMahe Feb 2, 2024
947bb40
Remove extra props chainId from SaleDirectButton
NicolasMahe Feb 3, 2024
0c79622
Flatten `FetchDrops` query
NicolasMahe Feb 4, 2024
ec3df4b
Merge branch 'dev' into fix/collection-filters-chainId
antho1404 Feb 5, 2024
df223dc
display all drops, even if they belong to the same collection
NicolasMahe Feb 5, 2024
84beb67
Merge pull request #540 from liteflow-labs/fix/collection-filters-cha…
antho1404 Feb 5, 2024
936119e
Merge pull request #566 from liteflow-labs/chore/flatten-FetchDrops-q…
NicolasMahe Feb 5, 2024
5ea82de
Merge pull request #563 from liteflow-labs/chore/flatten-sales-FetchF…
NicolasMahe Feb 5, 2024
61cf921
Merge pull request #565 from liteflow-labs/chore/remove-asset-id
NicolasMahe Feb 5, 2024
d45ee84
Add rounded corners and overflow hidden to Banner component
ismailToyran Feb 8, 2024
444c478
Merge pull request #568 from liteflow-labs/homepage-banner-ui-improve…
ismailToyran Feb 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintrc.gql.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
module.exports = {
root: true,
parser: '@graphql-eslint/eslint-plugin',
parserOptions: {
schema: 'node_modules/@nft/api-graphql/schema.graphql',
operations: '**/*.gql',
},
plugins: ['@graphql-eslint/eslint-plugin'],
extends: ['plugin:@graphql-eslint/operations-recommended'],
rules: {
Expand Down
2 changes: 2 additions & 0 deletions .graphqlrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: './node_modules/@nft/api-graphql/schema.graphql'
documents: '{components,hooks,pages}/**/*.{graphql,gql}'
10 changes: 7 additions & 3 deletions components/Cart/CartDrawerListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ type Props = {
symbol: string
}
asset: {
id: string
chainId: number
collectionAddress: string
tokenId: string
image: string
name: string
collection: {
Expand All @@ -47,7 +49,9 @@ const CartDrawerListItem: FC<Props> = ({ offer }) => {
return (
<ListItem
image={
<Link href={`/tokens/${offer.asset.id}`}>
<Link
href={`/tokens/${offer.asset.chainId}-${offer.asset.collectionAddress}-${offer.asset.tokenId}`}
>
<Image
src={offer.asset.image}
alt={offer.asset.name}
Expand All @@ -62,7 +66,7 @@ const CartDrawerListItem: FC<Props> = ({ offer }) => {
label={
<Text
as={Link}
href={`/tokens/${offer.asset.id}`}
href={`/tokens/${offer.asset.chainId}-${offer.asset.collectionAddress}-${offer.asset.tokenId}`}
variant="subtitle2"
color="gray.800"
title={offer.asset.name}
Expand Down
5 changes: 0 additions & 5 deletions components/Cart/Step/Selection.gql
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ query FetchCartItems($offerIds: [UUID!]!) {
symbol
}
asset {
id
chainId
collectionAddress
tokenId
Expand All @@ -34,10 +33,6 @@ query FetchCartItems($offerIds: [UUID!]!) {
name
image
imageMimetype
unlockedContent {
url
mimetype
}
animationUrl
animationMimetype
}
Expand Down
4 changes: 2 additions & 2 deletions components/Cart/Step/Transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import useSigner from '../../../hooks/useSigner'
import ConnectButtonWithNetworkSwitch from '../../Button/ConnectWithNetworkSwitch'
import List, { ListItem } from '../../List/List'
import BatchPurchaseModal from '../../Modal/BatchPurchase'
import Price, { formatPrice } from '../../Price/Price'
import Price from '../../Price/Price'
import CartItemSummary from '../ItemSummary'

type Props = {
Expand Down Expand Up @@ -190,7 +190,7 @@ const CartStepTransaction: FC<Props> = ({
isLoading={approvalLoading[item.currency.id] || false}
>
{t('cart.step.transaction.button.approve', {
value: formatPrice(item.amount, item.currency),
value: item.currency.symbol,
})}
</ConnectButtonWithNetworkSwitch>
) : balances[item.currency.id] &&
Expand Down
64 changes: 29 additions & 35 deletions components/Drop/DropCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
Stack,
Text,
} from '@chakra-ui/react'
import { BigNumber } from '@ethersproject/bignumber'
import { HiArrowNarrowRight } from '@react-icons/all-files/hi/HiArrowNarrowRight'
import { HiBadgeCheck } from '@react-icons/all-files/hi/HiBadgeCheck'
import Trans from 'next-translate/Trans'
Expand All @@ -25,21 +24,21 @@ import Link from '../Link/Link'
import Price from '../Price/Price'

type Props = {
collection: {
address: string
chainId: number
cover: string | null
image: string | null
name: string
deployer: {
drop: {
collection: {
address: string
name: string | null
verification: {
status: AccountVerificationStatus
} | null
chainId: number
cover: string | null
image: string | null
name: string
deployer: {
address: string
name: string | null
verification: {
status: AccountVerificationStatus
} | null
}
}
}
drop: {
startDate: Date
endDate: Date
unitPrice: string
Expand All @@ -48,17 +47,12 @@ type Props = {
symbol: string
image: string
}
supply: string | null
}
totalSupply: BigNumber | null
onCountdownEnd?: () => void
}

export default function DropCard({
collection,
drop,
totalSupply,
onCountdownEnd,
}: Props) {
export default function DropCard({ drop, onCountdownEnd }: Props) {
const { t } = useTranslation('components')
const status = useTimeStatus(drop)

Expand All @@ -71,7 +65,7 @@ export default function DropCard({
return (
<Box
as={Link}
href={`/collection/${collection.chainId}/${collection.address}/drop`}
href={`/collection/${drop.collection.chainId}/${drop.collection.address}/drop`}
borderWidth="1px"
borderRadius="2xl"
w="full"
Expand All @@ -90,10 +84,10 @@ export default function DropCard({
}}
bg="gray.100"
>
{collection.cover && (
{drop.collection.cover && (
<Image
src={collection.cover}
alt={collection.name}
src={drop.collection.cover}
alt={drop.collection.name}
fill
sizes="(min-width: 62em) 600px, 100vw"
objectFit="cover"
Expand Down Expand Up @@ -140,10 +134,10 @@ export default function DropCard({
mb={4}
bg="gray.200"
>
{collection.image && (
{drop.collection.image && (
<Image
src={collection.image}
alt={collection.name}
src={drop.collection.image}
alt={drop.collection.name}
fill
sizes="72px"
objectFit="cover"
Expand All @@ -154,34 +148,34 @@ export default function DropCard({
<Flex position="relative" justifyContent="space-between" gap={4} w="full">
<Flex flexDir="column" gap={1}>
<Heading variant="heading2" color="white" isTruncated>
{collection.name}
{drop.collection.name}
</Heading>

<Flex alignItems="center" gap={1.5}>
<Text variant="button2" color="white">
{t('drop.by', {
address:
collection.deployer.name ||
formatAddress(collection.deployer.address, 10),
drop.collection.deployer.name ||
formatAddress(drop.collection.deployer.address, 10),
})}
</Text>
{collection.deployer.verification?.status === 'VALIDATED' && (
{drop.collection.deployer.verification?.status === 'VALIDATED' && (
<Icon as={HiBadgeCheck} color="brand.500" h={4} w={4} />
)}
</Flex>

<Flex alignItems="center" gap={2}>
{totalSupply ? (
{drop.supply ? (
<Text variant="caption" color="white">
<Trans
ns="components"
i18nKey="drop.supply.available"
values={{
count: totalSupply.toNumber(),
count: parseInt(drop.supply, 10),
}}
components={[
<>
{numbro(totalSupply).format({
{numbro(drop.supply).format({
thousandSeparated: true,
})}
</>,
Expand Down
24 changes: 9 additions & 15 deletions components/Filter/FilterBy/Trait.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ const FilterByTrait: FC<Props> = ({
notifyOnNetworkStatusChange: true,
})

const traitsData = data?.collection?.traitsOfCollection.nodes
const hasNextPage = data?.collection?.traitsOfCollection.pageInfo.hasNextPage
const traitsData = data?.collectionTraits?.nodes
const hasNextPage = data?.collectionTraits?.pageInfo.hasNextPage

const loadMore = useCallback(async () => {
const newOffset = offset + PAGINATION_LIMIT
Expand All @@ -76,22 +76,16 @@ const FilterByTrait: FC<Props> = ({
// Cannot use concatToQuery function because of nested cache
// Nested cache comes from the shape of FetchCollectionTraits query above
updateQuery: (prevResult, { fetchMoreResult }) => {
if (
!fetchMoreResult ||
!fetchMoreResult.collection?.traitsOfCollection
)
if (!fetchMoreResult || !fetchMoreResult.collectionTraits)
return prevResult
return {
...fetchMoreResult,
collection: {
...fetchMoreResult.collection,
traitsOfCollection: {
...fetchMoreResult.collection.traitsOfCollection,
nodes: [
...(prevResult?.collection?.traitsOfCollection.nodes || []),
...fetchMoreResult.collection.traitsOfCollection.nodes,
],
},
collectionTraits: {
...fetchMoreResult.collectionTraits,
nodes: [
...(prevResult?.collectionTraits?.nodes || []),
...fetchMoreResult.collectionTraits.nodes,
],
},
}
},
Expand Down
86 changes: 41 additions & 45 deletions components/History/HistoryList.gql
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,51 @@ query FetchAssetHistory(
$offset: Int!
$filter: [AssetHistoryAction!]
) {
asset(
chainId: $chainId
collectionAddress: $collectionAddress
tokenId: $tokenId
assetHistories(
filter: {
chainId: { equalTo: $chainId }
collectionAddress: { equalTo: $collectionAddress }
tokenId: { equalTo: $tokenId }
action: { in: $filter }
}
orderBy: DATE_DESC
first: $limit
offset: $offset
includeWhenAssetDeleted: YES
includeWhenCurrencyDeleted: YES
) {
chainId
collectionAddress
tokenId
histories(
filter: { action: { in: $filter } }
orderBy: DATE_DESC
first: $limit
offset: $offset
includeWhenAssetDeleted: YES
includeWhenCurrencyDeleted: YES
) {
pageInfo {
hasNextPage
hasPreviousPage
}
nodes {
action
date
unitPrice
quantity
fromAddress
from {
address
name
image
verification {
status
}
}
toAddress
to {
address
name
image
verification {
status
}
pageInfo {
hasNextPage
hasPreviousPage
}
nodes {
action
date
unitPrice
quantity
fromAddress
from {
address
name
image
verification {
status
}
transactionHash
currency {
decimals
symbol
}
toAddress
to {
address
name
image
verification {
status
}
}
transactionHash
currency {
decimals
symbol
}
}
}
}
10 changes: 4 additions & 6 deletions components/History/HistoryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ const HistoryList: FC<IProps> = ({ chainId, collectionAddress, tokenId }) => {
filter,
},
})
const histories = historyData?.asset?.histories.nodes
const histories = historyData?.assetHistories?.nodes

const ListItem = (
history: NonNullable<
FetchAssetHistoryQuery['asset']
>['histories']['nodes'][0],
history: NonNullable<FetchAssetHistoryQuery['assetHistories']>['nodes'][0],
i: number,
) => {
switch (history.action) {
Expand Down Expand Up @@ -140,9 +138,9 @@ const HistoryList: FC<IProps> = ({ chainId, collectionAddress, tokenId }) => {
<Pagination
page={page}
onPageChange={setPage}
hasNextPage={historyData?.asset?.histories.pageInfo.hasNextPage}
hasNextPage={historyData?.assetHistories?.pageInfo.hasNextPage}
hasPreviousPage={
historyData?.asset?.histories.pageInfo.hasPreviousPage
historyData?.assetHistories?.pageInfo.hasPreviousPage
}
withoutLimit
withoutNumbers
Expand Down
Loading
Loading