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

docs: cleared the instructions resgarding initializing the repository #143

Closed
wants to merge 158 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
84b6325
feat: add onest-font in application
heronlancellot Dec 12, 2023
c61f190
feat: add fonts & dark/light mode
heronlancellot Dec 18, 2023
2f9f9a7
Merge pull request #36 from blockful-io/feat/add-fonts
heronlancellot Dec 18, 2023
cb6b328
refactor: adjust imports
heronlancellot Dec 18, 2023
f97e6b5
feat: add swaplace header icons
heronlancellot Dec 18, 2023
53c7fd8
Merge pull request #37 from blockful-io/feat/header
heronlancellot Dec 18, 2023
4ec10ab
feat: add prettier
heronlancellot Dec 19, 2023
d1aeb68
feat: add CONTRIBUTING.MD
heronlancellot Dec 19, 2023
82258c1
Merge pull request #41 from blockful-io/feat/contributing-md
heronlancellot Dec 19, 2023
0643029
feat: add empty-cards
heronlancellot Dec 20, 2023
f88188d
Merge pull request #43 from heronlancellot/feat/empty-cards
heronlancellot Dec 20, 2023
8cbd7d5
feat: add swap offers filter
heronlancellot Dec 21, 2023
d93ed66
Merge pull request #47 from heronlancellot/feat/filter-offers
heronlancellot Dec 21, 2023
23f4862
feat: add create-swap
heronlancellot Dec 23, 2023
9ee7920
Merge pull request #49 from heronlancellot/feat/sm-connection-create-…
heronlancellot Dec 23, 2023
5ddcdd5
feat: add create-swap-n-n
heronlancellot Dec 27, 2023
b2373ee
Merge pull request #52 from heronlancellot/feat/create-swap-n-n
heronlancellot Dec 27, 2023
31cbbd0
feat: add approve tokens nft
heronlancellot Jan 2, 2024
ea64792
Merge pull request #55 from heronlancellot/feat/approve-swap-nfts
heronlancellot Jan 2, 2024
85f63af
feat: add getApprovedSwap
heronlancellot Jan 3, 2024
027b7fb
feat: add create array approved
heronlancellot Jan 5, 2024
8cd2e35
feat: add initial structure getSelectedNftsApproval
heronlancellot Jan 5, 2024
b1209e3
feat: renamed some functions
FrancoAguzzi Jan 5, 2024
aae2e63
fix: token approved if-else statement
heronlancellot Jan 5, 2024
5de0ffe
feat: add validations in UI create-swap
heronlancellot Jan 6, 2024
973612b
feat: add scroll in offer-sumary
heronlancellot Jan 6, 2024
bfce120
feat: add onClick not enabled in Create-swap
heronlancellot Jan 8, 2024
b0fe2db
feat: add community standards docs
heronlancellot Jan 13, 2024
e623c0b
Merge pull request #58 from heronlancellot/feat/docs-community
heronlancellot Jan 13, 2024
ee6c30f
Merge branch 'blockful-io:main' into feat/get-approved-tokens
heronlancellot Jan 15, 2024
c927953
Merge branch 'develop' into feat/get-approved-tokens
heronlancellot Jan 15, 2024
f17869b
Merge pull request #59 from heronlancellot/feat/get-approved-tokens
heronlancellot Jan 15, 2024
33bfc60
feat: add approval-modal
heronlancellot Jan 16, 2024
3d60696
refactor: swap-modal confirmation
heronlancellot Jan 19, 2024
e2007d8
feat: Created Swap Modal status state inside SwapContext
FrancoAguzzi Jan 19, 2024
9524c6c
refactor: component refactor
heronlancellot Jan 23, 2024
378eb52
feat: Reusing generic TransactionStatus enum
FrancoAguzzi Jan 23, 2024
f626966
feat: add generic swap confirmation modal
heronlancellot Jan 24, 2024
17aabfa
refactor: card style
heronlancellot Jan 24, 2024
700d813
refactor: modal style nfts
heronlancellot Jan 24, 2024
a9def41
refator: css modal component
heronlancellot Jan 24, 2024
fb38bb1
fix: add condition to styleType in Nft Card
heronlancellot Jan 24, 2024
6e4765d
Created new SwapModalSteps
FrancoAguzzi Jan 25, 2024
1b15215
refactor: swap transaction status
heronlancellot Jan 26, 2024
4d0627d
Merge pull request #63 from heronlancellot/feat/approval-modal
heronlancellot Jan 26, 2024
dbb3649
implement layout of SwapOfferDetails stateless component
Stasn13 Jan 26, 2024
32d47db
feat: add tooltips && adjust TheHeader icons with tooltips
heronlancellot Jan 31, 2024
fc21c9c
Merge pull request #70 from heronlancellot/feat/tooltip
heronlancellot Jan 31, 2024
d108ffc
Merge branch 'develop' of https://github.com/blockful-io/swaplace-dap…
Stasn13 Feb 1, 2024
c3edc53
remove SwapOfferDetails from OfferSummary
Stasn13 Feb 1, 2024
2d396e7
Merge pull request #64 from Stasn13/feat/create-a-swap-offer-details
heronlancellot Feb 2, 2024
0aa6055
adjust auth router push
eduramme Feb 6, 2024
63bc8fe
Merge pull request #84 from blockful-io/feat/adjust-auth-router
heronlancellot Feb 6, 2024
3a89bde
Configured ESLint and fixed lint errors
FrancoAguzzi Feb 7, 2024
98da18a
Merge pull request #85 from heronlancellot/develop
heronlancellot Feb 7, 2024
1d7e454
Removed unused import
FrancoAguzzi Feb 7, 2024
8fc8b4c
Merge branch 'blockful-io:develop' into develop
heronlancellot Feb 7, 2024
757c46c
Merge pull request #86 from heronlancellot/develop
heronlancellot Feb 7, 2024
7397e6d
fix header active tab icon
eduramme Feb 7, 2024
15ec4d6
create dark and light mode improvements
eduramme Feb 8, 2024
2a8ff1e
Merge branch 'blockful-io:main' into feat/axios-subgraph
RafaDSan Feb 8, 2024
7371de8
feat: .env.example updated to have subgraph infos
RafaDSan Feb 8, 2024
7d5baa5
feat: package.json updated to have axios and dotenv
RafaDSan Feb 8, 2024
3dbf66a
feat: script with axios to query data with subgraph
RafaDSan Feb 8, 2024
3f7fd26
Merge branch 'develop' into feat/header-adjustments
eduramme Feb 8, 2024
44069a4
fix: ENDPOINT_URL is now pointing to the correct subgraph. The previo…
RafaDSan Feb 8, 2024
a2ed1fa
fix: removed lines that were causing the dapp to close
RafaDSan Feb 8, 2024
4889752
Merge pull request #99 from RafaDSan/feat/axios-subgraph
heronlancellot Feb 9, 2024
effb3de
resolve requested changes
eduramme Feb 9, 2024
fb61435
Created ENSAvatar component
FrancoAguzzi Feb 9, 2024
fa0cf60
Merge branch 'develop' into refactor-nft-card
FrancoAguzzi Feb 9, 2024
e0fb2a7
theHeader disalbed icons improvement
eduramme Feb 9, 2024
305a213
fix icon colors
eduramme Feb 9, 2024
c1660c5
Update SwappingIcons.tsx
heronlancellot Feb 13, 2024
6a92dca
Merge pull request #100 from blockful-io/feat/header-adjustments
heronlancellot Feb 13, 2024
c7be66e
Update SwappingIcons.tsx
heronlancellot Feb 13, 2024
714b209
Merge branch 'feat/header-adjustments' into feat/icons-not-allowed-click
heronlancellot Feb 13, 2024
f048318
Merge pull request #105 from blockful-io/feat/icons-not-allowed-click
heronlancellot Feb 13, 2024
d36992a
closes #69
blackbeard002 Feb 13, 2024
ed1ef59
Merge pull request #114 from blackbeard002/link
heronlancellot Feb 14, 2024
f424a26
Created useENSData React hook
FrancoAguzzi Feb 14, 2024
f56176c
feat: add swap manually modal
heronlancellot Feb 14, 2024
70dbcb8
feat: add open&close & resize to mobile devices
heronlancellot Feb 15, 2024
c3d5ca1
feat: add light/dark mode in component
heronlancellot Feb 15, 2024
a0e010c
feat:add background opacity when open dialog
heronlancellot Feb 15, 2024
e182315
update: text color in light mode
heronlancellot Feb 15, 2024
485ff63
update: globals css
heronlancellot Feb 15, 2024
f3a7023
fix header
eduramme Feb 15, 2024
71901d0
fix icon errors
eduramme Feb 15, 2024
4f46688
Merge pull request #119 from heronlancellot/feat/swap-manually-modal
heronlancellot Feb 15, 2024
64e495d
merge develop
eduramme Feb 15, 2024
7cece72
fix grid
eduramme Feb 15, 2024
4c964c1
fix active tba
eduramme Feb 15, 2024
b545fd6
feat: add error finding swap offers component
heronlancellot Feb 16, 2024
936326a
update: requested-changes
heronlancellot Feb 16, 2024
d28e829
Merge pull request #126 from heronlancellot/feat/add-error-finding-sw…
heronlancellot Feb 16, 2024
924a564
closes #125
blackbeard002 Feb 16, 2024
68ed85b
Closes #125
blackbeard002 Feb 16, 2024
3a3a87e
Fixed copyright typo
FrancoAguzzi Feb 16, 2024
9b5981f
Fixed ENSAvatar component loading state
FrancoAguzzi Feb 16, 2024
a218835
Fixed lint issues
FrancoAguzzi Feb 16, 2024
3237cd6
Merge remote-tracking branch 'origin/main' into refactor-nft-card
FrancoAguzzi Feb 16, 2024
014ab9e
Merge remote-tracking branch 'origin/main' into refactor-nft-card
FrancoAguzzi Feb 16, 2024
9fcd10d
Merge pull request #2 from blockful-io/develop
FrancoAguzzi Feb 16, 2024
5b8bb0a
Installed ethers
FrancoAguzzi Feb 16, 2024
d810667
Updated useENSData avatar query status setter
FrancoAguzzi Feb 16, 2024
e884ad0
Merge pull request #127 from blackbeard002/sbar
heronlancellot Feb 16, 2024
c2876d2
Merge remote-tracking branch 'origin/develop' into refactor-nft-card
FrancoAguzzi Feb 16, 2024
b3e1f3b
Updated useENSData avatar query status setter
FrancoAguzzi Feb 16, 2024
9453a59
feat: adding public project id for wallet connect client
0xneves Feb 16, 2024
c65e576
Merge pull request #103 from FrancoAguzzi/refactor-nft-card
eduramme Feb 16, 2024
ea4436c
create sidebar component
eduramme Feb 17, 2024
9509d60
apply blur on background
eduramme Feb 17, 2024
a9d1877
fix blur
eduramme Feb 17, 2024
a9bf2af
remove console log
eduramme Feb 17, 2024
c3e4074
closes #128
blackbeard002 Feb 17, 2024
9e696da
Create TheSidebarHeader for the WalletSidebarTemplate
eduramme Feb 17, 2024
e4381cc
create design
eduramme Feb 17, 2024
abc5277
disconnect wallet when disconnect button clicked
eduramme Feb 17, 2024
b2ff479
Merge pull request #130 from blackbeard002/rename
heronlancellot Feb 17, 2024
0d5aa8e
fix: add pr 103 at a218835
heronlancellot Feb 19, 2024
cad5bbe
fix: add pr 103 at fc3e13f
heronlancellot Feb 19, 2024
766aa6f
fix: add pr 103 at 986fd05
heronlancellot Feb 19, 2024
d447b83
fix: add pr 103 package.json
heronlancellot Feb 19, 2024
bab13fb
fix: packages & verify error dapp
heronlancellot Feb 19, 2024
d439839
feat: add padding search-bar
heronlancellot Feb 20, 2024
4921fa8
feat: add 0xneves CODEOWNER
heronlancellot Feb 20, 2024
1aaa22c
Merge pull request #134 from heronlancellot/merge-103
0xneves Feb 20, 2024
0daef99
Merge branch 'develop' into feat/header-walletsidebar
eduramme Feb 20, 2024
3bc454c
Merge branch 'develop' into feat/background-walletsidebar
eduramme Feb 20, 2024
b88e778
remove 'connect wallet' text
eduramme Feb 20, 2024
454b9cd
resolve requested changes
eduramme Feb 20, 2024
d18b684
Merge pull request #129 from eduramme/feat/background-walletsidebar
heronlancellot Feb 20, 2024
227f723
merge develop
eduramme Feb 20, 2024
4dfc5fb
Merge pull request #132 from eduramme/feat/header-walletsidebar
eduramme Feb 20, 2024
73a962b
create user info component
eduramme Feb 20, 2024
9ae9be2
feat: add a active status to StatusOffers atom
GJOM Feb 20, 2024
509b93b
feat: add layout to display swap offers error & no swaps
heronlancellot Feb 20, 2024
91c96ce
display address and basic user info
eduramme Feb 20, 2024
25a28f3
Merge pull request #136 from heronlancellot/feat/swap-offers-display-…
heronlancellot Feb 20, 2024
54d2f25
refactor: component design refactor
gabrieljolvm Feb 21, 2024
7fc1019
Update StatusOffers.tsx
heronlancellot Feb 21, 2024
d44c72e
Merge pull request #138 from gabrieljolvm/feat/refactor-OfferFilters
heronlancellot Feb 21, 2024
bbf08d6
update: imports walletSide-bar
heronlancellot Feb 21, 2024
53545b8
update: gap icons & colors & remove console.log
heronlancellot Feb 21, 2024
302eb23
Merge branch 'develop' into feat/user-info-sidebar
heronlancellot Feb 21, 2024
a0b8718
Merge pull request #137 from eduramme/feat/user-info-sidebar
0xneves Feb 21, 2024
ff722f8
create block explorer link
eduramme Feb 21, 2024
f3b0f7f
create balance status
eduramme Feb 21, 2024
2ad62d9
create balance for connected chain
eduramme Feb 21, 2024
69ffcdf
get default explorer address
eduramme Feb 21, 2024
9f84d48
feat: Offer Expiry Confirm Swap Atom
Feb 21, 2024
9aef83c
fix copy paste address button
eduramme Feb 22, 2024
a61ea05
update: import to @/components
heronlancellot Feb 22, 2024
bc7d8ba
Merge pull request #140 from eduramme/feat/show-wallet-balance
eduramme Feb 22, 2024
85a1d21
Merge pull request #139 from eduramme/feat/profile-info-scanner
eduramme Feb 22, 2024
6e7e018
Merge pull request #141 from devsamuelsantiago/feat/offer-expiration-…
eduramme Feb 22, 2024
4ee2d16
docs: cleared instructions on README.md
0xneves Feb 22, 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
195 changes: 131 additions & 64 deletions components/01-atoms/ConfirmSwapModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,62 @@ import { Dialog, Transition } from "@headlessui/react";
import { Fragment, useContext, useEffect, useState } from "react";
import { useAuthenticatedUser } from "@/lib/client/hooks/useAuthenticatedUser";
import { useNetwork, useWalletClient } from "wagmi";
import { SwapContext, TransactionResultModal } from "@/components/01-atoms";
import { NftCard, NftCardActionType } from "@/components/02-molecules";
import { SwapIcon } from "@/components/01-atoms/icons";
import {
LoadingIndicator,
SwapContext,
TransactionResultModal,
} from "@/components/01-atoms";
import { creatingSwap } from "@/lib/service/creatingSwap";
import { ComposeNftSwap, ICreateSwap } from "@/lib/client/blockchain-data";

