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

fix: functions issue in nft dapp #348

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

RutvikGhaskataEalf
Copy link
Collaborator

No description provided.

Copy link

vizipi bot commented Dec 13, 2024

Pull request analysis by VIZIPI

Below you will find who is the most qualified team member to review your code.
This analysis includes his/her work on the code included in this Pull request, in addition to their experience in code affected by these changes ( partly found within the list of potential missing files below )   Feedback always welcome

Reviewers with knowledge related to these changes

Match % Person Commit Count Common Files
100.00% vasmohi 9 1
100.00% yongenaelf 3 1
100.00% AelfHarsh 2 1

Potential missing files from this Pull request

files commonly committed with a subset of this pr, but not committed this time. (click to collapse)
FilePercentilerate
docs/quick-start/developers/dao-dapp/index.md65.22%15 out of 23 times

Committed file ranks

(click to expand)
  • 96.34%[docs/quick-start/developers/nft-dapp/index.md]
  • @@ -1042,10 +979,9 @@ const createNftToken = async (values: INftParams) => {
    memo: "We are issuing nftToken",
    });
    setTransactionStatus(false);
    } catch (error: any) {
    } catch (error) {
    console.error(error, "=====error");
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    handleerror?

    @@ -1416,7 +1352,7 @@ const transferNftToOtherAccount = async (values: {
    await delay(3000);

    handleReturnClick();
    } catch (error: any) {
    } catch (error) {
    console.error(error.message, "=====error");
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    handleerror?

    @@ -525,7 +511,7 @@ const GetParentChainHeight = async () => {
    const result = await tdvwCrossChainContract.GetParentChainHeight.call()
    // Return the parent chain height if it exists, otherwise return an empty string.
    return result ? (result.value as string) : "";
    } catch (error: any) {
    } catch (error) {
    // If there's an error, log it and return an error status.
    console.error(error, "=====error in GetParentChainHeight");
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    handleerror?

    ### 4.3 Create NFT Collection on dAppChain

    :::tip
    ℹ️ Note: This step cannot be executed via the command line interface (CLI).
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    how should the user execute this step?

    },
    sideChainSmartContract: IContract
    ): Promise<number> => {
    // @ts-ignore
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    why ignore?


    - Replace the existing **`fetchNftBalances`** function with this code snippet:

    ```javascript title="commonFunctions.ts"
    Copy link
    Collaborator

    @yongenaelf yongenaelf Jan 2, 2025

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    ts


    - Replace the existing **`fetchUserNftData`** function with this code snippet:

    ```javascript title="commonFunctions.ts"
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    ts


    - Replace the existing **`getNFTData`** function with this code snippet:

    ```javascript title="home/index.tsx"
    Copy link
    Collaborator

    @yongenaelf yongenaelf Jan 2, 2025

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    tsx


    - Replace the existing **`getNFTData`** function with this code snippet:

    ```javascript title="profile/index.tsx"
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    tsx


    #### Install necessary packages and libraries

    - Run teh following command in the terminal:
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    the


    2. Replace the form variable with this code snippet:

    ```javascript title="transfer-nft/index.tsx"
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    tsx


    2. Replace the form variable with this code snippet:

    ```javascript title="transfer-nft/index.tsx"
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    tsx


    2. Replace the form variable with this code snippet:

    ```javascript title=""
    Copy link
    Collaborator

    @yongenaelf yongenaelf Jan 2, 2025

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    ts

    remove title="" if no title is needed

    2. **Parameters:** It takes `values`, which is inferred from the `formSchema` and represents the form's data.
    3. **Calls Transfer Function:** It calls the `transferNftToOtherAccount` function with the form values to initiate the NFT transfer.

    Now that we've written all the necessary frontend functions and components, we're ready to run the NFT dApp application in the next step.
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    dApp stands for "decentralised application", no need to add "application" after "dApp"

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants