Giter Site home page Giter Site logo

app-telos-net's People

Contributors

dependabot[bot] avatar devartemnuss avatar donnyquixotic avatar gregory-latinier avatar jmgayosso avatar jrstev avatar kylanhurt avatar luckiester avatar mgravitt avatar pmbadger avatar poplexity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

app-telos-net's Issues

Showing wrong value when creating a ballot

When creating a ballot, the fee is shown as 100000 instead of 10. It would also be good to specify that we're showing the value in TLOS and not USD or some other currency/token.

Screen Shot 2022-08-13 at 15 51 17

To consider:
Remove the regex function and show 10.0000 TLOS.

Time indicator is misplaced on mobile

When using a mobile size viewport, the div containing time and status is misplaced on top of other information. The image below shows the issue with an iPhone SE viewport size.

This is reproducible with viewport width of 1000px or less

Screen Shot 2022-08-13 at 13 16 34

Treasuries option in the ballot creation form needs to filter the options

The getter for those options is here:

...mapGetters('trails', ['treasuries']),

An account can only create ballots in treasuries which it is registered for, as seen in the contract code where it looks up the tables:

https://github.com/telosnetwork/telos-decide/blob/22e300dd50db6709dc0d5115894dbc611b09a690/contracts/decide/src/ballot.cpp#L23

So, that getter needs to also filter where the current account is a voter. Likely can do a lookup on the voters table and only show the treasuries you find there, similar to how the actual contract does the table lookup.

Confirmation dialog for ballot fee

Description

Currently, when the user opens a ballot, there is no indication that there is a fee associated with opening it. Before the user gets an error message or they're surprised by their reduced balance, we want to show them they'll be paying the fee.

The expected flow

  1. User clicks new ballot
  2. User fills out ballot
  3. User clicks create
  4. New dialog/modal confirms they accept the fee
  5. We send the transactions for ballot creation

Acceptance criteria

  • Dialog/modal appears when user clicks the create button
  • Dialog/modal shows the fee that will be paid
  • Dialog/modal shows Cancel and Accept options
  • Dialog/modal shows that user doesn't have enough funds when they don't have enough funds

Properly configure ballots for votestake/voteliquid

When creating a ballot, we should never create a ballot where votestake and voteliquid are both false, because then there will never be any vote weights to count, and voting will always fail with the "must vote with a positive amount" error.

When creating a ballot, voteliquid is always set to false and votestake is always set based on the stakeable value from the treasury's settings:

https://github.com/telosnetwork/telos-decide/blob/22e300dd50db6709dc0d5115894dbc611b09a690/contracts/decide/src/ballot.cpp#L51

So, if a treasury's token is not stakable, we always should toggle voteliquid to true... which is the case for the VOTE token, this is why those ballots we have created for testing will never get votes. If a treasury's token is stakable, we should give the user an option in the form "Would you like to count liquid or staked or both"... but we cannot ever submit a ballot with both of those values set to false (which is what ballots for the VOTE token currently do). Maybe a message would be good in any case... "This treasury is not stakeable so liquid tokens will be used" or "This treasury is stakable, would you like to count liquid or staked tokens, or both?"

The settings should be on the treasury row, which I think should be loaded into the store already. So you can check the value of the stakeable property on the treasury row's settings to see how to handle this on the ballot form.

To toggle ballot settings, we need to call the togglebal action:

https://github.com/telosnetwork/telos-decide/blob/22e300dd50db6709dc0d5115894dbc611b09a690/contracts/decide/src/ballot.cpp#L100

To call that action, we need to add another action to the array of actions we create in the addBallot function here:

const actions = [

To know what values the ballot will have for each setting, see the code in ballot.cpp above... voteliquid is always starting as false, and votestake is based on the stakeable setting, so based on that logic, and what the user has selected, need to toggle one or both of those settings by adding 1 or 2 actions to the actions array in addBallot function.

Better display of ballot end time

On the ballot view, for already created ballots, if a ballot ended, we should show when it ended. Or if it is still in progress, we should show when it will end.

Improve error handling on failed transaction

Show the actual error from the contract, without the assertion prefix (details[0]):

{
    "code": 500,
    "message": "Internal Service Error",
    "error": {
        "code": 3050003,
        "name": "eosio_assert_message_exception",
        "what": "eosio_assert_message assertion failure",
        "details": [
            {
                "message": "assertion failure with message: ballot name already exists",
                "file": "cf_system.cpp",
                "line_number": 14,
                "method": "eosio_assert"
            },
            {
                "message": "pending console output: ",
                "file": "apply_context.cpp",
                "line_number": 143,
                "method": "exec_one"
            }
        ]
    }
}

get_table_rows calls continue forever

When leaving the website open on the ballots page, get_table_rows continues to get called, causing unnecessary resource usage on the user's computer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.