mirror of
https://github.com/status-im/dreddit-dapp.git
synced 2025-02-18 01:17:01 +00:00
Updates Smart Contract For Better Flow
I added the `posts.length` to `numPosts()` because it does not appear in the instructions and removed 2 `return` statements that I know will confuse people if left in, based on experience with a similar set up for the one function from DTwitter in India.
This commit is contained in:
parent
0d78c99dc3
commit
c57f1ac60d
@ -35,8 +35,7 @@ contract DReddit {
|
|||||||
view
|
view
|
||||||
returns(uint)
|
returns(uint)
|
||||||
{
|
{
|
||||||
// TODO:
|
return posts.length;
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// @notice Create Post
|
// @notice Create Post
|
||||||
@ -65,7 +64,6 @@ contract DReddit {
|
|||||||
returns (bool)
|
returns (bool)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// @notice Obtain vote for specific post
|
// @notice Obtain vote for specific post
|
||||||
@ -77,7 +75,6 @@ contract DReddit {
|
|||||||
returns (uint8)
|
returns (uint8)
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user