interface ConfirmSwapModalProps {
open: boolean;
onClose: () => void;
}

enum CreateOfferStatus {
"CREATE_OFFER" = "CREATE_OFFER",
"WAITING_WALLET_APPROVAL" = "WAITING_WALLET_APPROVAL",
}
import { approveSwap } from "@/lib/service/approveSwap";
import {
ComposeNftSwap,
CreateApprovalStatus,
CreateSwapStatus,
IApproveSwap,
ICreateSwap,
} from "@/lib/client/blockchain-data";
import { NftCard, NftCardActionType } from "../02-molecules";
import { hexToNumber } from "viem";
import { NFT } from "@/lib/client/constants";
import cc from "classcat";
import toast from "react-hot-toast";

export enum TransactionResult {
"LOADING" = "LOADING",
"SUCCESS" = "SUCCESS",
"FAILURE" = "FAILURE",
}

export const ConfirmSwapModal = ({ open, onClose }: ConfirmSwapModalProps) => {
interface ConfirmSwapApprovalModalProps {
open: boolean;
onClose: () => void;
}

export const ConfirmSwapModal = ({
open,
onClose,
}: ConfirmSwapApprovalModalProps) => {
const { authenticatedUserAddress } = useAuthenticatedUser();
const { nftInputUser, nftAuthUser, validatedAddressToSwap, timeDate } =
useContext(SwapContext);

const [createOfferStatus, setCreateOfferStatus] = useState(
CreateOfferStatus.CREATE_OFFER,
const [createApprovalStatus, setCreateApprovalStatus] = useState(
CreateApprovalStatus.CREATE_APPROVAL,
);
const [createSwapStatus, setCreateSwapStatus] = useState(
CreateSwapStatus.CREATE_SWAP,
);
const [transactionResult, displayTransactionResultModal] =
useState<null | TransactionResult>(null);

const { chain } = useNetwork();
const { data: walletClient } = useWalletClient();

const [allSelectedNftsAproved, setAllSelectedNftsAproved] =
useState<boolean>(false);

useEffect(() => {
if (!open) {
setCreateOfferStatus(CreateOfferStatus.CREATE_OFFER);
setCreateApprovalStatus(CreateApprovalStatus.CREATE_APPROVAL);
}
}, [open]);

Expand All @@ -49,11 +66,38 @@ export const ConfirmSwapModal = ({ open, onClose }: ConfirmSwapModalProps) => {
return null;
}

let chainId: number;
const handleApprove = async (nft: NFT) => {
if (typeof chain?.id != "undefined") {
chainId = chain?.id;
}

const swapData: IApproveSwap = {
walletClient: walletClient,
chain: chainId,
spender: authenticatedUserAddress.address,
nftUser: nft.contract?.address,
amountOrId: BigInt(hexToNumber(nft.id?.tokenId)),
};

try {
setCreateApprovalStatus(CreateApprovalStatus.WAITING_WALLET_APPROVAL);
const transactionReceipt = await approveSwap(swapData);
if (transactionReceipt != undefined) {
setCreateApprovalStatus(CreateApprovalStatus.WALLET_APPROVED);
return transactionReceipt;
} else {
setCreateApprovalStatus(CreateApprovalStatus.CREATE_APPROVAL);
}
} catch (error) {
setCreateApprovalStatus(CreateApprovalStatus.CREATE_APPROVAL);
console.error(error);
}
};

const nftsInputUser = ComposeNftSwap(nftInputUser);
const nftsAuthUser = ComposeNftSwap(nftAuthUser);

let chainId: number;
const handleOffer = () => {
const handleSwap = () => {
if (typeof chain?.id != "undefined") {
chainId = chain?.id;
}
Expand All @@ -75,6 +119,15 @@ export const ConfirmSwapModal = ({ open, onClose }: ConfirmSwapModalProps) => {
}
};

const validateApprovedTokensSwap = () => {
if (!allSelectedNftsAproved) {
toast.error("You must approve the Tokens to create Swap.");
return;
} else {
setCreateSwapStatus(CreateSwapStatus.CREATE_SWAP);
}
};

return (
<>
<Transition
Expand All @@ -98,57 +151,71 @@ export const ConfirmSwapModal = ({ open, onClose }: ConfirmSwapModalProps) => {
leave="transition duration-75 ease-out"
leaveFrom="transform scale-100 opacity-100"
leaveTo="transform scale-95 opacity-0"
className="fixed left-1/2 top-1/2 z-50 bg-[#1A1B1F] -translate-x-1/2 -translate-y-1/2 rounded-lg"
className="fixed left-1/2 top-1/2 z-50 bg-[#f8f8f8] dark:bg-[#1A1B1F] -translate-x-1/2 -translate-y-1/2 rounded-lg "
>
<Dialog.Panel className={"p-6 flex flex-col min-w-[350px]"}>
<Dialog.Title className={"text-white text-xl font-bold"}>
Confirm Swap creation
<Dialog.Title
className={"dark:text-white text-black text-xl font-bold"}
>
<p className="items-center justify-center flex">
Approve Tokens below
</p>
</Dialog.Title>

<div className="flex justify-between items-center">
<div className="flex flex-col my-8 space-y-3">
<div className="text-white text-sm">You are offering</div>
<div className="border-green-500 border-2 rounded-md">
<NftCard
withSelectionValidation={false}
onClickAction={NftCardActionType.SHOW_NFT_DETAILS}
ownerAddress={authenticatedUserAddress.address}
nftData={nftAuthUser[0]}
/>
</div>
</div>
<SwapIcon className="w-12 h-12 mt-6" />
<div className="flex flex-col my-8 space-y-3">
<div className="text-white text-sm">You are asking for</div>
<div className="border-green-500 border-2 rounded-md">
<NftCard
withSelectionValidation={false}
onClickAction={NftCardActionType.SHOW_NFT_DETAILS}
ownerAddress={validatedAddressToSwap}
nftData={nftInputUser[0]}
/>
</div>
<div className="flex justify-center items-center">
<div className="grid grid-cols-4 gap-8 mt-6">
{nftAuthUser.map((nft, index) => (
<div className={cc(["flex justify-center items-center"])}>
<div
role="button"
onClick={() => {
handleApprove(nft).then((hashTransaction) => {
console.log("hashTransaction = ", hashTransaction);
});
}}
>
<NftCard
withSelectionValidation={false}
onClickAction={NftCardActionType.NFT_ONCLICK}
ownerAddress={authenticatedUserAddress.address}
nftData={nftAuthUser[index]}
/>
</div>
</div>
))}
</div>
</div>
<Dialog.Description className={"text-gray-500 text-sm mb-6"}>
Tip: you can click on the NFT card <br /> to copy its metadata to
your clipboard!
</Dialog.Description>

<Dialog.Description className={"text-white text-base mt-2"}>
Are you sure you want to create this Swap?
<Dialog.Description
className={
"dark:text-white text-black text-base mt-2 flex justify-center "
}
>
<p>Are you sure you want to create this Swap?</p>
</Dialog.Description>
<button
onClick={handleOffer}
className="mt-4 rounded w-full disabled:bg-gray-100 bg-green-400 border-green-500 disabled:border-gray-200 border-2 py-3 px-5 items-center flex justify-center gap-2 font-semibold text-base disabled:text-gray-300 text-green-900"
<div
role="button"
onClick={validateApprovedTokensSwap}
className={cc([
"w-full",
{
"cursor-not-allowed": !allSelectedNftsAproved,
},
])}
>
{createOfferStatus ===
CreateOfferStatus.WAITING_WALLET_APPROVAL ? (
<p>Waiting wallet action...</p>
) : createOfferStatus === CreateOfferStatus.CREATE_OFFER ? (
<p>Create Swap</p>
) : null}
</button>
<button
onClick={handleSwap}
disabled={!allSelectedNftsAproved}
className="disabled:pointer-events-none mt-4 rounded w-full disabled:bg-gray-100 bg-green-400 border-green-500 disabled:border-gray-200 border-2 py-3 px-5 items-center flex justify-center gap-2 font-semibold text-base disabled:text-gray-300 text-green-900"
>
{createApprovalStatus ===
CreateApprovalStatus.WAITING_WALLET_APPROVAL ? (
<LoadingIndicator />
) : createSwapStatus === CreateSwapStatus.CREATE_SWAP ? (
<p>Create Swap</p>
) : null}
</button>
</div>
</Dialog.Panel>
</Transition>
</Dialog>
Expand Down
11 changes: 11 additions & 0 deletions components/02-molecules/NftCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ interface INftCard {
export enum NftCardActionType {
"SELECT_NFT_FOR_SWAP",
"SHOW_NFT_DETAILS",
"NFT_ONCLICK",
}

export const NftCard = ({
Expand Down Expand Up @@ -77,6 +78,8 @@ export const NftCard = ({
} else if (onClickAction === NftCardActionType.SHOW_NFT_DETAILS) {
navigator.clipboard.writeText(JSON.stringify(nftData));
toast.success("NFT data copied to your clipboard");
} else if (onClickAction === NftCardActionType.NFT_ONCLICK) {
() => {};
}
};

Expand Down Expand Up @@ -157,5 +160,13 @@ export const NftCard = ({
</div>,
)}
</>
) : nftData.contractMetadata?.name && nftData.id.tokenId ? (
<>
{ButtonLayout(
<div className="text-center text-[10px] mt-2 font-medium max-h-[40px] oveflow-y-scroll ">
{nftData.contractMetadata?.name}
</div>,
)}
</>
) : null;
};
7 changes: 5 additions & 2 deletions components/02-molecules/SwapStation.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { useContext, useEffect, useState } from "react";
import { ConfirmSwapModal, SwapContext } from "@/components/01-atoms";
import {
ConfirmSwapModal,
SwapContext,
SwapExpireTime,
} from "@/components/01-atoms";
import { PaperPlane } from "@/components/01-atoms/icons";
import { OfferSummary } from "@/components/02-molecules";
import cc from "classcat";
import toast from "react-hot-toast";
import { SwapExpireTime } from "@/components/01-atoms/SwapExpireTime";

export const SwapStation = () => {
const [isValidSwap, setIsValidSwap] = useState<boolean>(false);
Expand Down
Loading