From 398e405305e4246c32ca7f31b626abecfb8404e1 Mon Sep 17 00:00:00 2001 From: Jonath-z Date: Sat, 2 Jul 2022 18:50:30 +0200 Subject: [PATCH] Mint nft activity added --- .../CreateNftProcessModal/index.tsx | 57 +++-- .../CreateNftPage/DetailsForm/index.tsx | 2 +- components/CreateNftPage/index.tsx | 203 ++++++++++-------- components/EditProfilePage/index.tsx | 41 ++-- .../Card/UploadFileErrorCard/index.tsx | 22 ++ .../Card/UploadFileProcessing/index.tsx | 21 ++ flajl | 17 ++ lib/Utils.ts | 2 + lib/services/BackendApiService.ts | 1 - lib/web3/service.ts | 16 +- 10 files changed, 247 insertions(+), 135 deletions(-) create mode 100644 components/modules/__modules__/Card/UploadFileErrorCard/index.tsx create mode 100644 components/modules/__modules__/Card/UploadFileProcessing/index.tsx create mode 100644 flajl diff --git a/components/CreateNftPage/CreateNftProcessModal/index.tsx b/components/CreateNftPage/CreateNftProcessModal/index.tsx index 2d29288..90626f2 100644 --- a/components/CreateNftPage/CreateNftProcessModal/index.tsx +++ b/components/CreateNftPage/CreateNftProcessModal/index.tsx @@ -10,37 +10,25 @@ export const SUCCED_STATUS = "succeed"; export const ERROR_STATUS = "error"; interface IProps { - uploadFileOnIpfsStatus: string; sendStorageFeeStatus: string; mintNftStatus: string; + mintError: boolean; + onPutOnMarket: () => Promise; + onMintAgain: () => Promise; + onCancel: () => void; } const CreateNftProcessModal = ({ - uploadFileOnIpfsStatus, sendStorageFeeStatus, mintNftStatus, + onPutOnMarket, + mintError, + onMintAgain, + onCancel, }: IProps) => { return (
-
- {uploadFileOnIpfsStatus === PENDING_STATUS ? ( - - ) : uploadFileOnIpfsStatus === SUCCED_STATUS ? ( - - ) : ( - uploadFileOnIpfsStatus === ERROR_STATUS && ( - - ) - )} - -
-

Upload

-

- Uploading of all media assets and metadata to IPFS -

-
-
{sendStorageFeeStatus === PENDING_STATUS ? ( @@ -70,6 +58,35 @@ const CreateNftProcessModal = ({

+ {!mintError ? ( + + ) : ( +
+ + +
+ )}
); diff --git a/components/CreateNftPage/DetailsForm/index.tsx b/components/CreateNftPage/DetailsForm/index.tsx index bafc881..9e37434 100644 --- a/components/CreateNftPage/DetailsForm/index.tsx +++ b/components/CreateNftPage/DetailsForm/index.tsx @@ -25,7 +25,7 @@ const DetailsForm = ({ onNftDetailsChange }: IProps) => {