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

Resolved direct payment to seller in bought function Resolved #3 #17

Closed
wants to merge 3 commits into from

Conversation

vishal18713
Copy link

#3 => To make a function ready for transaction it must be mentioned as payable . For it's enhancement , the require tag is used so as to check whether the transfer to seller is successful or not then the transfer of the NFT( referring to that property) is done and finally the property token is removed from the property sale list.

@TechWizard9999
Copy link
Contributor

@vishal18713
There is still error in your code
Re-Check it and create an another PR

@vishal18713
Copy link
Author

@vishal18713 There is still error in your code Re-Check it and create an another PR

@TechWizard9999 i have tried to fix the error, please review once.

@vishal18713 vishal18713 changed the title Resolved #3 Resolved direct payment to seller in bought function Resolved #3 Mar 15, 2024
@TechWizard9999
Copy link
Contributor

TechWizard9999 commented Mar 16, 2024

@vishal18713
In your code, ensure correct syntax for the require statement and use the declared variables. Your logic seems perfect however, utilize the variables you have declared

@vishal18713
Copy link
Author

@TechWizard9999
This commit rectifies the bought function within the contract, ensuring accurate variable usage and syntax in the required statement. The purchasePrice[_nftID] variable is now properly utilized to validate the transaction amount against the designated purchase price. Additionally, the logic for transferring the balance to the sellerAddress has been adjusted to use the declared sellerAddress variable and verify the success of the transfer operation. These changes enhance code readability and maintain correctness.

@TechWizard9999
Copy link
Contributor

@vishal18713
Nice work!! Always make sure that to add payable function

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

Successfully merging this pull request may close these issues.

2 participants