-
Notifications
You must be signed in to change notification settings - Fork 0
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
Invest #3
base: main
Are you sure you want to change the base?
Invest #3
Conversation
… into invest # Conflicts: # frontend/package-lock.json # frontend/package.json # frontend/src/home/Token.js # frontend/src/services/OFACAxiosOptions.js # frontend/src/services/PinataIPFSOptions.js
@@ -21,7 +21,7 @@ const NavBar = () => { | |||
<> | |||
<section className="nav"> | |||
<Link to="/"> | |||
<Button variant="outlined">{" Home"}</Button> | |||
{/* <Button variant="outlined">{" Home"}</Button> */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this line commented?
const token = "0x420d23b5D7B70fFEF09A6076B7Db1176472BaA37"; | ||
|
||
export async function approve(amount) { | ||
if (amount <= 0 || amount <= "0" ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amount <= "0" this check is not correct
@@ -19,8 +37,9 @@ export async function stake(amount) { | |||
dygnifyStaking.abi, | |||
signer | |||
); | |||
const transaction = await contract.stake(amount); | |||
await transaction.wait(); | |||
const transaction1 = await contract.stake(amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
improper naming of variable 'transaction1', variable naming needs to be corrected
@@ -14,6 +14,7 @@ const Home = () => { | |||
const form = () => { | |||
return ( | |||
<div className="box"> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary line addition, please remove
@@ -3,8 +3,26 @@ import dygnifyStaking from "../../artifacts/contracts/DygnifyStaking.sol/Dygnify | |||
import dygnifyToken from "../../artifacts/contracts/DygnifyToken.sol/DygnifyToken.json"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add try catch in all the functions in this file
import { uploadFileToIPFS } from '../services/PinataIPFSOptions'; | ||
const axios = require('axios'); | ||
|
||
const REACT_APP_PINATA_API_KEY = "bd910e460ee4b6ef0519"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to remove these secrets from here and keep it in env files
|
||
|
||
async function mint_NFT(tokenURI,imageURI) { | ||
if (typeof window.ethereum !== 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add try catch to this function
const provider = new ethers.providers.Web3Provider(window.ethereum); | ||
const signer = provider.getSigner(); | ||
const contract = new ethers.Contract(NFT_minter, NFTMinter.abi, signer); | ||
const transaction = await contract.mint(tokenURI); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use return to decide on next action
import {amlCheck} from "../../services/OFACAxiosOptions.js" | ||
import axiosHttpService from '../../services/axioscall'; | ||
|
||
const REACT_APP_OFAC_MIN_SCORE = "90" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these settings from here and put it in env file
@@ -8,9 +8,9 @@ | |||
.top > h1 { | |||
padding: 10px 0; | |||
} | |||
|
|||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove this i guess
Added NFT minter smart contract and UI improvements