Skip to content

Commit

Permalink
feat: lower the max nfts bridgeable to 30 (#210)
Browse files Browse the repository at this point in the history
* feat: lower the max nfts bridgeable to 30

* name update
  • Loading branch information
YohanTz authored Apr 26, 2024
1 parent d5f9855 commit dda55f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions apps/web/src/app/(routes)/bridge/[address]/TokenList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ export default function TokenList({ nftContractAddress }: TokenListProps) {
return <NftsLoadingState className="mt-20" type="token" />;
}

const hasMoreThan100Nfts =
nftsData.pages.length > 1 || (nftsData.pages.length === 1 && hasNextPage);
// const hasMoreThan100Nfts =
// nftsData.pages.length > 1 || (nftsData.pages.length === 1 && hasNextPage);
const hasMoreThanMaxSelectNfts =
nftsData.pages[0]?.ownedNfts.length ?? 0 > MAX_SELECTED_ITEMS;

const isAllSelected =
(totalSelectedNfts === MAX_SELECTED_ITEMS ||
Expand Down Expand Up @@ -137,7 +139,7 @@ export default function TokenList({ nftContractAddress }: TokenListProps) {
size="small"
>
<Typography variant="button_text_s">
{hasMoreThan100Nfts ? "Select 100 Max" : "Select All"}
{hasMoreThanMaxSelectNfts ? "Select 30 Max" : "Select All"}
</Typography>
</Button>
)}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/(routes)/bridge/_hooks/useNftSelection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import useAccountFromChain from "~/app/_hooks/useAccountFromChain";
import useCurrentChain from "~/app/_hooks/useCurrentChain";
import { type Nft } from "~/server/api/types";

export const MAX_SELECTED_ITEMS = 100;
export const MAX_SELECTED_ITEMS = 30;

export default function useNftSelection() {
const { sourceChain } = useCurrentChain();
Expand Down

0 comments on commit dda55f1

Please sign in to comment.