Skip to content
This repository was archived by the owner on Dec 30, 2023. It is now read-only.

Commit

Permalink
revoke fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepak Kumar committed Aug 16, 2021
1 parent d56ac6a commit d7e891b
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 205 deletions.
15 changes: 15 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"short_name": "MemoLock",
"name": "Secure file sharing DApp",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
110 changes: 0 additions & 110 deletions public/particles.json

This file was deleted.

1 change: 1 addition & 0 deletions src/components/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const Card = (props) => {
<h4 className={classes.Head}>NOTICE!<span className={classes.Headspan}> &nbsp;-&nbsp;Save this link for future use.</span> </h4>
<div className={classes.total}>
<Link to={`download/${props.link}`}>{`http://localhost:3000/download/${props.link}`}</Link>
<Link to={`revoke/${props.link}`}>{`http://localhost:3000/revoke/${props.link}`}</Link>
</div>
<div className={classes.actions}>
<button className={classes['button--alt']} onClick={props.onClose}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Download.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var requestOptions = {
method: 'GET',
redirect: 'follow'
};
const FileUpload = (props) => {
const Download = (props) => {
const [name,setName]=useState(props.id)
const [password,setPassword]=useState('')
const [uploading, setUploading] = useState(false);
Expand Down Expand Up @@ -118,4 +118,4 @@ const FileUpload = (props) => {
);
};

export default FileUpload;
export default Download;
2 changes: 1 addition & 1 deletion src/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const portalElement = document.getElementById('overlays');
const Modal = (props) => {
return (
<Fragment>
{ReactDOM.createPortal(<Backdrop onClose={props.onClose} />, portalElement)}
{ReactDOM.createPortal(<Backdrop/>, portalElement)}
{ReactDOM.createPortal(
<ModalOverlay>{props.children}</ModalOverlay>,
portalElement
Expand Down
3 changes: 2 additions & 1 deletion src/components/Remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const Remove = (props) => {
setUploading(true);
try {
console.log('started')
const recipt = await lockk.methods.removegrant(name,password).send({ from: account })
console.log(name,password,account)
const recipt = await lockk.methods.removegrant(name-1,password).send({ from: account})
console.log(recipt)
} catch (err) {
setError(err);
Expand Down
182 changes: 91 additions & 91 deletions src/wallet/config.js
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
export const lock_addr="0x695ef4E39829DE16603A0B296aCb8528A0556b39"
export const lock_addr="0xa57ceD96660D493daA9875f4D6Ad5D96FefBFa80"
export const lock_abi=[
{
"constant": true,
"inputs": [],
"name": "tokenCounter",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"constant": false,
"inputs": [
{
"name": "ipfslink",
"type": "string"
},
{
"name": "To",
"type": "address"
}
],
"name": "fileURI",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenId",
"type": "uint256"
}
],
"name": "getlink",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getTokenID",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "tokenId",
"type": "uint256"
},
{
"name": "removeadd",
"type": "address"
}
],
"name": "removegrant",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
]
{
"constant": true,
"inputs": [],
"name": "tokenCounter",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"constant": false,
"inputs": [
{
"name": "ipfslink",
"type": "string"
},
{
"name": "To",
"type": "address"
}
],
"name": "fileURI",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "tokenId",
"type": "uint256"
}
],
"name": "getlink",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getTokenID",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "tokenId",
"type": "uint256"
},
{
"name": "removeadd",
"type": "address"
}
],
"name": "removegrant",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
]

0 comments on commit d7e891b

Please sign in to comment.